summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-06-14 07:22:22 +0200
committerSimon Green <sgreen@redhat.com>2014-06-14 07:22:22 +0200
commit80c434b3c9afec9ba606e5061ef042d3b96720d3 (patch)
tree535d7785636b038ade627b082bd078c2764b7e2a /extensions
parent6c6efdde5b5e041deb75f65b5a18baae7665d660 (diff)
downloadbugzilla-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar.gz
bugzilla-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar.xz
Bug 1012508 - Add a admin_menu hook to change who has access to admin.cgi
r=gerv, a=sgreen
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Example/Extension.pm12
1 files changed, 12 insertions, 0 deletions
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)};