Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1677469 - Filter Fact value with permission view_facts does not take unlimited option in Roles
Summary: Filter Fact value with permission view_facts does not take unlimited option i...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.5.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-15 03:11 UTC by Neha Samant
Modified: 2019-11-21 09:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-21 09:38:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
filter with restrictive criteria (80.39 KB, image/png)
2019-02-19 09:32 UTC, hprakash
no flags Details

Description Neha Samant 2019-02-15 03:11:22 UTC
Description of problem:

Filter Fact value with permission view_facts does not take the unlimited option in Roles

Version-Release number of selected component (if applicable):
6.5.0

How reproducible:
Try creating a role using the Fact value filter.

Steps to Reproduce:
On Satellite WebUI => Administer => Roles => Select a Role => Filter => New Filter => Fact value => view_fats => check (tick) the unlimited option => Save 

Actual results:
The unlimited option is not ticked when we save the filter, but no error is shown.

Expected results:

The unlimited option should be ticked when we save the filter


Additional info:

Comment 1 Neha Samant 2019-02-15 03:13:35 UTC
Created attachment 1535027 [details]
filter select with unlimited option ticked

Comment 2 Neha Samant 2019-02-15 03:14:16 UTC
Created attachment 1535028 [details]
Output after saving the filter

Comment 3 Marek Hulan 2019-02-15 09:01:48 UTC
Can you check whether the role has been assigned to some organization or location? That has also impact on the unlimited flag. Also I don't see anything private in the report, could you publish it please?

Comment 4 Neha Samant 2019-02-15 09:29:08 UTC
Hello Marek,

I tried with Organization and Location and the unlimited flag was not getting set.

Also tried with Default Org and Default Location, still same issue persists.

Comment 5 Marek Hulan 2019-02-15 15:37:27 UTC
If role is assigned to any organization or location, unlimited will always be empty since it's limited by the organization/location. It's a bit confusing, since you explicitly check "unlimited" checkbox, but that's for the search field below. You can't make filter unlimited if its resource is taxable (supports orgs and locs) and the role is assigned to some. It would be bug if this was a role which is not assigned to any organization and location.

Comment 6 Neha Samant 2019-02-16 00:34:49 UTC
Hello Marek,

I tried by not assigning a Location and Organisation to the Role and still its not saving the unlimited option.

Whereas in Satellite 6.3, Even if we assign the Default Org and Default Location, the Unlimited check option used to get saved and reflected

Comment 7 Neha Samant 2019-02-16 01:54:07 UTC
Hello Marek,

Let me try this on some other test Satellite to re-check the result and will update you.

Comment 8 Marek Hulan 2019-02-18 08:22:28 UTC
Please, upload a screen shot of first tab of form edit page if it does not work - the tab Role. On my 6.5 instance, it works as I described. In 6.3, assigning org and loc to role didn't have any effect on filter. Starting with 6.4 it does (org admin feature outcome). If that works, I'd suggest closing. The inline help of the unlimited checkbox already explains this.

Comment 9 hprakash 2019-02-19 09:29:53 UTC
1- Create a role with no org or location
2- Add a filter 
 2.1- select ANY resource
 2.2- select ANY permission
 2.3- un-check the 'Unlimited?' check-box
 2.4- do not provide value for 'Search'
 2.4- submit the filter form
3- upon submitting the form, below message shown-

Successfully updated filter for test-role role.

When we limit the resource, we need to mention the filter criteria(i.e. value for 'Search' field). Means, we have to provide value for the 'Search' field. Without the criteria there is no point of having 'Unlimited?' un-checked. I think the message rendered upon the form submission is creating the confusion. I think, message should say something like-

Search criteria is required if 'Unlimited?' is un-checked.


Attached image is after submitting the form with 'Unlimited?' un-checked with empty 'Search', it shows the successful message while Filters page does not show the 'Unlimited' column ticked. So, functionality is working fine however, putting a validation on 'Unlimited', 'Search' field would be fine.

Comment 10 hprakash 2019-02-19 09:32:09 UTC
Created attachment 1536274 [details]
filter with restrictive criteria

Comment 11 Marek Hulan 2019-02-19 11:19:27 UTC
I asked for the Role tab. Also in this role I don't see view_facts filter, how is the screenshot related?

Comment 12 Neha Samant 2019-02-20 03:11:56 UTC
Hello Marek,

I tested on one more satellite 6.5 and found that for a  role which is not assigned to any organization and location the unlimited option gets checked for the view_facts filter.

Comment 14 Marek Hulan 2019-11-21 09:38:50 UTC
Thanks for confirmation, closing as NOTABUG since this is desired behavior, the unlimited checkbox inline help says 

"If the unlimited field is enabled, the filter applies to all resources of the selected type. If the unlimited field is disabled, you can specify further filtering using Foreman search syntax in the search field. If the role is associated with organizations or locations, the filters are not considered unlimited as they are scoped accordingly."


Note You need to log in before you can comment on or make changes to this bug.