Bug 973819

Summary: channel.software.syncRepo requires org_admin role
Product: [Community] Spacewalk Reporter: Shannon Hughes <shughes>
Component: APIAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.9CC: cperry, jpazdziora, shughes, tkasparek, xdmoon
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 973363 Environment:
Last Closed: 2013-08-05 06:36:38 UTC Type: Bug
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: 991452    
Attachments:
Description Flags
patch to allow channel admins to sync repos none

Description Shannon Hughes 2013-06-12 20:31:40 UTC
+++ This bug was initially created as a clone of Bug #973363 +++

Description of problem:

api calls to the channel.software.syncRepo method require the user to have org admin role where the other channel api calls require channel_admin

Traceback (most recent call last):
  File "syncRepo-cron.py", line 8, in <module>
    result = client.channel.software.syncRepo(key,'vmware-tools-rhel5','0 * * * * ?')
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: You do not have permissions to perform this action. You need to have atleast a Organization Administrator role to perform this action'>

On close inspection we are sending over an async call to taskomatic api where we check specifically for org admin role. 

was going to create a patch to allo repo syncs to allow channel admin role

--- Additional comment from Shannon Hughes on 2013-06-12 11:00:18 EDT ---

proposal to allow channel admin roles to sync repos

Comment 1 Shannon Hughes 2013-06-12 20:32:36 UTC
Created attachment 760315 [details]
patch to allow channel admins to sync repos

patch to allow channel admins to sync repos

Comment 3 Tomáš Kašpárek 2013-06-18 11:12:23 UTC
committed patch into spacewalk.git: 5a587d683c527ca6b270d3bb83f73a456fbae4b6

Comment 5 Tomáš Kašpárek 2013-08-05 06:36:38 UTC
Fix for this issue is fixed in Spacewalk 2.0 therefore closing this as CURRENTRELEASE.