diff --git a/bugzilla/base.py b/bugzilla/base.py index 9925850..54c89d5 100644 --- a/bugzilla/base.py +++ b/bugzilla/base.py @@ -354,7 +354,7 @@ class BugzillaBase(object): def _query(self,query): '''IMPLEMENT ME: Query bugzilla and return a list of matching bugs.''' raise NotImplementedError - def _updateperms(self,user,action,group) + def _updateperms(self,user,action,group): '''IMPLEMEMT ME: Update Bugzilla user permissions''' raise NotImplementedError @@ -648,15 +648,15 @@ class BugzillaBase(object): bug_id = self._createbug(**data) return Bug(self,bug_id=bug_id) # Trivia: this method has ~5.8 lines of comment per line of code. Yow! - def updateperms(self,user,action,group): + def updateperms(self,user,action,groups): '''A method to update the permissions (group membership) of a bugzilla user. Takes the following: user: The e-mail address of the user to be acted upon action: either add or rem - group: the group to be added to (i.e. fedora_contrib)''' - self._perms = self._updateperms(user,action,group) - return self._perms + groups: list of groups to be added to (i.e. ['fedora_contrib']) + ''' + self._updateperms(user,action,groups) class CookieResponse: '''Fake HTTPResponse object that we can fill with headers we got elsewhere. diff --git a/bugzilla/rhbugzilla.py b/bugzilla/rhbugzilla.py index 7e58a01..8eeed0d 100644 --- a/bugzilla/rhbugzilla.py +++ b/bugzilla/rhbugzilla.py @@ -327,9 +327,9 @@ class RHBugzilla(bugzilla.base.BugzillaBase): r = self._proxy.bugzilla.createBug(data) return r[0] # Methods for updating a user - def _updateperms(self,user,action,group): - r = self._proxy.bugzilla.updatePerms(user,action,group) - return r[0] + def _updateperms(self,user,action,groups): + r = self._proxy.bugzilla.updatePerms(user, action, groups, self.user) + return r class RHBugzilla3(Bugzilla32, RHBugzilla): '''Concrete implementation of the Bugzilla protocol. This one uses the