Bug 427926
Summary: | XMLRPC function getAllGroups | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Bugzilla | Reporter: | Noura El hawary <nelhawar> | ||||||
Component: | WebService | Assignee: | David Lawrence <dkl> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 3.2 | CC: | llu | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-12-01 22:52:42 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 406071, 406131, 427053 | ||||||||
Attachments: |
|
Description
Noura El hawary
2008-01-08 02:04:43 UTC
Currently in CVS and running on bz-web2-test. Worked 1 hour. Reopening as this was never converted to 3.2. Created attachment 320611 [details]
Patch to re-enable bugzilla.getAllGroups and also adds Group.get 3.X API (v1)
Attaching a patch that reenables the bugzilla.getAllGroups from 2.18 and uses
Bugzilla::Group->get_all. Also added new Bugzilla::WebService::Group which essentially adds a similar function but uses the 3.X API and also allows for filtering group list by ids or names.
Please review
Dave
Created attachment 320613 [details]
Patch to re-enable bugzilla.getAllGroups and also adds Group.get 3.X API (v2)
Oops, left out needed changes to xmlrpc.cgi in the last patch. Submitting fixed patch for review.
Comment on attachment 320613 [details] Patch to re-enable bugzilla.getAllGroups and also adds Group.get 3.X API (v2) Hi Dave, Patch looks good to me tested it and it works fine, only few comments inline. > >Index: Bugzilla/WebService/Group.pm >=================================================================== >+=item B<Errors> >+ >+=over >+ >+=item 51 (Invalid Object) >+ >+A non existing group name was passed to the function, as a result no >+group object existed for that invalid name. >+ I think we can also add here an error for the case if the user is not in the creatgroups group as the following: =item 304 (Authorization Required) Logged-in users are not authorized to edit bugzilla groups as they are not members of the creategroups group in bugzilla. >+=back >+ >+=back >+ >+=back >+ >Index: extensions/compat_xmlrpc/code/webservice.pl >=================================================================== >+sub getAllGroups { >+ my ($self, $username, $password) = @_; >+ >+ # Try to login if $username and $password provided. >+ xmlrpc_client_login($username, $password, LOGIN_REQUIRED); >+ >+ $logger->debug("Starting: $username"); >+ >+ Bugzilla->user->in_group('editusers') I think this should be Bugzilla->user->in_group('creategroups'); >+ || ThrowUserError("auth_failure", {group => "creategroups", >+ action => "edit", >+ object => "groups"}); >+ > Thanks Noura. Committed to CVS. |