Commit b73abff6b4f93ce5a90d6e4868cf5877970a0632

Authored by Alex Savenko
1 parent 84125667

установка 2 новых ролей "автор", "редактор"

app/library/App/Bootstrap/AclBootstrap.php
... ... @@ -26,6 +26,8 @@ class AclBootstrap implements BootstrapInterface
26 26 $acl->addRole(new Acl\Role(AclRoles::ADMINISTRATOR), $authorizedRole);
27 27 $acl->addRole(new Acl\Role(AclRoles::MANAGER), $authorizedRole);
28 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 32 $acl->mountMany($api->getCollections());
31 33 }
... ...
app/library/App/Constants/AclRoles.php
... ... @@ -6,10 +6,12 @@ class AclRoles
6 6 {
7 7 const UNAUTHORIZED = 'Unauthorized';
8 8 const AUTHORIZED = 'Authorized';
  9 + const AUTHOR = 'Author';
  10 + const EDITOR = 'Editor';
9 11 const USER = 'User';
10 12 const MANAGER = 'Manager';
11 13 const ADMINISTRATOR = 'Administrator';
12 14  
13 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 18 \ No newline at end of file
... ...