From b73abff6b4f93ce5a90d6e4868cf5877970a0632 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 21 Mar 2017 17:08:41 +0200 Subject: [PATCH] установка 2 новых ролей "автор", "редактор" --- app/library/App/Bootstrap/AclBootstrap.php | 2 ++ app/library/App/Constants/AclRoles.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/library/App/Bootstrap/AclBootstrap.php b/app/library/App/Bootstrap/AclBootstrap.php index 2fed643..0411680 100755 --- a/app/library/App/Bootstrap/AclBootstrap.php +++ b/app/library/App/Bootstrap/AclBootstrap.php @@ -26,6 +26,8 @@ class AclBootstrap implements BootstrapInterface $acl->addRole(new Acl\Role(AclRoles::ADMINISTRATOR), $authorizedRole); $acl->addRole(new Acl\Role(AclRoles::MANAGER), $authorizedRole); $acl->addRole(new Acl\Role(AclRoles::USER), $authorizedRole); + $acl->addRole(new Acl\Role(AclRoles::EDITOR), $authorizedRole); + $acl->addRole(new Acl\Role(AclRoles::AUTHOR), $authorizedRole); $acl->mountMany($api->getCollections()); } diff --git a/app/library/App/Constants/AclRoles.php b/app/library/App/Constants/AclRoles.php index 1c47ee8..0333707 100755 --- a/app/library/App/Constants/AclRoles.php +++ b/app/library/App/Constants/AclRoles.php @@ -6,10 +6,12 @@ class AclRoles { const UNAUTHORIZED = 'Unauthorized'; const AUTHORIZED = 'Authorized'; + const AUTHOR = 'Author'; + const EDITOR = 'Editor'; const USER = 'User'; const MANAGER = 'Manager'; const ADMINISTRATOR = 'Administrator'; const ALL_ROLES = [self::UNAUTHORIZED, self::AUTHORIZED, self::USER, self::MANAGER, self::ADMINISTRATOR]; - const ALL_REAL_ROLES = [self::USER, self::MANAGER, self::ADMINISTRATOR]; + const ALL_REAL_ROLES = [self::AUTHOR, self::EDITOR, self::USER, self::MANAGER, self::ADMINISTRATOR]; } \ No newline at end of file -- libgit2 0.21.4