Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Creating a new product by limited permissions user fails with error "NoMethodError: undefined method `[]' for nil:NilClass"
The user has been assigned to a custom role with the following filter :
Resource Permissions Search
Product and Repositories export_products, N/A
sync_products,
destroy_products,
edit_products,
create_products,
view_products
The product is created even with the error on step "Actions::Katello::Product::ReindexSubscriptions" and the task becomes on paused state and the product can not be deleted until cleaning up the task.
The product is successfully created with no errors when the following filter is added to the role:
Resource Permissions
Subscription view_subscriptions
Version-Release number of selected component (if applicable):
Red Hat satellite 6.4.4-2
How reproducible:
100%
Steps to Reproduce:
1.Create a role ROLE1 with the following filters :
Resource Permissions Search
Product and Repositories export_products, N/A
sync_products,
destroy_products,
edit_products,
create_products,
view_products
2. Create a new user and assign ROLE1 to it.
3.Login using the new user and try to create a new product.
Actual results:
The product is created but with the following error and the task becomes on paused state.
An error occurred while saving the Product: 0 Task XXXXX: NoMethodError: undefined method `[]' for nil:NilClass
Expected results:
If a subscription permission is needed , the product creation task can not be started or exit with clear error.
Additional info:
The product is successfully created with no errors when the following filter is added to the role:
Resource Permissions
Subscription view_subscriptions
Steps to Test:
1.Create a role ROLE1 with the following filters :
Resource Permissions Search
Product and Repositories export_products, N/A
sync_products,
destroy_products,
edit_products,
create_products,
view_products
2. Create a new user and assign ROLE1 to it.
3. Login using the new user and try to create a new product.
Actual results:
Product is successfully created. Checked the tasks and it shows that the product was successfully created.
Expected results:
Product is successfully created. Checked the tasks and it shows that the product was successfully created.
Tested on 6.7.0_07
Marking issue as verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:1454