comanage-dev - [comanage-dev] r554 - in registry/trunk/app: Controller Lib
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r554 - in registry/trunk/app: Controller Lib
- Date: Mon, 8 Jul 2013 17:10:20 -0400
- Authentication-results: sfpop-ironport02.merit.edu; dkim=neutral (message not signed) header.i=none
Author: benno
Date: 2013-07-08 17:10:19 -0400 (Mon, 08 Jul 2013)
New Revision: 554
Modified:
registry/trunk/app/Controller/CoPetitionsController.php
registry/trunk/app/Lib/lang.php
Log:
Fix authn required on self service petition creation, and tweak confirmation
message (CO-631)
Modified: registry/trunk/app/Controller/CoPetitionsController.php
===================================================================
--- registry/trunk/app/Controller/CoPetitionsController.php 2013-07-08
20:15:41 UTC (rev 553)
+++ registry/trunk/app/Controller/CoPetitionsController.php 2013-07-08
21:10:19 UTC (rev 554)
@@ -93,16 +93,19 @@
$authnReq =
$this->CoPetition->CoEnrollmentFlow->field('require_authn',
array('CoEnrollmentFlow.id' => $enrollmentFlowID));
- if($matchPolicy == EnrollmentMatchPolicyEnum::Self) {
- if($authnReq) {
- $this->Session->setFlash(_txt('rs.pt.login'), '', array(),
'success');
- $this->redirect("/auth/logout");
- } else {
- // Not really clear where to send a self-enrollment person...
- $this->Session->setFlash(_txt('rs.pt.create'), '', array(),
'success');
- $this->redirect("/");
- }
+ $authzLevel =
$this->CoPetition->CoEnrollmentFlow->field('authz_level',
+
array('CoEnrollmentFlow.id' => $enrollmentFlowID));
+
+ if($authzLevel == EnrollmentAuthzEnum::None) {
+ // Not really clear where to send a self-enrollment person...
+ $this->Session->setFlash(_txt('rs.pt.create.self'), '', array(),
'success');
+ $this->redirect("/");
+ } elseif($authnReq && $matchPolicy ==
EnrollmentMatchPolicyEnum::Self) {
+ // Clear any session for account linking
+ $this->Session->setFlash(_txt('rs.pt.login'), '', array(),
'success');
+ $this->redirect("/auth/logout");
} else {
+ // Standard redirect
$this->Session->setFlash(_txt('rs.pt.create'), '', array(),
'success');
$this->performRedirect();
}
Modified: registry/trunk/app/Lib/lang.php
===================================================================
--- registry/trunk/app/Lib/lang.php 2013-07-08 20:15:41 UTC (rev 553)
+++ registry/trunk/app/Lib/lang.php 2013-07-08 21:10:19 UTC (rev 554)
@@ -632,6 +632,7 @@
'rs.pt.approve' => 'Petition Approved',
'rs.pt.confirm' => 'Petition Confirmed',
'rs.pt.create' => 'Petition Created',
+ 'rs.pt.create.self' => 'Petition Created. You may need to check your email
for further information.',
'rs.pt.deny' => 'Petition Denied',
'rs.pt.id.attached' => 'Authenticated identifier "%1$s" attached to
organizational identity',
'rs.pt.id.login' => 'Identifier "%1$s" flagged for login',
- [comanage-dev] r554 - in registry/trunk/app: Controller Lib, svnlog, 07/08/2013
Archive powered by MHonArc 2.6.16.