Bug #24158
closedUnable to clone Organization admin role
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1597505
Description of problem:
Version-Release number of selected component (if applicable):
Build: Satellite 6.4 snap 10
How reproducible:
Always
Steps to Reproduce:
1. Go to roles
2. Clone Organization Admin role
3. Give a name to the new role, hit submit
From API end:
2018-07-02 16:45:25 - nailgun.client - DEBUG - Making HTTP GET request to https://sat-host/api/v2/roles with options {'data': '{"search": "name=\\"Organization admin\\""}', 'auth': ('admin', 'changeme'), 'verify': False, 'headers': {'content-type': 'application/json'}}, no params and no data.
2018-07-02 16:45:25 - nailgun.client - DEBUG - Received HTTP 200 response: {
"total": 37,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": "name=\"Organization admin\"",
"sort": {
"by": "name",
"order": "ASC"
},
"results": [{"builtin":0,"cloned_from_id":null,"name":"Organization admin","id":26,"description":null,"origin":"foreman"}]
}
2018-07-02 16:45:25 - nailgun.client - DEBUG - Making HTTP POST request to https://sat-host/api/v2/roles/26/clone with options {'auth': ('admin', 'changeme'), 'verify': False, 'headers': {'content-type': 'application/json'}}, no params and data {"role": {"name": "CnFoWBhmaC", "organization_ids": [71], "location_ids": [74]}}.
2018-07-02 16:45:32 - nailgun.client - WARNING - Received HTTP 422 response: {
"error": {"id":null,"errors":{"filters.permissions":["You must select at least one permission"]},"full_messages":["Permissions You must select at least one permission"]}
}
Actual results:
Nothing Happens, You stay on the same page
Expected results:
Additional info:
Updated by Marek Hulán over 6 years ago
- Subject changed from Unable to clone Organization admin role to Unable to clone Organization admin role
- Priority changed from High to Normal
Updated by Marek Hulán over 6 years ago
- Assignee set to Marek Hulán
- Translation missing: en.field_release set to 330
this makes cloning of roles unusable when there's a filter without permissions (e.g. plugins removed some permissions), the easy solution is to ignore empty filters on clone, long term (after branching) we should think of cleaning such filters
I propose to 1.18.0 or 1.18.1 if the fix won't make it in on time, please reset if you disagree
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5775 added
Updated by Marek Hulán over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f968c04292deb37d55fc02b8aae85e6a5072bf5a.
Updated by The Foreman Bot over 6 years ago
- Pull request https://github.com/theforeman/foreman/pull/5788 added