Then I want to write a bizRule at the task level that grabs data from that assignment:
$authItem = 'itemName';
$description = 'description of this item';
$bizRule = 'return Yii::app()->user->evalScope($parentRoleAssignment->data);';
Yii::app()->authManager->createTask($authItem,$description,$bizRule);
where $parentRoleAssignment-> is the data element from the parent role assignment (above) and Yii::app()->user->evalScope() is a custom function in the WebUser component.
How do I do this? I can’t find a way to call a task’s parent items in the auth class structure…???
From what I can tell, if I want to include $data in $bizRule, I have to re-lookup the entire assignment. I’ve tried using $this->, but it invokes authManager, not this assignment instance.
The only work-around I’ve found is to include the Item name as a parameter passed to a custom function in the bizrule. It’s better than nothing, but I was hoping there would be a more direct route.
As for the original problem of grabbing Data from Parent items, I can see why that might be a little too complex for the system. If someone knows a way, I’d love to hear about it. But I just reconceptualized the auth hierarchy from the top down, and things work better.