Allow Approver user to deny the request #5255
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1676910
What:
This PR fixes the problem that Approver user was not able to deny the request, only to approve it.
Of course, this makes no sense, the user should have permissions also to deny the request.
The button for denying the request was missing in the toolbar -
Details:
The problem was that
miq_request_deny
does not exist, there aren't two different features - for approving and denying the request. It is the one -miq_request_approval
, and the two buttons for appropriate actions.Check also https://github.com/hstastna/manageiq/blob/master/db/fixtures/miq_product_features.yml#L162,
there is
Approve and Deny
feature, not the two ones.How to test:
You can try the db provided by the reporter of this bug and just click on some already created request under
Services -> Requests
and you will see that, with this PR, the button is not missing anymore. Or .. you can follow the steps in the BZ ticket and create Approver user and a VM creation request but it is not necessary.Before:
After: