36 foreach (
$config as $key => $value) {
63 $this->_roles = $this->_authorizer->getRoles(
false);
79 $type = array(CAuthItem::TYPE_OPERATION, CAuthItem::TYPE_TASK);
80 $this->_items = $this->_authorizer->getAuthItems($type);
88 $allPermissions = $this->_authorizer->getPermissions();
90 $permissions = array();
91 foreach ($this->_roles as $roleName => $role) {
92 $permissions[ $roleName ] = array();
93 foreach ($this->_items as $itemName => $item) {
94 $permissions[ $roleName ][ $itemName ] = $this->_authorizer->hasPermission($itemName, null, $allPermissions[ $roleName ]);
99 $this->_permissions = $permissions;
108 foreach ($this->_permissions as $roleName => $rolePermissions) {
109 foreach ($rolePermissions as $itemName => $permission) {
111 $parents[ $roleName ][ $itemName ] = $this->_authorizer->getAuthItemParents($itemName, null, $roleName,
true);
117 $this->_parents = $parents;
128 foreach ($this->_items as $itemName => $item) {
130 $row[
'description'] = $item->getNameLink();
132 foreach ($this->_roles as $roleName => $role) {
135 $permissionColumn = $item->getRevokePermissionLink($role);
138 elseif ($permissions[ $roleName ][ $itemName ] ===
Rights::PERM_INHERITED && isset($parents[ $roleName ][ $itemName ]) ===
true) {
139 $permissionColumn = $item->getInheritedPermissionText($parents[ $roleName ][ $itemName ], $this->displayParentType);
143 $permissionColumn = $item->getAssignPermissionLink($role);
147 $row[ strtolower($roleName) ] = isset($permissionColumn) ===
true ? $permissionColumn :
'';
154 $this->setData(
$data);
164 return $this->getData();
175 foreach ($this->getData() as $key => $value) {
189 return count($this->getData());