Project

General

Profile

Refactor #15621

Change role builtin attribute to boolean

Added by Himanshu Prakash almost 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Authorization
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Description of problem:
On cloning an user role, builtin parameter is set to null, causing the role to be treat as 'builtin' (unable to remove it) despite the fact, that API reports builtin: no

Version-Release number of selected component (if applicable):
6.2.0 beta GA17.0

How reproducible:
always

Steps to Reproduce:
1. navigate to Administer -> Roles
2. choose/create one of the roles which are not set as 'builtin' (in UI they are clickable)
3. clone them

Actual results:
Newly created role displayed as builtin despite the fact that `hammer role info` reports on it as 'builtin: no'.

listing the roles using API (curl -k https://<sat6>/api/v2/roles) shows, that the 'builtin' parameter is set to null.

Expected results:
'builtin' parameter defaults to 'false'


Related issues

Related to Foreman - Bug #15108: Cloned role has no builtin valueClosed2016-05-20
Related to Foreman - Bug #16828: Cloned roles should have `builtin` value 0Closed2016-10-07

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #15108: Cloned role has no builtin value added

#2 Updated by Dominic Cleal almost 4 years ago

This was reported already at #15108, and has been fixed in Foreman 1.12.0.

#3 Updated by The Foreman Bot almost 4 years ago

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

#4 Updated by Marek Hulán almost 4 years ago

  • Subject changed from WebUI - Cloned roles saved with nil value for builtin attribute to Change role builtin attribute to boolean
  • Category set to Authorization

The original bug was solved as part of other change, meanwhile a PR for this issue was opened changing the builtin flag to boolean which long term seems as a good move so I'm changing the subject of this issue to reflect the PR.

#5 Updated by Dominic Cleal about 3 years ago

  • Related to Bug #16828: Cloned roles should have `builtin` value 0 added

#6 Updated by Dominic Cleal about 3 years ago

  • Tracker changed from Bug to Refactor
  • Status changed from Ready For Testing to New
  • Pull request deleted (https://github.com/theforeman/foreman/pull/3630)

PR closed due to inactivity.

Also available in: Atom PDF