-
Notifications
You must be signed in to change notification settings - Fork 2
/
acl.php
30 lines (23 loc) · 737 Bytes
/
acl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use Antares\Acl\RoleActionList;
use Antares\Model\Role;
use Antares\Acl\Action;
$presentationActions = [
'Admin List', //users
'Roles List', //roles
];
$crudActions = [
'User Create', 'User Update', 'User Delete', //users
'Create Role', 'Edit Role', 'Delete Role', //roles
'Properties', 'Properties Update', //action properties
'Manage Roles', 'Manage Acl', 'Manage Settings', //global
'Login As User', 'Manage Levels'
];
$actions = [];
$allActions = array_merge($presentationActions, $crudActions);
foreach ($allActions as $actionName) {
$actions[] = new Action('', $actionName);
}
$permissions = new RoleActionList;
$permissions->add(Role::admin()->name, $actions);
return $permissions;