Bug #5673

As a user wishing to manage roles and users, I cannot easily remove a role.

Added by Eric Helms almost 3 years ago. Updated 5 months ago.

Status:Closed
Priority:Normal
Assigned To:Shlomi Zadok
Category:Authorization
Target version:Team Marek Iteration 4
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/3922
Story points-
Velocity based estimate-
Release1.14.0Release relationshipAuto

Description

This issues manifests itself in two forms:

1. If I have Role A, being used by User B and I attempt to delete Role A, I am presented with an error message "Role is still in use".
2. If I have Role A being used by 25 users, and I wish to delete Role A, I must find every user using Role A, remove the Role from each individual user and then delete the role.

Associated revisions

Revision a2c1e8db
Added by Shlomi Zadok 5 months ago

Fixes #5673 - Allow deletion of role with users

History

#1 Updated by Dominic Cleal almost 3 years ago

  • Category set to Authorization

#2 Updated by Marek Hulán almost 3 years ago

Just for the record, users could be search by role using filter "role = $name" but that is also inconvenient

#3 Updated by Marek Hulán 7 months ago

  • Target version set to Team Marek backlog

#4 Updated by Marek Hulán 6 months ago

  • Target version changed from Team Marek backlog to Team Marek Iteration 3

#5 Updated by Marek Hulán 5 months ago

  • Target version changed from Team Marek Iteration 3 to Team Marek Iteration 4

#6 Updated by Marek Hulán 5 months ago

  • Assigned To set to Shlomi Zadok

#7 Updated by Daniel Lobato Garcia 5 months ago

We have had this problem with Organizations/Locations too, where removing them is a real PITA (find all objects associated), Environments, and proxies... If we can have a 'generic' approach to this operation that we can apply with any object that deleting it leaves orphans that have to be fixed, that'd be great

#8 Updated by Shlomi Zadok 5 months ago

@Daniel, I think that this use-case is a whole lot different than with Organizations / Locations.
With Role, it is a simple delete, which removes the user_roles association, and does not leave an orphan

#9 Updated by The Foreman Bot 5 months ago

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

#10 Updated by Shlomi Zadok 5 months ago

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

#11 Updated by Dominic Cleal 5 months ago

  • Release set to 1.14.0

Also available in: Atom PDF