summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/User/APIKey.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/User/APIKey.pm b/Bugzilla/User/APIKey.pm
index f267b31f1..1b6980fbf 100644
--- a/Bugzilla/User/APIKey.pm
+++ b/Bugzilla/User/APIKey.pm
@@ -16,6 +16,7 @@ use parent qw(Bugzilla::Object);
use Bugzilla::Constants;
use Bugzilla::User;
use Bugzilla::Util qw(generate_random_password trim bz_crypt);
+use Bugzilla::Error;
#####################################################################
# Overriden Constants that are used as methods
@@ -89,9 +90,9 @@ sub set_revoked { $_[0]->set('revoked', $_[1]); }
sub set_banned {
my($self, $input) = @_;
- Bugzilla->user->in_group('admin')
+ Bugzilla->user->in_group('editusers')
|| ThrowUserError("auth_failure",
- {group => "admin", action => "run", object => "apikey"});
+ {group => "editusers", action => "run", object => "apikey"});
ThrowUserError("api_key_cannot_unban") if($self->banned() && !$input);
$self->set('banned', $input);