Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r505 - in registry/trunk/app/Model: . Behavior

Subject: COmanage Developers List

List archive

[comanage-dev] r505 - in registry/trunk/app/Model: . Behavior


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r505 - in registry/trunk/app/Model: . Behavior
  • Date: Sat, 20 Apr 2013 09:12:48 -0400
  • Authentication-results: sfpop-ironport01.merit.edu; dkim=neutral (message not signed) header.i=none

Author: benno
Date: 2013-04-20 09:12:48 -0400 (Sat, 20 Apr 2013)
New Revision: 505

Modified:
registry/trunk/app/Model/Behavior/ProvisionerBehavior.php
registry/trunk/app/Model/CoGroupMember.php
Log:
Provision on group member delete (CO-599)

Modified: registry/trunk/app/Model/Behavior/ProvisionerBehavior.php
===================================================================
--- registry/trunk/app/Model/Behavior/ProvisionerBehavior.php 2013-04-19
22:44:32 UTC (rev 504)
+++ registry/trunk/app/Model/Behavior/ProvisionerBehavior.php 2013-04-20
13:12:48 UTC (rev 505)
@@ -35,12 +35,6 @@
*/

public function beforeDelete(Model $model, $cascade = true) {
- if(!$cascade) {
- // If we're not cascading a delete, there really isn't anything for us
to do
-
- return true;
- }
-
// Note that in most cases this is just an edit. ie: deleting a
telephone number is
// CoPersonUpdated not CoPersonDeleted. In those cases, we can just call
afterSave.

@@ -49,6 +43,8 @@
}

// However, deleting a CoPerson needs to be handled specially.
+ // Note that $model->data is generally populated by
StandardController::delete
+ // calling $model->read().

if(!empty($model->data['CoPerson']['id'])) {
// Invoke all provisioning plugins

Modified: registry/trunk/app/Model/CoGroupMember.php
===================================================================
--- registry/trunk/app/Model/CoGroupMember.php 2013-04-19 22:44:32 UTC (rev
504)
+++ registry/trunk/app/Model/CoGroupMember.php 2013-04-20 13:12:48 UTC (rev
505)
@@ -170,7 +170,10 @@
// If a (CO Group Member) id is specified but member and owner
are
// both false, delete the row and cut a history record.

- if(!$this->delete($m['id'])) {
+ // Set $this->data so ProvisionerBehavior can run on
beforeDelete()
+ $this->data = $grpMem;
+
+ if(!$this->delete($m['id'], false)) {
throw new RuntimeException(_txt('er.delete'));
}




  • [comanage-dev] r505 - in registry/trunk/app/Model: . Behavior, svnlog, 04/20/2013

Archive powered by MHonArc 2.6.16.

Top of Page