Project

General

Profile

Bug #33656

Cloned viewer role cannot view facts

Added by Dominik Matoulek over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

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

Description of problem:

When the customer assigns the Viewer role to a non-admin user, that user can browse to Monitor > Facts to view a list of facts in Foreman. However, when the customer removes the Viewer role from that non-admin user, clones the Viewer role and assigns the new (ostensibly identical) role to that same non-admin user and then logs into Foreman with that user, that user is unable to browse to Monitor > Facts to view a list of facts in Foreman.

Furthermore, simply adding the "view_facts" permission to a new role also fails to grant this access. The built-in Viewer role appears to be the only way to grant non-admin users access to Monitor > Facts in the Foreman web UI.

How reproducible:

100% of the time

Steps to Reproduce:
method 1:
1. clone the viewer role
2. assign the new role to a new user
3. log into satellite as the new user
4. browse to monitor > facts

method 2 (failed workaround):
1. create a new role with permission view_facts
2. assign that role to a new user
3. log into satellite as the new user
4. browse to monitor > facts

Actual results:

The list of facts is empty.

Expected results:

The list of facts should appear the same for the non-admin user with these permissions as it does for an admin user.


Related issues

Is duplicate of Foreman - Bug #30377: Assigning location and organization to a role causes a malfunction to the filter function "facts"New

Associated revisions

Revision 0d6eab65 (diff)
Added by Dominik Matoulek over 1 year ago

Fixes #33656 - FactValue search by org and loc

Updating scoped search for Organizations and Locations relation at FactValue model. Current implementation doesn't work well because it produces bad SQL query. This PR fix this behavior by bypassing this relation at scoped search straight to Host relation.

History

#1 Updated by Dominik Matoulek over 1 year ago

  • Triaged changed from No to Yes
  • Assignee set to Dominik Matoulek
  • Subject changed from Cloned viewer role cannot view facts to Cloned viewer role cannot view facts

#2 Updated by Dominik Matoulek over 1 year ago

  • Description updated (diff)

#3 Updated by The Foreman Bot over 1 year ago

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

#4 Updated by Dominik Matoulek over 1 year ago

  • Is duplicate of Bug #30377: Assigning location and organization to a role causes a malfunction to the filter function "facts" added

#5 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.2.0 added

#6 Updated by Dominik Matoulek over 1 year ago

  • Status changed from Ready For Testing to Closed

#7 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.1.1 added

#8 Updated by Amit Upadhye over 1 year ago

  • Fixed in Releases 3.1.0 added
  • Fixed in Releases deleted (3.1.1)

Also available in: Atom PDF