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
c81a842c
Commit
c81a842c
authored
Feb 07, 2016
by
Matt Tyson
Committed by
Frédéric Buclin
Feb 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1237161: Allow users with bless permissions to update users group membership using WebService
r=LpSolit a=dkl
parent
8c54443d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
User.pm
Bugzilla/API/1_0/Resource/User.pm
+3
-0
User.pm
Bugzilla/WebService/User.pm
+9
-1
user.rst
docs/en/rst/api/core/v1/user.rst
+4
-0
No files found.
Bugzilla/API/1_0/Resource/User.pm
View file @
c81a842c
...
...
@@ -326,6 +326,7 @@ sub update {
# Reject access if there is no sense in continuing.
$user
->
in_group
(
'editusers'
)
||
$user
->
can_bless
()
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"editusers"
,
action
=>
"edit"
,
object
=>
"users"
});
...
...
@@ -343,6 +344,8 @@ sub update {
delete
$values
->
{
ids
};
$dbh
->
bz_start_transaction
();
$values
=
{
groups
=>
$values
->
{
groups
}
}
unless
$user
->
in_group
(
'editusers'
);
foreach
my
$user
(
@$user_objects
){
$user
->
set_all
(
$values
);
}
...
...
Bugzilla/WebService/User.pm
View file @
c81a842c
...
...
@@ -275,6 +275,7 @@ sub update {
# Reject access if there is no sense in continuing.
$user
->
in_group
(
'editusers'
)
||
$user
->
can_bless
()
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"editusers"
,
action
=>
"edit"
,
object
=>
"users"
});
...
...
@@ -292,6 +293,8 @@ sub update {
delete
$values
->
{
ids
};
$dbh
->
bz_start_transaction
();
$values
=
{
groups
=>
$values
->
{
groups
}
}
unless
$user
->
in_group
(
'editusers'
);
foreach
my
$user
(
@$user_objects
){
$user
->
set_all
(
$values
);
}
...
...
@@ -709,7 +712,12 @@ B<EXPERIMENTAL>
=item B<Description>
Updates user accounts in Bugzilla.
Updates user accounts in Bugzilla. To use this method, you must be a member
of the C<editusers> group.
If you are not in the C<editusers> group, you may
add or remove users from groups if you have bless permissions for the groups
you wish to modify. All other changes will be ignored.
=item B<REST>
...
...
docs/en/rst/api/core/v1/user.rst
View file @
c81a842c
...
...
@@ -162,6 +162,10 @@ Update User
Updates an existing user account in Bugzilla. You must be authenticated and be
in the *editusers* group to perform this action.
If you are not in the *editusers* group, you may add or remove users from groups
if you have bless permissions for the groups you wish to modify. All other changes
will be ignored.
**Request**
.. code-block:: text
...
...
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