-
Type:
Bug
-
Resolution: Completed
-
Priority:
Minor
-
Affects Version/s: COmanage Registry 4.2.0 (Pacific Pier)
-
Component/s: Registry
-
None
In a COmanage plugin, the code segment below is expected to store the co_person_id from the auth session into a variable.
function isAuthorized() {
$roles = $this->Role->calculateCMRoles();
$uid=$this->Session->read('Auth.User.co_person_id');
But it only get's set if you come through the COmanage home page. When coming from a deep link, it never works.
e.g. Coming into a comanage without a session and going directly to the plugin (which triggers authentication) via a link like
https://comanage/registry/grouper_lite/grouper_groups/groupoptin/co:2/glid:1.
would always result in $uid not being set, but navigating to the same page from the COmanage home page would.
By comparison this assignment would always regard regardless of method.
function isAuthorized() {
$roles = $this->Role->calculateCMRoles();
$this->userId = $this->Session->read('Plugin.Grouper.UserId');