comanage-dev - Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend
Subject: COmanage Developers List
List archive
Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend
Chronological Thread
- From: Benn Oshrin <>
- To:
- Subject: Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend
- Date: Wed, 12 Sep 2012 12:29:15 -0400
On 9/12/12 12:09 PM, Scott Koranda wrote:
To "fix" that problem I want to add a delete() method for the
CoPeopleController.php that dynamically changes the linking
between the models to prevent the cascade from affecting the
CoGroupMembers model.
Here is the proposed code:
// Get a pointer to our model
$req = $this->modelClass;
$model = $this->$req;
You could just reference the model directly, since you know you're in CoPeopleController at this point. No need to copy the above.
// If a data store for groups and group memberships is being used that
// is not a relational database supporting SQL then temporarily remove
// the model relationship to group memberships.
if (!Configure::read('COmanage.groupSqlDataSource')) {
This is possibly going to need to change when CO-444 is addressed. Can you add a link to the code from the ticket and vice versa?
$groupMembersLinkValue = $model->hasMany['CoGroupMember'];
unset($model->hasMany['CoGroupMember']);
// Use the parent method to do the delete.
$ret = parent::delete($id);
// Restore the model relationship to group memberships if it was
deleted.
$model->hasMany['CoGroupMember'] = $groupMembersLinkValue;
You don't actually delete the group membership. Don't you still need to do that?
-Benn-
- [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Scott Koranda, 09/12/2012
- Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Benn Oshrin, 09/12/2012
- Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Scott Koranda, 09/12/2012
- Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Benn Oshrin, 09/13/2012
- Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Benn Oshrin, 09/13/2012
- Re: [comanage-dev] change to CoPeopleController.php necessary for Grouper backend, Benn Oshrin, 09/12/2012
Archive powered by MHonArc 2.6.16.