Closed Bug 469196 Opened 17 years ago Closed 11 years ago

WebService function to update a user's group membership

Categories

(Bugzilla :: WebService, enhancement)

3.1.1
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: doug, Assigned: mail)

References

Details

Attachments

(1 file)

Looking for a way to update an existing user's group membership. We commonly have existing users that we would like to assign to new groups for product privileges and automating this would speed up project creation. This is for use at Mozdev so we can help test/debug/develop the extensions as well.
I suspect this should be an extension to User.update, after User.update is done. (We don't yet have a bug for User.update, so we'd want to have one and make this bug depend on that one.)
OS: Linux → All
Hardware: PC → All
Depends on: 416137
Depends on: 442013
Assignee: webservice → sgreen
Status: NEW → ASSIGNED
Surely it can't be this easy? :) The change in Bugzilla/User.pm, was so that add/remove is per documentation. editusers.cgi only uses the set option, so didn't need to be changed.
Attachment #8444179 - Flags: review?(glob)
Comment on attachment 8444179 [details] [diff] [review] bug469196-v1.patch Review of attachment 8444179 [details] [diff] [review]: ----------------------------------------------------------------- r=glob this code looks good, however the documentation needs some fixing which can happen prior to commit. ::: Bugzilla/WebService/User.pm @@ +765,5 @@ > +=item C<set_bless_groups> > + > +C<hash> - This is the same as set_groups, but affects what groups a user > +has direct membership to bless that group. It takes the same inputs as > +set_groups. "set_groups" doesn't make any sense in this context as it isn't a webservice method. you probably want "groups".
Attachment #8444179 - Flags: review?(glob) → review+
this needs a relnote for extensions which may be calling $user->set_group() with removed/added.
Flags: approval+
Keywords: relnote
Target Milestone: --- → Bugzilla 5.0
(In reply to Byron Jones ‹:glob› from comment #5) > this needs a relnote for extensions which may be calling $user->set_groups() > with removed/added. simon pointed out that set_groups was added in bug 442013, so it isn't part of any stable bugzilla version. no need to relnote this change.
Keywords: relnoteAPIchange
Keywords: APIchange
(In reply to Byron Jones ‹:glob› from comment #4) > Comment on attachment 8444179 [details] [diff] [review] > bug469196-v1.patch > > Review of attachment 8444179 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=glob > > this code looks good, however the documentation needs some fixing which can > happen prior to commit. > > ::: Bugzilla/WebService/User.pm > @@ +765,5 @@ > > +=item C<set_bless_groups> > > + > > +C<hash> - This is the same as set_groups, but affects what groups a user > > +has direct membership to bless that group. It takes the same inputs as > > +set_groups. > > "set_groups" doesn't make any sense in this context as it isn't a webservice > method. > you probably want "groups". Correct. I removed the three occurrences of set_ in the above code. It was copied and pasted straight from Bugzilla/User.pm. To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git dbd6f8f..2db0429 master -> master
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: