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

bug: Update fetches_things.rb to use custom policy if available #1956

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

ddmck
Copy link
Contributor

@ddmck ddmck commented Sep 28, 2023

Description

Fixes #1955

If self.authorization_policy is set on a resource and the current user would pass the check for index? the resource does not show up in the navigation menu.

Updating the Services::AuthorizationService.authorize call in Avo::Concerns::FetchesThings#get_available_resources appears to resolve this.

No tests are failing locally, but I still need to figure out the test suite so that I can test this functionality

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

@codeclimate
Copy link

codeclimate bot commented Sep 28, 2023

Code Climate has analyzed commit ec6bc71 and detected 0 issues on this pull request.

View more on Code Climate.

@Paul-Bob
Copy link
Contributor

Paul-Bob commented Oct 3, 2023

Thanks for the investigation and for the PR @ddmck! I made a change suggestion, let me know if it make sense

@Paul-Bob Paul-Bob merged commit d24fa9a into avo-hq:main Oct 9, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: all_resources does not use a resources custom authorization_policy
2 participants