Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set typ of tab before checking privilegies #6147

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

ZitaNemeckova
Copy link
Contributor

@ZitaNemeckova ZitaNemeckova commented Sep 4, 2019

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

Create a Role that has Automate/Requests checked in feature tree but NOT Services/Request. Create a group with this Role. Create a User with this group. Switch to this user. Go to Automation -> Automate -> Requests.
Before:
Screenshot 2019-09-05 at 16 00 32

After:
Screenshot 2019-09-05 at 15 55 30

Introduced by #4752 . After that change it never went through index (that is always allowed because miq_request_index is not a feature) sets @request_tab correctly before another check_privileges. The tab (?typ=host) that would have the same problem was removed in #4169 .

@miq-bot add_label wip, bug, blocker

@miq-bot miq-bot changed the title Check which miq_request tab is used using params [WIP] Check which miq_request tab is used using params Sep 4, 2019
@ZitaNemeckova ZitaNemeckova force-pushed the fix_ae_miq_request branch 2 times, most recently from eb52342 to 2e93552 Compare September 5, 2019 13:53
@miq-bot
Copy link
Member

miq-bot commented Sep 5, 2019

Checked commit ZitaNemeckova@fc0dcf1 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@ZitaNemeckova ZitaNemeckova changed the title [WIP] Check which miq_request tab is used using params [WIP] Set typ of tab before checking privilegies Sep 6, 2019
@martinpovolny
Copy link
Member

👍 I like that the exception is local to the controller.

@ZitaNemeckova
Copy link
Contributor Author

@miq-bot remove_label wip

@romanblanco please review, thanks :)

@miq-bot miq-bot changed the title [WIP] Set typ of tab before checking privilegies Set typ of tab before checking privilegies Sep 10, 2019
@miq-bot miq-bot removed the wip label Sep 10, 2019
@ZitaNemeckova
Copy link
Contributor Author

@miq-bot add_label automation/automate, ivanchuk/yes

@mzazrivec mzazrivec self-assigned this Sep 10, 2019
@mzazrivec mzazrivec added this to the Sprint 120 Ending Sep 16, 2019 milestone Sep 10, 2019
@mzazrivec mzazrivec merged commit d806e2f into ManageIQ:master Sep 10, 2019
@ZitaNemeckova ZitaNemeckova deleted the fix_ae_miq_request branch September 10, 2019 12:12
simaishi pushed a commit that referenced this pull request Oct 31, 2019
Set typ of tab before checking privilegies

(cherry picked from commit d806e2f)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1767647
@simaishi
Copy link
Contributor

Ivanchuk backport details:

$ git log -1
commit 9a178e0c8743e1d350860693fd21329b7e578ecc
Author: Milan Zázrivec <[email protected]>
Date:   Tue Sep 10 11:07:48 2019 +0200

    Merge pull request #6147 from ZitaNemeckova/fix_ae_miq_request
    
    Set typ of tab before checking privilegies
    
    (cherry picked from commit d806e2fb32ffc23f9b48ab82c4086f28287d1b25)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1767647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants