Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-1698

Add permission check for roles and create role screens

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • UI
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Problem Description: Users with group permissions can visit `/ui/roles` and /ui/roles/create` which results in permission error.

      Reproduce:
      1. create user `testuser`
      2. create group `testgroup`
      3. add `testuser` to `testgroup`
      4. assign the existing role `galaxy.group_admin` to `testgroup` (or create a role with group permission `View group` and assign it to `testgroup`)
      5. login as `testuser`
      6. visit `/ui/roles` or `/ui/roles/create`

      Proposed Solution: Users shouldn't be able to visit `/ui/roles` and /ui/roles/create`, only the superuser and admin should be able to do this. The user should be redirected to the `You do not have permission to perform this action` screen. Menu item `Roles`  in the sidebar should be hidden as well.

              jjerabek@redhat.com Jiri Jerabek
              jjerabek@redhat.com Jiri Jerabek
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Resolved:
                Archived: