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

feat(submission): add project_contributors dependency for permission … #1873

Conversation

Anuj-Gupta4
Copy link
Contributor

What type of PR is this?

  • 🍕 Feature

Related Issue

Fixes Make submission data downloads only possible for project contributors #1849

Describe this PR

The code adds a dependency to the routes responsible for submission downloads to only allow access if they are a project contributor.

Review Guide

The criteria to be a project contributor may need further discussion.

Checklist before requesting a review

@Anuj-Gupta4 Anuj-Gupta4 force-pushed the feature/restrict-submission-downloads-to-contributors branch from 0bc5349 to cd14a03 Compare November 13, 2024 08:37
@Anuj-Gupta4 Anuj-Gupta4 requested a review from Sujanadh November 13, 2024 08:39
@Anuj-Gupta4 Anuj-Gupta4 marked this pull request as ready for review November 13, 2024 08:42
@Anuj-Gupta4 Anuj-Gupta4 self-assigned this Nov 13, 2024
Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

Minor change to a comment needed, but this is a really neat addition 😄

My only concern is that this is quite restrictive.

In the long term I think we need to go the route discussed a few meetings ago, with different level of project access being properly implemented. So this logic would perhaps be moved to the mapper role, determining access based on the 4 project visibilities discussed.

Let's go with that for now though!

src/backend/app/auth/roles.py Outdated Show resolved Hide resolved
@spwoodcock spwoodcock merged commit dfcc62c into hotosm:development Nov 14, 2024
4 of 5 checks passed
@Anuj-Gupta4 Anuj-Gupta4 deleted the feature/restrict-submission-downloads-to-contributors branch November 28, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Make submission data downloads only possible for project contributors
3 participants