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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor scopes for media services #9153

Merged
merged 5 commits into from Nov 1, 2023
Merged

refactor scopes for media services #9153

merged 5 commits into from Nov 1, 2023

Conversation

aditya-mitra
Copy link
Collaborator

@aditya-mitra aditya-mitra commented Oct 27, 2023

Summary

馃 Generated by Copilot at 95d6e2e

This pull request updates the authorization logic for the file-browser, static-resource-filters, and static-resource services to use more granular and specific roles and scopes. This enhances the security and access control for the media files and resources in the server.

References

refs #9161

Explanation

馃 Generated by Copilot at 95d6e2e

  • Restrict external access to the file-browser service by requiring the read scope for the editor role for all methods, and the write scope for the editor role for the create, update, and remove methods (link, link, link)
  • Allow external access to the static-resource-filters service by requiring the read scope for the static_resource role for all methods, instead of the admin scope for the admin role (link)
  • Restrict external access to the static-resource service by requiring the read scope for the static_resource role for the find method, and the write scope for the static_resource role for the create, update, patch, and remove methods, instead of allowing any external request or the admin scope for the admin role (link, link)
  • Import the iff and isProvider functions from feathers-hooks-common in the static-resource-filters and static-resource service hooks to conditionally apply hooks based on the request provider (link, link)

馃 Generated by Copilot at 95d6e2e

static_resource
role and scopes for services
autumn leaves fall fast

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@aditya-mitra aditya-mitra marked this pull request as ready for review October 30, 2023 06:27
@barankyle barankyle added this pull request to the merge queue Nov 1, 2023
Merged via the queue into dev with commit b4287e5 Nov 1, 2023
12 of 13 checks passed
@barankyle barankyle deleted the refactor/media-scoping branch November 1, 2023 23:03
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.

None yet

2 participants