Use v2 api to get project collaborators and their project permission#348
Merged
Use v2 api to get project collaborators and their project permission#348
Conversation
Pull Request Test Coverage Report for Build 12432514437Details
💛 - Coveralls |
MarcelGeo
requested changes
Dec 18, 2024
| project_role: ProjectRoleName, | ||
| workspace_role: WorkspaceRoleName | ||
| ): ProjectRoleName { | ||
| const mappedWorkspaceRole: ProjectRoleName = |
Collaborator
There was a problem hiding this comment.
I think we can use mapper here WorkspaceRole -> ProjectRole
| const projectRoleIndex = ROLE_HIERARCHY.indexOf(project_role) | ||
| const workspaceRoleIndex = ROLE_HIERARCHY.indexOf(mappedWorkspaceRole) | ||
|
|
||
| return projectRoleIndex > workspaceRoleIndex |
Collaborator
There was a problem hiding this comment.
We need calculate project role only if it's null. If not null -> stay same as before. I think we do not need such logic.
Contributor
Author
Collaborator
There was a problem hiding this comment.
We have deal with @varmar05 , that BE will return new role attribute which will be calculated role. We can then use it in dropdown and project_role will be used just for add / update project collaborator handling.
web-app/packages/lib/src/modules/project/components/ProjectMembersTable.vue
Outdated
Show resolved
Hide resolved
…to fe_get_project_collaborators
- add role (aka project_permission) - combination of workspace_role and project_role to Project collaborator response - adjust FE API
…to fe_get_project_collaborators
varmar05
requested changes
Dec 20, 2024
varmar05
approved these changes
Dec 20, 2024
MarcelGeo
approved these changes
Jan 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use new API to list project collaborators. Add a function to calculate real project permission from the project and workspace role.