mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: fix nomenclature update on permission filter attributes (#179)
This commit is contained in:
parent
894e26116b
commit
acf7f59eef
@ -49,7 +49,7 @@ class ProjectMemberPermission(BasePermission):
|
|||||||
## Safe Methods -> Handle the filtering logic in queryset
|
## Safe Methods -> Handle the filtering logic in queryset
|
||||||
if request.method in SAFE_METHODS:
|
if request.method in SAFE_METHODS:
|
||||||
return ProjectMember.objects.filter(
|
return ProjectMember.objects.filter(
|
||||||
workspace=view.workspace, member=request.user
|
workspace__slug=view.workspace_slug, member=request.user
|
||||||
).exists()
|
).exists()
|
||||||
## Only workspace owners or admins can create the projects
|
## Only workspace owners or admins can create the projects
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
@ -77,7 +77,7 @@ class ProjectEntityPermission(BasePermission):
|
|||||||
## Safe Methods -> Handle the filtering logic in queryset
|
## Safe Methods -> Handle the filtering logic in queryset
|
||||||
if request.method in SAFE_METHODS:
|
if request.method in SAFE_METHODS:
|
||||||
return ProjectMember.objects.filter(
|
return ProjectMember.objects.filter(
|
||||||
workspace=view.workspace,
|
workspace__slug=view.workspace_slug,
|
||||||
member=request.user,
|
member=request.user,
|
||||||
project_id=view.project_id,
|
project_id=view.project_id,
|
||||||
).exists()
|
).exists()
|
||||||
|
Loading…
Reference in New Issue
Block a user