Skip to content

Commit e50fd22

Browse files
committed
fix(archived-projects-tasks): priorities
1 parent 2aab5df commit e50fd22

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

backend/timed/permissions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def has_object_permission(self, request, view, _obj):
6666

6767

6868
class IsProjectActive(BasePermission):
69-
"""Allow Only the project that is not archived."""
69+
"""Allows access to object only if a project is not archived."""
7070

7171
def has_object_permission(self, _request, _view, task):
7272
return not task.project.archived

backend/timed/projects/views.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,7 @@ class TaskViewSet(ModelViewSet):
179179
# superuser may edit all tasks
180180
IsSuperUser
181181
# only superuser can update tasks of archived projects
182-
| (IsUpdateOnly & IsProjectActive)
183-
# managers may edit all tasks
184-
| IsManager
182+
| (IsUpdateOnly & IsProjectActive & IsManager)
185183
# all authenticated users may read all tasks
186184
| IsAuthenticated & IsReadOnly
187185
),

0 commit comments

Comments
 (0)