aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-12-18 12:53:50 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-12-18 12:53:50 +0100
commitfb4f6f7b1574be030d7f592be91771905d00a620 (patch)
tree10f1ecdff5c248a679e502526ed6716499c312b0 /Bugzilla
parentb77d2178be56354b76a91c14b0dbe6bbccb1cec7 (diff)
downloadbugs-fb4f6f7b1574be030d7f592be91771905d00a620.tar
bugs-fb4f6f7b1574be030d7f592be91771905d00a620.tar.gz
bugs-fb4f6f7b1574be030d7f592be91771905d00a620.tar.bz2
bugs-fb4f6f7b1574be030d7f592be91771905d00a620.tar.xz
bugs-fb4f6f7b1574be030d7f592be91771905d00a620.zip
Bug 1232190: FlagType.create should require the user to be logged in
r/a=dkl
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/WebService/FlagType.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/Bugzilla/WebService/FlagType.pm b/Bugzilla/WebService/FlagType.pm
index 9723d4735..9d7cce037 100644
--- a/Bugzilla/WebService/FlagType.pm
+++ b/Bugzilla/WebService/FlagType.pm
@@ -61,11 +61,9 @@ sub get {
sub create {
my ($self, $params) = @_;
+ my $user = Bugzilla->login(LOGIN_REQUIRED);
- my $dbh = Bugzilla->dbh;
- my $user = Bugzilla->user;
-
- Bugzilla->user->in_group('editcomponents')
+ $user->in_group('editcomponents')
|| scalar(@{$user->get_products_by_permission('editcomponents')})
|| ThrowUserError("auth_failure", { group => "editcomponents",
action => "add",
@@ -121,11 +119,9 @@ sub create {
sub update {
my ($self, $params) = @_;
-
my $dbh = Bugzilla->dbh;
- my $user = Bugzilla->user;
+ my $user = Bugzilla->login(LOGIN_REQUIRED);
- Bugzilla->login(LOGIN_REQUIRED);
$user->in_group('editcomponents')
|| scalar(@{$user->get_products_by_permission('editcomponents')})
|| ThrowUserError("auth_failure", { group => "editcomponents",