我有role = "reporting"
,其任务child = "reporting.task"
,其操作为child = "reporting.task.create"
;但是以下内容:
if(Yii::app()->authManager->hasItemChild($reportingRole,$reportingTaskCreateOperation))
评估为假。
如何检查操作"reporting.task.create"
是否已分配给角色"reporting"
?
答案 0 :(得分:0)
也许这会对你有所帮助:
isset( Yii::app()->authManager->getItemChildren('roleName')['taskName'] );