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

#1422, #1433 #766

Merged
merged 23 commits into from
Aug 10, 2022
Merged

#1422, #1433 #766

merged 23 commits into from
Aug 10, 2022

Conversation

chamaliperera512
Copy link
Contributor

No description provided.

@temi temi requested a review from chrisala August 9, 2022 23:33
def isUserMemberOfProject() {
String userId = params.userId
String projectId = params.projectId
String roles = params.roles ?: "admin,caseManager,moderator,editor,projectParticipant"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than hard-coding the strings here, it would be better to use the AccessLevel enum to derive them. It would also be more http idomatic to use params.getList() and send it from biocollect in the form &roles=admin&roles=moderator etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

WIthout understanding how it's used in biocollect, an alternative would be to use "findUserPermission(userId, projectId)" and do the role processing on the client side.

Copy link
Contributor

Choose a reason for hiding this comment

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

Changed.
Doing on client side was causing BioCollect to be really slow on projects with large number of members. Moved BioCollect functionality to ecodata to address this issue.

@temi temi merged commit 7dd81c6 into master Aug 10, 2022
@chrisala chrisala deleted the hotfix/3.8.2 branch August 12, 2022 01:17
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.

4 participants