-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathacl.php
29 lines (24 loc) · 1.16 KB
/
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
<?php
use Antares\Acl\RoleActionList;
use Antares\Model\Role;
use Antares\Acl\Action;
$actions = [
new Action('ban_management.rules.index', 'List Rules'),
new Action('ban_management.rules.create', 'Add Rule'),
new Action('ban_management.rules.store', 'Add Rule'),
new Action('ban_management.rules.edit', 'Update Rule'),
new Action('ban_management.rules.update', 'Update Rule'),
new Action('ban_management.rules.destroy', 'Delete Rule'),
new Action('ban_management.bannedemails.index', 'List Banned Emails'),
new Action('ban_management.bannedemails.create', 'Add Banned Email'),
new Action('ban_management.bannedemails.store', 'Add Banned Email'),
new Action('ban_management.bannedemails.edit', 'Update Banned Email'),
new Action('ban_management.bannedemails.update', 'Update Banned Email'),
new Action('ban_management.bannedemails.destroy', 'Delete Banned Email'),
];
$adminActions = array_merge($actions, [
new Action('ban_management.configuration', 'Configuration')]);
$permissions = new RoleActionList;
$permissions->add(Role::admin()->name, $adminActions);
$permissions->add(Role::member()->name, $actions);
return $permissions;