Project

General

Profile

Actions

Bug #24158

closed

Unable to clone Organization admin role

Added by Marek Hulán almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Fixed in Releases:
Found in Releases:

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:

Actions #1

Updated by Marek Hulán almost 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
Actions #2

Updated by Marek Hulán almost 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

Actions #3

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5775 added
Actions #4

Updated by Marek Hulán almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by The Foreman Bot almost 6 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5788 added
Actions

Also available in: Atom PDF