bzr branch
/bugzilla/trunk
| Line | Revision | Contents |
| 1 | 5012 | #!/usr/bin/perl -wT |
| 2 | 8075 | # This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
| 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
| 5 | # |
|
| 6 | # This Source Code Form is "Incompatible With Secondary Licenses", as |
|
| 7 | # defined by the Mozilla Public License, v. 2.0. |
|
| 8 | 5012 | |
| 9 | use strict; |
|
| 10 | ||
| 11 | 5304 | use lib qw(. lib); |
| 12 | 5012 | |
| 13 | use Bugzilla; |
|
| 14 | use Bugzilla::Constants; |
|
| 15 | use Bugzilla::Error; |
|
| 16 | ||
| 17 | my $cgi = Bugzilla->cgi; |
|
| 18 | my $template = Bugzilla->template; |
|
| 19 | my $user = Bugzilla->login(LOGIN_REQUIRED); |
|
| 20 | ||
| 21 | print $cgi->header(); |
|
| 22 | ||
| 23 | $user->in_group('admin') |
|
| 24 | || $user->in_group('tweakparams') |
|
| 25 | || $user->in_group('editusers') |
|
| 26 | || $user->can_bless |
|
| 27 | || (Bugzilla->params->{'useclassification'} && $user->in_group('editclassifications')) |
|
| 28 | || $user->in_group('editcomponents') |
|
| 29 | || scalar(@{$user->get_products_by_permission('editcomponents')}) |
|
| 30 | || $user->in_group('creategroups') |
|
| 31 | || $user->in_group('editkeywords') |
|
| 32 | || $user->in_group('bz_canusewhines') |
|
| 33 | || ThrowUserError('auth_failure', {action => 'access', object => 'administrative_pages'}); |
|
| 34 | ||
| 35 | $template->process('admin/admin.html.tmpl') |
|
| 36 | || ThrowTemplateError($template->error()); |
Loggerhead 1.18.1 is a web-based interface for Bazaar branches