Project

General

Profile

Actions

Bug #32213

closed

changing "admin" parameter of user-group with non-admin user is accepted but nothing changed

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1848981

Description of problem:
When trying to update "admin" parameter of user-group with non-admin user change is accepted, but nothing happen.
WebUI seems already prepared as when trying the same with non-admin user checkbox for Administrator is not visible

How reproducible: Always

Steps to Reproduce:
1. Create non-admin user with roles below

view_filters, create_filters, edit_filters, destroy_filters
view_usergroups, create_usergroups, edit_usergroups, destroy_usergroups view_roles, create_roles, edit_roles, destroy_roles
view_external_usergroups, create_external_usergroups, edit_external_usergroup, destroy_external_usergroups
view_bookmarks, create_bookmarks, edit_bookmarks, destroy_bookmarks
attach_subscriptions, unattach_subscriptions
escalate_roles
view_organizations
view_authenticators

2. Create new usergroup
3. Attempt to change "admin" parameter of user-group with hammer or API as below

  1. hammer --config /root/.hammer/non_admin_user_config.yml user-group update --id 1 --admin 1

or

  1. curl -X PUT -H "Content-Type: application/json" -u user:password -d \'{"admin": \'1\'}\' https://`hostname -f`/api/usergroups/1/

Actual results:
hammer: User group [group] updated.
API: {"admin":false,"created_at":"2020-06-16 14:10:11 UTC","updated_at":"2020-06-16 14:27:08 UTC","name":"group","id":1,"external_usergroups":[],"usergroups":[],"users":[],"roles":[]}

Expected results:
Not allowing operation with non-admin user and show warning message.'

Actions #1

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/8414 added
Actions #2

Updated by The Foreman Bot almost 3 years ago

  • Fixed in Releases 2.5.0 added
Actions #3

Updated by Marek Hulán almost 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Tomer Brisker almost 3 years ago

  • Category set to Users, Roles and Permissions
Actions

Also available in: Atom PDF