mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: project member role update (#1205)
This commit is contained in:
parent
2511a284eb
commit
77e05a3599
@ -424,7 +424,7 @@ class ProjectMemberViewSet(BaseViewSet):
|
||||
)
|
||||
# Check while updating user roles
|
||||
requested_project_member = ProjectMember.objects.get(project_id=project_id, workspace__slug=slug, member=request.user)
|
||||
if "role" in request.data and request.data.get("role", project_member.role) > requested_project_member.role:
|
||||
if "role" in request.data and int(request.data.get("role", project_member.role)) > requested_project_member.role:
|
||||
return Response(
|
||||
{
|
||||
"error": "You cannot update a role that is higher than your own role"
|
||||
|
Loading…
Reference in New Issue
Block a user