aboutsummaryrefslogtreecommitdiffstats
path: root/admin.cgi
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-06-14 15:22:22 +1000
committerSimon Green <sgreen@redhat.com>2014-06-14 15:22:22 +1000
commit80c434b3c9afec9ba606e5061ef042d3b96720d3 (patch)
tree535d7785636b038ade627b082bd078c2764b7e2a /admin.cgi
parent6c6efdde5b5e041deb75f65b5a18baae7665d660 (diff)
downloadbugs-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar
bugs-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar.gz
bugs-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar.bz2
bugs-80c434b3c9afec9ba606e5061ef042d3b96720d3.tar.xz
bugs-80c434b3c9afec9ba606e5061ef042d3b96720d3.zip
Bug 1012508 - Add a admin_menu hook to change who has access to admin.cgi
r=gerv, a=sgreen
Diffstat (limited to 'admin.cgi')
-rwxr-xr-xadmin.cgi11
1 files changed, 1 insertions, 10 deletions
diff --git a/admin.cgi b/admin.cgi
index 0767b07a3..70a6aa20e 100755
--- a/admin.cgi
+++ b/admin.cgi
@@ -20,16 +20,7 @@ my $user = Bugzilla->login(LOGIN_REQUIRED);
print $cgi->header();
-$user->in_group('admin')
- || $user->in_group('tweakparams')
- || $user->in_group('editusers')
- || $user->can_bless
- || (Bugzilla->params->{'useclassification'} && $user->in_group('editclassifications'))
- || $user->in_group('editcomponents')
- || scalar(@{$user->get_products_by_permission('editcomponents')})
- || $user->in_group('creategroups')
- || $user->in_group('editkeywords')
- || $user->in_group('bz_canusewhines')
+$user->can_administer
|| ThrowUserError('auth_failure', {action => 'access', object => 'administrative_pages'});
$template->process('admin/admin.html.tmpl')