Merge pull request #4517 from emanuelschuetze/fixComments
Fixed permission check for manage comments
This commit is contained in:
commit
94080df663
@ -76,9 +76,9 @@ class MotionViewSet(TreeSortMixin, ModelViewSet):
|
|||||||
result = has_perm(self.request.user, "motions.can_see")
|
result = has_perm(self.request.user, "motions.can_see")
|
||||||
# For partial_update, update and destroy requests the rest of the check is
|
# For partial_update, update and destroy requests the rest of the check is
|
||||||
# done in the update method. See below.
|
# done in the update method. See below.
|
||||||
elif self.action in ("create", "set_state"):
|
elif self.action in ("create", "set_state", "manage_comments"):
|
||||||
result = has_perm(self.request.user, "motions.can_see")
|
result = has_perm(self.request.user, "motions.can_see")
|
||||||
# For create the rest of the check is done in the respective method. See below.
|
# The rest of the check is done in the respective method. See below.
|
||||||
elif self.action in (
|
elif self.action in (
|
||||||
"manage_multiple_state",
|
"manage_multiple_state",
|
||||||
"set_recommendation",
|
"set_recommendation",
|
||||||
@ -91,7 +91,7 @@ class MotionViewSet(TreeSortMixin, ModelViewSet):
|
|||||||
result = has_perm(self.request.user, "motions.can_see") and has_perm(
|
result = has_perm(self.request.user, "motions.can_see") and has_perm(
|
||||||
self.request.user, "motions.can_manage_metadata"
|
self.request.user, "motions.can_manage_metadata"
|
||||||
)
|
)
|
||||||
elif self.action in ("sort", "manage_comments"):
|
elif self.action == "sort":
|
||||||
result = has_perm(self.request.user, "motions.can_see") and has_perm(
|
result = has_perm(self.request.user, "motions.can_see") and has_perm(
|
||||||
self.request.user, "motions.can_manage"
|
self.request.user, "motions.can_manage"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user