Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r258 - in registry/trunk/app: Controller Model

Subject: COmanage Developers List

List archive

[comanage-dev] r258 - in registry/trunk/app: Controller Model


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r258 - in registry/trunk/app: Controller Model
  • Date: Mon, 12 Mar 2012 22:01:56 -0400

Author: skoranda
Date: 2012-03-12 22:01:56 -0400 (Mon, 12 Mar 2012)
New Revision: 258

Modified:
registry/trunk/app/Controller/CoPeopleController.php
registry/trunk/app/Model/CoOrgIdentityLink.php
Log:
CO-261
Fix "A user editing his or her CO identity receives an error
to 'Please recheck your submission'."

CO-242
Change fix for "Error in inviting a person to a co"

Modified: registry/trunk/app/Controller/CoPeopleController.php
===================================================================
--- registry/trunk/app/Controller/CoPeopleController.php 2012-03-13
01:49:10 UTC (rev 257)
+++ registry/trunk/app/Controller/CoPeopleController.php 2012-03-13
02:01:56 UTC (rev 258)
@@ -273,34 +273,6 @@
}

/**
- * Add the person identified by the Org Identity to the identified CO.
- * - precondition: org_identity_id and co_id set in $this->request->params
- *
- * @since COmanage Registry v0.4
- * @return void
- */
-
- function add() {
- // The parent add() method is overridden here so that for non REST calls
- // the validation can be relaxed to allow the normal saveAll() call
- // in the parent add() method to complete without a validation error.
- // If the validation is not relaxed so that co_person_id and
org_identity_id
- // are not required then the validation of all the tables before any
updates
- // will cause a validation error for the model CoOrgIdentityLink.
-
- if(!$this->restful) {
- $this->loadModel('CoOrgIdentityLink');
-
- // dynamically relax the validation for the CoOrgIdentityLink model
- $this->CoOrgIdentityLink->validate['co_person_id']['required'] = false;
- $this->CoOrgIdentityLink->validate['org_identity_id']['required'] =
false;
- }
-
- // call the add() method for the parent StandardController class
- parent::add();
- }
-
- /**
* Authorization for this Controller, called by Auth component
* - precondition: Session.Auth holds data used for authz decisions
* - postcondition: $permissions set with calculated permissions

Modified: registry/trunk/app/Model/CoOrgIdentityLink.php
===================================================================
--- registry/trunk/app/Model/CoOrgIdentityLink.php 2012-03-13 01:49:10
UTC (rev 257)
+++ registry/trunk/app/Model/CoOrgIdentityLink.php 2012-03-13 02:01:56
UTC (rev 258)
@@ -47,17 +47,12 @@
public $order = array("CoOrgIdentityLink.id");

// Validation rules for table elements
- //
- // 'required' => true for co_person_id and org_identity_id
- // may be temporarily overridden during add() method of CoPeopleController.
public $validate = array(
'co_person_id' => array(
- 'rule' => 'numeric',
- 'required' => true
+ 'rule' => 'numeric'
),
'org_identity_id' => array(
- 'rule' => 'numeric',
- 'required' => true
+ 'rule' => 'numeric'
)
);
}



  • [comanage-dev] r258 - in registry/trunk/app: Controller Model, svnlog, 03/12/2012

Archive powered by MHonArc 2.6.16.

Top of Page