Commit b73abff6b4f93ce5a90d6e4868cf5877970a0632
1 parent
84125667
установка 2 новых ролей "автор", "редактор"
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
app/library/App/Bootstrap/AclBootstrap.php
@@ -26,6 +26,8 @@ class AclBootstrap implements BootstrapInterface | @@ -26,6 +26,8 @@ class AclBootstrap implements BootstrapInterface | ||
26 | $acl->addRole(new Acl\Role(AclRoles::ADMINISTRATOR), $authorizedRole); | 26 | $acl->addRole(new Acl\Role(AclRoles::ADMINISTRATOR), $authorizedRole); |
27 | $acl->addRole(new Acl\Role(AclRoles::MANAGER), $authorizedRole); | 27 | $acl->addRole(new Acl\Role(AclRoles::MANAGER), $authorizedRole); |
28 | $acl->addRole(new Acl\Role(AclRoles::USER), $authorizedRole); | 28 | $acl->addRole(new Acl\Role(AclRoles::USER), $authorizedRole); |
29 | + $acl->addRole(new Acl\Role(AclRoles::EDITOR), $authorizedRole); | ||
30 | + $acl->addRole(new Acl\Role(AclRoles::AUTHOR), $authorizedRole); | ||
29 | 31 | ||
30 | $acl->mountMany($api->getCollections()); | 32 | $acl->mountMany($api->getCollections()); |
31 | } | 33 | } |
app/library/App/Constants/AclRoles.php
@@ -6,10 +6,12 @@ class AclRoles | @@ -6,10 +6,12 @@ class AclRoles | ||
6 | { | 6 | { |
7 | const UNAUTHORIZED = 'Unauthorized'; | 7 | const UNAUTHORIZED = 'Unauthorized'; |
8 | const AUTHORIZED = 'Authorized'; | 8 | const AUTHORIZED = 'Authorized'; |
9 | + const AUTHOR = 'Author'; | ||
10 | + const EDITOR = 'Editor'; | ||
9 | const USER = 'User'; | 11 | const USER = 'User'; |
10 | const MANAGER = 'Manager'; | 12 | const MANAGER = 'Manager'; |
11 | const ADMINISTRATOR = 'Administrator'; | 13 | const ADMINISTRATOR = 'Administrator'; |
12 | 14 | ||
13 | const ALL_ROLES = [self::UNAUTHORIZED, self::AUTHORIZED, self::USER, self::MANAGER, self::ADMINISTRATOR]; | 15 | const ALL_ROLES = [self::UNAUTHORIZED, self::AUTHORIZED, self::USER, self::MANAGER, self::ADMINISTRATOR]; |
14 | - const ALL_REAL_ROLES = [self::USER, self::MANAGER, self::ADMINISTRATOR]; | 16 | + const ALL_REAL_ROLES = [self::AUTHOR, self::EDITOR, self::USER, self::MANAGER, self::ADMINISTRATOR]; |
15 | } | 17 | } |
16 | \ No newline at end of file | 18 | \ No newline at end of file |