diff options
| author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-08 13:53:16 +0100 |
|---|---|---|
| committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-09 16:36:06 +0100 |
| commit | a86124e579dd23d04a3539358cc3b9c77f474b11 (patch) | |
| tree | 62b235e8d7042c38bd3794e9d5c695bcbcd37b1e /perllib/FixMyStreet/Cobrand/Default.pm | |
| parent | b09ed851c874ac9abd8fb94d9ef995e828a628da (diff) | |
Add new category_edit restriction for viewing body admin.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
| -rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 8e170458a..47e577372 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -644,10 +644,8 @@ sub admin_pages { my $pages = { 'summary' => [_('Summary'), 0], - 'bodies' => [_('Bodies'), 1], 'timeline' => [_('Timeline'), 5], 'stats' => [_('Stats'), 8], - 'body' => [undef, undef], }; # There are some pages that only super users can see @@ -656,6 +654,10 @@ sub admin_pages { $pages->{config} = [ _('Configuration'), 9]; }; # And some that need special permissions + if ( $user->is_superuser || $user->has_body_permission_to('category_edit') ) { + $pages->{bodies} = [ _('Bodies'), 1 ]; + $pages->{body} = [ undef, undef ]; + } if ( $user->is_superuser || $user->has_body_permission_to('report_edit') ) { $pages->{reports} = [ _('Reports'), 2 ]; $pages->{report_edit} = [ undef, undef ]; @@ -726,6 +728,7 @@ sub available_permissions { user_assign_areas => _("Assign users to areas"), # future use }, _("Bodies") => { + category_edit => _("Add/edit problem categories"), template_edit => _("Add/edit response templates"), responsepriority_edit => _("Add/edit response priorities"), }, |
