Bug 1576129
Summary: | Unexpected Error when accessing SERVICE -> REQUESTS (undefined method find_tags_by_grouping) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Reartes Guillermo <greartes> | ||||||||||||
Component: | Appliance | Assignee: | Yuri Rudman <yrudman> | ||||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Shveta <sshveta> | ||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||
Priority: | high | ||||||||||||||
Version: | 5.8.0 | CC: | abellott, cpelland, dajohnso, fdewaley, hkataria, ikaur, jrafanie, juanrodr, lavenel, mpovolny, ngupta, obarenbo, simaishi, sshveta, yrudman | ||||||||||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||||||||||
Target Release: | 5.10.0 | ||||||||||||||
Hardware: | x86_64 | ||||||||||||||
OS: | Linux | ||||||||||||||
Whiteboard: | |||||||||||||||
Fixed In Version: | 5.10.0.3 | Doc Type: | If docs needed, set a value | ||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||
Clone Of: | |||||||||||||||
: | 1583710 1583711 (view as bug list) | Environment: | |||||||||||||
Last Closed: | 2019-02-11 13:58:58 UTC | Type: | Bug | ||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||
Documentation: | --- | CRM: | |||||||||||||
Verified Versions: | Category: | --- | |||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||||||||||
Embargoed: | |||||||||||||||
Bug Depends On: | |||||||||||||||
Bug Blocks: | 1583710, 1583711 | ||||||||||||||
Attachments: |
|
Created attachment 1433454 [details]
role details
Created attachment 1433455 [details]
group
Created attachment 1433456 [details]
unexpected error
Created attachment 1433457 [details]
production.log showing the error
this affects all pages where the request list is present. the only role that can see anything is EVM_SuperAdministrator I can reproduce "undefined method `find_tags_by_grouping'.. " error New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/582d4abc12cf7c94aed6d4885a42d68a00c9d5cc commit 582d4abc12cf7c94aed6d4885a42d68a00c9d5cc Author: Yuri Rudman <yrudman> AuthorDate: Tue May 22 22:45:22 2018 -0400 Commit: Yuri Rudman <yrudman> CommitDate: Tue May 22 22:45:22 2018 -0400 MiqRequest was added to RBAC in https://github.com/ManageIQ/manageiq/pull/17208 but did not include ActAsTaggable concern. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1576129 app/models/miq_request.rb | 2 + 1 file changed, 2 insertions(+) Dev was able to recreate Imaan, a user reported a problem with this bug fix in https://github.com/ManageIQ/manageiq/pull/17466#issuecomment-395747685. I'm working on a complete fix for this issue. New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/f8c05532cf654cff8e39bded83c25af8fbec281c commit f8c05532cf654cff8e39bded83c25af8fbec281c Author: Joe Rafaniello <jrafanie> AuthorDate: Fri Jun 29 10:59:11 2018 -0400 Commit: Joe Rafaniello <jrafanie> CommitDate: Fri Jun 29 10:59:11 2018 -0400 Remove Request taggable and prevent tag filtering MiqRequest was changed to allow ownership for self service and limited self-service users in ManageIQ #17208, BZ #1545395 This caused a problem if you had tag filters assign to a user's group undefined method `find_tags_by_grouping'. This was fixed in ManageIQ #17466, BZ #1576129, and shipped with: Fine: BZ #1583711 Gaprindindashvili: BZ #1583710 Unfortunately, this second fix to add taggable caused a new bug: users in groups having tag filters could not see their own requests. This commit changes MiqRequest to no longer be taggable, since it's not even taggable in the UI and instead, we add MiqRequest to a list of models that are RBAC'able but not taggable so we don't try to filter MiqRequest based on a user's group tag filters. Credit goes to github user LorkScorguar who reported this issue and provided lots of diagnostics to help us fix this properly. To test this, simply assign managed filters to a user's group, such as /managed/environments/production, create a request for that user and try to see that user's request. They couldn't see it if they received the intermediate fix, #17466, or if they didn't receive that fix, they'd receive the `find_tags_by_grouping` error shown above. For gaprindashvili and fine: Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1596738 For hammer: Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1576129 app/models/miq_request.rb | 2 - lib/rbac/filterer.rb | 2 +- spec/lib/rbac/filterer_spec.rb | 41 + 3 files changed, 42 insertions(+), 3 deletions(-) Fix for this BZ ("undefined method 'find_tags_by_grouping...' ") introduced another bug: user can not see requests if users are in groups with managed tags. This new issue was reported in https://bugzilla.redhat.com/show_bug.cgi?id=1596738 and fixed in https://github.com/ManageIQ/manageiq/pull/17656 Fixed in 5.10.0.3.20180705151325_ce4d2b5 |
Created attachment 1433453 [details] tenant, role, group, user Description of problem: Unable to access SERVICE -> REQUESTS due to UNEXPECTED ERROR undefined method `find_tags_by_grouping' for #<MiqRequest::ActiveRecord_Relation:0x0000000021a278a0> [miq_request/show_list] I tired several roles and permission combination. It even happens when the role is given "everything". Version-Release number of selected component (if applicable): CF 4.6 (CFME 5.9.2.4) How reproducible: always Steps to Reproduce: 1. create tenant, role, group and user as in the screenshots 2. login as user 3. go to SERVICE -> REQUESTS -> UNKNOWN ERROR Actual results: cannot access SERVICE -> REQUESTS UI Section Expected results: access SERVICE -> REQUESTS UI Section Additional info: admin is not affected.