From 80c434b3c9afec9ba606e5061ef042d3b96720d3 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sat, 14 Jun 2014 15:22:22 +1000 Subject: Bug 1012508 - Add a admin_menu hook to change who has access to admin.cgi r=gerv, a=sgreen --- extensions/Example/Extension.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'extensions') diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 22a3103c2..c9449d8b0 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -31,6 +31,18 @@ use constant REL_EXAMPLE => -127; our $VERSION = '1.0'; +sub user_can_administer { + my ($self, $args) = @_; + my $can_administer = $args->{can_administer}; + + # If you add an option to the admin pages (e.g. by using the Hooks in + # template/en/default/admin/admin.html.tmpl), you may want to allow + # users in another group view admin.cgi + #if (Bugzilla->user->in_group('other_group')) { + # $$can_administer = 1; + #} +} + sub admin_editusers_action { my ($self, $args) = @_; my ($vars, $action, $user) = @$args{qw(vars action user)}; -- cgit v1.2.3-24-g4f1b