Bug 502099 - Trying to remove "admin" from systemgroup admin list returns success even though admin is not removed
Summary: Trying to remove "admin" from systemgroup admin list returns success even tho...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: Sayli Karmarkar
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2009-05-21 20:52 UTC by Sayli Karmarkar
Modified: 2009-09-10 19:55 UTC (History)
2 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:55:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sayli Karmarkar 2009-05-21 20:52:17 UTC
Description of problem:

Create a system group foobar

>>> server.systemgroup.addOrRemoveAdmins(key, "foobar", ["admin"], 0)
1

Expected results:
Error message saying:
"Satellite admin cannot be removed from systemgroup administrator list"

Comment 1 Brad Buckingham 2009-05-27 15:36:43 UTC
This issue will actually apply to both Satellite and Organization administrators; therefore, the updates will address both.  Also, since this capability isn't something that can be added/removed to those users, the exception will be generated for both add & remove.

Since the api (addOrRemoveAdmins) applies to multiple users, if any of those users is a Sat/Org admin, the exception will be generated and no users will be updated.  

Also, the exception will generate an error like:

Changing administrator access is not allowed for Satellite and Organization Administrators.  These users are granted access by default; therefore, the following users should be removed from the input: user1, user2.

Comment 2 Brad Buckingham 2009-05-27 18:00:33 UTC
master git commit: a04981236fd4315535c85b8b68ce786d04806933
vader git commit: 5e3ebb7927f16f4f745eb68ddbb9d3224f62865c

Comment 3 Sayli Karmarkar 2009-06-03 00:42:16 UTC
verified.

>>> server.systemgroup.addOrRemoveAdmins(key, "foobar", ["foobar","admin"], 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 2202: 'redstone.xmlrpc.XmlRpcFault: Changing administrator access is not allowed for Satellite and Organization administrators.  These users are granted access by default; therefore, the following users should be removed from the input: admin'>

Comment 4 Milan Zázrivec 2009-08-21 11:39:36 UTC
Verified in stage -> RELEASE_PENDING

Comment 5 Brandon Perkins 2009-09-10 19:55:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html


Note You need to log in before you can comment on or make changes to this bug.