Skip to content

Commit

Permalink
Fix ACL for the app
Browse files Browse the repository at this point in the history
  • Loading branch information
phecho committed Apr 11, 2017
1 parent 54bab1a commit e2cb88b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,23 @@ public function getApplicationAccessMap()
$acl->setRoleHierarchy(Role::APP_MANAGER, [Role::APP_USER, Role::APP_PUBLIC]);
$acl->setRoleHierarchy(Role::APP_USER, [Role::APP_PUBLIC]);

$acl->add('Auth/AuthController', ['login', 'check'], Role::APP_PUBLIC);
$acl->add('CaptchaController', '*', Role::APP_PUBLIC);
$acl->add('Auth/PasswordResetController', '*', Role::APP_PUBLIC);
$acl->add('Task/TaskController', 'readonly', Role::APP_PUBLIC);
$acl->add('Project/Board/BoardController', 'readonly', Role::APP_PUBLIC);
$acl->add('ICalendarController', '*', Role::APP_PUBLIC);
$acl->add('FeedController', '*', Role::APP_PUBLIC);

$acl->add('Auth/AuthController', ['login', 'check'], Role::APP_PUBLIC);
$acl->add('Auth/PasswordResetController', '*', Role::APP_PUBLIC);

$acl->add('Profile/AvatarController', ['show', 'image'], Role::APP_PUBLIC);
$acl->add('Project/ProjectController', ['create', 'gantt', 'updateDate'], Role::APP_MANAGER);
$acl->add('Project/ProjectUserOverviewController', '*', Role::APP_MANAGER);
$acl->add('Profile/TwoFactorController', 'disable', Role::APP_ADMIN);

$acl->add('Project/ProjectController', ['create', 'gantt', 'updateDate'], Role::APP_MANAGER);
$acl->add('Project/Board/BoardController', 'readonly', Role::APP_PUBLIC);

$acl->add('Task/TaskController', 'readonly', Role::APP_PUBLIC);

$acl->add('Manage/ProjectUserOverviewController', '*', Role::APP_MANAGER);

$acl->add('Admin/AdminController', '*', Role::APP_ADMIN);
$acl->add('Admin/SettingController', '*', Role::APP_ADMIN);
$acl->add('Admin/TagController', '*', Role::APP_ADMIN);
Expand Down

0 comments on commit e2cb88b

Please sign in to comment.