mirror of
https://github.com/makeplane/plane.git
synced 2025-12-24 23:59:40 +01:00
fix: project join for admin and members (#6097)
* chore: add enum role comparison * chore: add member also to join a project
This commit is contained in:
@@ -136,7 +136,7 @@ class UserProjectInvitationsViewset(BaseViewSet):
|
||||
member=request.user, workspace__slug=slug, is_active=True
|
||||
)
|
||||
|
||||
if workspace_member.role != ROLE.ADMIN:
|
||||
if workspace_member.role not in [ROLE.ADMIN.value, ROLE.MEMBER.value]:
|
||||
return Response(
|
||||
{"error": "You do not have permission to join the project"},
|
||||
status=status.HTTP_403_FORBIDDEN,
|
||||
|
||||
Reference in New Issue
Block a user