Skip to Content.
Sympa Menu

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

Subject: COmanage Developers List

List archive

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


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r489 - in registry/trunk/app: Controller Model
  • Date: Tue, 9 Apr 2013 20:59:19 -0400
  • Authentication-results: sfpop-ironport07.merit.edu; dkim=neutral (message not signed) header.i=none

Author: benno
Date: 2013-04-09 20:59:19 -0400 (Tue, 09 Apr 2013)
New Revision: 489

Modified:
registry/trunk/app/Controller/CoPeopleController.php
registry/trunk/app/Controller/CoPetitionsController.php
registry/trunk/app/Model/CoEnrollmentFlow.php
Log:
Fix petition creation authorization (CO-585)

Modified: registry/trunk/app/Controller/CoPeopleController.php
===================================================================
--- registry/trunk/app/Controller/CoPeopleController.php 2013-04-09
22:34:52 UTC (rev 488)
+++ registry/trunk/app/Controller/CoPeopleController.php 2013-04-10
00:59:19 UTC (rev 489)
@@ -516,7 +516,8 @@

if(isset($this->request->named['coef'])) {
$flowAuthorized =
$this->CoPerson->Co->CoPetition->CoEnrollmentFlow->authorizeById($this->request->named['coef'],
-
$roles['copersonid']);
+
$roles['copersonid'],
+
$this->Role);

$p['match_policy'] =
$this->CoPerson->Co->CoPetition->CoEnrollmentFlow->field('match_policy',

array('CoEnrollmentFlow.id' => $this->request->named['coef']));

Modified: registry/trunk/app/Controller/CoPetitionsController.php
===================================================================
--- registry/trunk/app/Controller/CoPetitionsController.php 2013-04-09
22:34:52 UTC (rev 488)
+++ registry/trunk/app/Controller/CoPetitionsController.php 2013-04-10
00:59:19 UTC (rev 489)
@@ -330,7 +330,7 @@
// If an enrollment flow was specified, check the authorization for that
flow

if($this->enrollmentFlowID() != -1 && $roles['copersonid']) {
- $flowAuthorized =
$this->CoPetition->CoEnrollmentFlow->authorizeById($this->enrollmentFlowID(),
$roles['copersonid']);
+ $flowAuthorized =
$this->CoPetition->CoEnrollmentFlow->authorizeById($this->enrollmentFlowID(),
$roles['copersonid'], $this->Role);
}

// Add a new CO Petition?

Modified: registry/trunk/app/Model/CoEnrollmentFlow.php
===================================================================
--- registry/trunk/app/Model/CoEnrollmentFlow.php 2013-04-09 22:34:52
UTC (rev 488)
+++ registry/trunk/app/Model/CoEnrollmentFlow.php 2013-04-10 00:59:19
UTC (rev 489)
@@ -198,10 +198,11 @@
* @since COmanage Registry v0.7
* @param Integer CO Enrollment Flow ID
* @param Integer CO Person ID
+ * @param RoleComponent
* @return Boolean True if the CO Person is authorized, false otherwise
*/

- public function authorizeById($coEfId, $coPersonId) {
+ public function authorizeById($coEfId, $coPersonId, $Role) {
// Retrieve the Enrollment Flow and pass it along

$args = array();
@@ -215,6 +216,6 @@
return false;
}

- return $this->authorize($ef, $coPersonId);
+ return $this->authorize($ef, $coPersonId, $Role);
}
}



  • [comanage-dev] r489 - in registry/trunk/app: Controller Model, svnlog, 04/09/2013

Archive powered by MHonArc 2.6.16.

Top of Page