diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-01-11 13:53:42 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-01-11 13:53:42 +0000 |
commit | dad868138289b628ac579bdfe8380a8fe3d858e1 (patch) | |
tree | e0a9e98f2d9838414aed789b45826455ac64ce46 | |
parent | 83712d945d9067edd966f6885da1598f72c18209 (diff) |
Bit of admin permissioning for Zurich.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 7200cedb8..d70e785d7 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -39,6 +39,34 @@ sub show_unconfirmed_reports { } # Specific administrative displays + +sub admin_pages { + my $self = shift; + my $c = $self->{c}; + + my $type = $c->stash->{admin_type}; + my $pages = { + 'summary' => [_('Summary'), 0], + 'reports' => [_('Reports'), 2], + 'report_edit' => [undef, undef], + 'update_edit' => [undef, undef], + }; + return $pages if $type eq 'sdm'; + + $pages = { %$pages, + 'bodies' => [_('Bodies'), 1], + 'body' => [undef, undef], + 'body_edit' => [undef, undef], + }; + return $pages if $type eq 'dm'; + + $pages = { %$pages, + 'users' => [_('Users'), 3], + 'user_edit' => [undef, undef], + }; + return $pages if $type eq 'super'; +} + sub admin_type { my $self = shift; my $c = $self->{c}; |