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

Add user role check to API key router, plus option to download submission data for a project #2167

Open
2 tasks
spwoodcock opened this issue Feb 10, 2025 · 0 comments
Assignees
Labels
backend Related to backend code effort:medium Likely a day or two enhancement New feature or request priority:high Should be addressed as a priority

Comments

@spwoodcock
Copy link
Member

Is your feature request related to a problem? Please describe.

  • Recently we added API keys.
  • We don't need granular API keys per project, but instead can have this based on user permissions.
  • We use the existing auth checks for a user to determine if the user has access to the project, but this time via an API key.
  • The user needs to be able to download submission data via API for projects they have access to.

Describe the solution you'd like

  • Update API login dependency to use check_access on roles for a given user.
    • Return response if they have access.
    • Provide error if they do not have access.
  • Add integrations router endpoint to download submission for a project.
    • This should wrap existing crud logic to keep things DRY.
@spwoodcock spwoodcock added backend Related to backend code effort:medium Likely a day or two enhancement New feature or request priority:high Should be addressed as a priority labels Feb 10, 2025
@spwoodcock spwoodcock self-assigned this Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code effort:medium Likely a day or two enhancement New feature or request priority:high Should be addressed as a priority
Projects
Development

No branches or pull requests

1 participant