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

Replaced MEASUREMENT.CREATE permissions #454

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Replaced MEASUREMENT.CREATE permissions #454

merged 2 commits into from
Mar 18, 2024

Conversation

this-Aditya
Copy link
Member

Fixes: #317
Hi @yatharthranjan, could you please review this PR and let me know if any changes are needed?

permission = AuthPermissions.CREATE,
entity = AuthEntities.MEASUREMENT,
permission = AuthPermissions.UPDATE,
entity = AuthEntities.PROJECT,
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be permission = AuthPermissions.READ and inside the function we can check if the user has permission on the project like like: https://github.com/RADAR-base/RADAR-Appserver/pull/454/files#diff-1e80e358e3364d4b93b1aa06498dedf1686f827ff9bca66eb31b0164b72d3ca8R170

Because I don't think aRMT has PROJECT.UPDATE permissions. What do you think @yatharthranjan?

Copy link
Member

Choose a reason for hiding this comment

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

I think we usually check SUBJECT.UPDATE on the PROJECT (since even the projects in appserver are created by participant tokens)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, I've updated the permissions to SUBJECT.UPDATE and I also updated the authorization code inside the function as Pauline suggested. Please let me know if any changes are needed.

@mpgxvii mpgxvii self-requested a review March 18, 2024 12:23
Copy link
Member

@mpgxvii mpgxvii left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this update. 👍

@mpgxvii mpgxvii merged commit 8325222 into RADAR-base:dev Mar 18, 2024
1 of 4 checks passed
@this-Aditya this-Aditya deleted the permissions branch April 16, 2024 05:42
@mpgxvii mpgxvii mentioned this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants