Skip to content
New issue

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

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

Already on GitHub? # to your account

validate artifact ACL in OptionProvider #51

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

ltamaster
Copy link
Collaborator

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • [] Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue
  • Add ARTIFACTS permission checks for option/artifact endpoint and option/build
  • in the case of option/artifact returns a bad request if the permission is not set
  • in the case of option/build the build that doesn't have permissions won't be added in the returner Rundeck option list

@Kevin-CB
Copy link

Hello @ltamaster, I reviewed your PR and it's need some improvement, indeed you're always checking for Run.Artifact permission but you should only do it when the escape hatch is enabled.

So you need to check first if Functions.isArtifactsPermissionEnabled() return true.

@ltamaster
Copy link
Collaborator Author

thanks, @Kevin-CB
I added what you suggested
Luis

Copy link

@Kevin-CB Kevin-CB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to test it with and without the Run.Artifact permission being enabled, and everything looks good!

@ltamaster ltamaster merged commit 032b3bb into master Oct 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants