Bug 1234935

Summary: Service request cannot be deleted with nonadmin user, even if the permissions are ok
Product: Red Hat CloudForms Management Engine Reporter: Harpreet Kataria <hkataria>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Pete Savage <psavage>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: cpelland, dajohnso, eminguez, hkataria, jhardy, jprause, mpovolny, obarenbo, psavage
Target Milestone: GAKeywords: ZStream
Target Release: 5.4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.4.1.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1227811 Environment:
Last Closed: 2015-07-30 13:10:27 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: 1227811    
Bug Blocks:    

Comment 2 CFME Bot 2015-06-29 17:41:00 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=72b94a4d341c909151262bace9df907dea3ca887

commit 72b94a4d341c909151262bace9df907dea3ca887
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Jun 11 15:13:14 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Tue Jun 23 10:22:53 2015 -0400

    Fixed display of request delete button
    
    - Fixed to show Request delete button if user has access to request delete feature.
    - Added changes to show request delete button admin users all the time
    - Show delete button but disable it if logged in user is not a submitter of the request with appropriate hover over text. Show delete button but disable it for non-admin user if request has already been approved or denied, with appropriate hover text.
    - Changed get_record_cls method to determine class for different types of Requests.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227811
    (cherry picked from commit d5fce03)
    https://bugzilla.redhat.com/show_bug.cgi?id=1234935

 vmdb/app/helpers/application_helper.rb       | 18 +++++---
 vmdb/spec/helpers/application_helper_spec.rb | 69 ++++++++++++++++++++++++++--
 2 files changed, 77 insertions(+), 10 deletions(-)

Comment 3 CFME Bot 2015-06-29 17:41:08 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=9b3a4716ea374e63c143c94279c07128e7774442

commit 9b3a4716ea374e63c143c94279c07128e7774442
Merge: 36efb1c 72b94a4
Author:     Dan Clarizio <dclarizi>
AuthorDate: Mon Jun 29 13:40:00 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Mon Jun 29 13:40:00 2015 -0400

    Merge branch '54z_bz_1234935' into '5.4.z'
    
    Fixed display of request delete button
    
    - Fixed to show Request delete button if user has access to request delete feature.
    - Added changes to show request delete button admin users all the time
    - Show delete button but disable it if logged in user is not a submitter of the request with appropriate hover over text. Show delete button but disable it for non-admin user if request has already been approved or denied, with appropriate hover text.
    - Changed get_record_cls method to determine class for different types of Requests.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1227811
    (cherry picked from commit d5fce03)
    https://bugzilla.redhat.com/show_bug.cgi?id=1234935
    
    PR: https://github.com/ManageIQ/manageiq/pull/3138
    @dclarizio please review, this is a clean cherry-pick
    
    See merge request !142

 vmdb/app/helpers/application_helper.rb       | 18 +++++---
 vmdb/spec/helpers/application_helper_spec.rb | 69 ++++++++++++++++++++++++++--
 2 files changed, 77 insertions(+), 10 deletions(-)

Comment 5 Pete Savage 2015-07-20 12:11:49 UTC
Verified in 5.4.1.0

Comment 7 errata-xmlrpc 2015-07-30 13:10:27 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://rhn.redhat.com/errata/RHBA-2015-1511.html