Bug 1590764

Summary: Button group is shown in self-service portal even when no buttons or rights are assigned
Product: Red Hat CloudForms Management Engine Reporter: Imaan <ikaur>
Component: APIAssignee: Dávid Halász <dhalasz>
Status: CLOSED ERRATA QA Contact: Nikhil Dhandre <ndhandre>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: cpelland, dhalasz, jocarter, lavenel, mike, ngupta, obarenbo, simaishi, smallamp
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:03:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1595269    
Attachments:
Description Flags
button description none

Description Imaan 2018-06-13 11:19:35 UTC
Description of problem:

Button group is shown in self-service portal even when no buttons or rights are assigned.

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

Version 5.9.2.4.20180501195858_35dc609

How reproducible: 100%


Steps to Reproduce:

Create one button group with one button.

- Navigate to Automation -> Automate -> Customization -> Buttons -> Configuration -> Add a new button group under VM and instance.

- Create a button with Visibility Expression "VM and Instance.My Company Tags : Department CONTAINS 'Marketing'".

- Set the button visibility to all.

Refer - button.png

Actual results:

In the Operational portal, the button group is not shown in VM and Instances. 

In self UI, the button group is visible in VM and Instances. 


Expected results:

It should not be shown when visibility expression does not match.

Comment 2 Imaan 2018-06-13 11:20:45 UTC
Created attachment 1450866 [details]
button description

Comment 4 Chris Hale 2018-06-13 13:53:24 UTC
I took a look this ticket and believe it should be assigned over to API team because Service UI doesn't do any work to figure out what should be displayed when data comes back from the API.  If the API returns it, service UI will render it.  Let me know if you would like me to help test this later after they have made a change to ensure the API doesn't return this information.

Comment 6 CFME Bot 2018-06-20 13:41:33 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/739171cd17e362306a58f275de0489e90d9dab36
commit 739171cd17e362306a58f275de0489e90d9dab36
Author:     Dávid Halász <dhalasz>
AuthorDate: Tue Jun 19 07:10:50 2018 -0400
Commit:     Dávid Halász <dhalasz>
CommitDate: Tue Jun 19 07:10:50 2018 -0400

    Reject empty button groups from the result of #custom_actions

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1590764

 app/models/mixins/custom_actions_mixin.rb | 2 +-
 spec/models/mixins/custom_actions_mixin_spec.rb | 31 +
 2 files changed, 32 insertions(+), 1 deletion(-)

Comment 8 errata-xmlrpc 2019-02-07 23:03:07 UTC
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-2019:0212