Bug 1004396 - [RFE] role names do not allow / in them
Summary: [RFE] role names do not allow / in them
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On: 1004335
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 14:24 UTC by Tom McKay
Modified: 2017-03-30 19:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1004335
Environment:
Last Closed: 2017-03-30 19:27:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tom McKay 2013-09-04 14:24:30 UTC
+++ This bug was initially created as a clone of Bug #1004335 +++

Description of problem:
You are unable to transfer organization with "/" in name using Splice and what is worse, when you attempt to, you get your SAM to inconsistent state.


Version-Release number of selected component (if applicable):
SAM 1.3 snapshot #4
katello-headpin-all-1.4.3-11.el6sam_splice.noarch
spacewalk-splice-tool-0.40-1.el6sam.noarch
splice-0.144-1.el6sam.noarch
ruby193-rubygem-splice_reports-0.0.8-1.el6sam.noarch


How reproducible:
always


Steps to Reproduce:
1. On Satellite 5.6.0 create organization to "AC/DC"
2. Setup sync through Splice to SAM 1.3 snapshot #4
3. As swreport user run spacewalk-splice-checkin


Actual results:
Traceback (most recent call last):
  File "/usr/bin/spacewalk-splice-checkin", line 97, in <module>
    checkin.main(opts)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main
    spacewalk_sync(options)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 139, in spacewalk_sync
    kps.update_owners(org_list)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 66, in update_owners
    self.katello_client.create_org_admin_role_permission(kt_org_label=orgs[org_id])
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 227, in create_org_admin_role_permission
    role = self.rolesapi.create(name="Org Admin Role for %s" % kt_org_label, description="generated from spacewalk")
  File "/usr/lib/python2.6/site-packages/katello/client/api/user_role.py", line 30, in create
    return self.server.POST(path, {"role": data})[1]
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 454, in POST
    return self._request('POST', path, body=body, multipart=multipart, custom_headers=custom_headers)
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 250, in _request
    return self._process_response(connection.getresponse())
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 308, in _process_response
    raise ServerRequestError(response.status, response_body, None)
katello.client.server.ServerRequestError: (422, {u'displayMessage': u'Validation failed: Name cannot contain characters >, <, or /', u'errors': [u'Validation failed: Name cannot contain characters >, <, or /']}, None)


Expected results:
Should work


Additional info:
Problem is, that once you run this again, you will get:
Traceback (most recent call last):
  File "/usr/bin/spacewalk-splice-checkin", line 97, in <module>
    checkin.main(opts)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 206, in main
    spacewalk_sync(options)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 141, in spacewalk_sync
    kps.update_roles(sw_user_list)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 166, in update_roles
    self.katello_client.grant_org_admin(kt_user=kt_users[kt_username], kt_org_label=sw_user_org)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 239, in grant_org_admin
    self.userapi.assign_role(user_id=kt_user['id'], role_id=oa_role['id'])
TypeError: 'NoneType' object is unsubscriptable

This is because role for this organization do not exist.

Comment 2 Bryan Kearney 2017-03-30 19:27:46 UTC
Thank you for your bug report. Given our other priorities, I do not see us addressing this in the next few releases. I am therefore closing this out. If you feel that this is a mistake, please feel free to re-open with additional information. Thank you for your interest in Red Hat Satellite.


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