Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
f9a3ffaf
Commit
f9a3ffaf
authored
Dec 18, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1232190: FlagType.create should require the user to be logged in
r=dkl
parent
fbd124bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
FlagType.pm
Bugzilla/API/1_0/Resource/FlagType.pm
+3
-7
FlagType.pm
Bugzilla/WebService/FlagType.pm
+3
-7
No files found.
Bugzilla/API/1_0/Resource/FlagType.pm
View file @
f9a3ffaf
...
...
@@ -114,11 +114,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"
,
...
...
@@ -174,11 +172,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"
,
...
...
Bugzilla/WebService/FlagType.pm
View file @
f9a3ffaf
...
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment