From 449ae0c5bfa0cdc84e2cbff72eede181f5f3aaa6 Mon Sep 17 00:00:00 2001 From: Kiwon Jung Date: Fri, 25 Mar 2022 20:21:37 +0900 Subject: [PATCH] fixed: Unable to upload annotations #4459 (#4513) --- CHANGELOG.md | 5 +++-- cvat/apps/iam/permissions.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fceccd47..44de0ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,9 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Fixed -- Permission error occured when accessing the JobCommits () -- job assignee can remove or update any issue created by the task owner () +- Permission error occured when accessing the JobCommits () +- job assignee can remove or update any issue created by the task owner () - Bug: Incorrect point deletion with keyboard shortcut () +- Unable to upload annotations () ### Security - TDB diff --git a/cvat/apps/iam/permissions.py b/cvat/apps/iam/permissions.py index 022a5cc4..5eb26a7b 100644 --- a/cvat/apps/iam/permissions.py +++ b/cvat/apps/iam/permissions.py @@ -645,12 +645,15 @@ class TaskPermission(OpenPolicyAgentPermission): ('annotations', 'PATCH'): 'update:annotations', ('annotations', 'DELETE'): 'delete:annotations', ('annotations', 'PUT'): 'update:annotations', + ('annotations', 'POST'): 'import:annotations', + ('append_annotations_chunk', 'PATCH'): 'update:annotations', + ('append_annotations_chunk', 'HEAD'): 'update:annotations', ('dataset_export', 'GET'): 'export:dataset', ('data', 'GET'): 'view:data', ('data_info', 'GET'): 'view:data', ('data', 'POST'): 'upload:data', - ('append_tus_chunk', 'PATCH'): 'upload:data', - ('append_tus_chunk', 'HEAD'): 'upload:data', + ('append_data_chunk', 'PATCH'): 'upload:data', + ('append_data_chunk', 'HEAD'): 'upload:data', ('jobs', 'GET'): 'view', ('import_backup', 'POST'): 'import:backup', ('export_backup', 'GET'): 'export:backup', @@ -790,6 +793,9 @@ class JobPermission(OpenPolicyAgentPermission): ('annotations', 'PATCH'): 'update:annotations', ('annotations', 'DELETE'): 'delete:annotations', ('annotations', 'PUT'): 'update:annotations', + ('annotations', 'POST'): 'import:annotations', + ('append_annotations_chunk', 'PATCH'): 'update:annotations', + ('append_annotations_chunk', 'HEAD'): 'update:annotations', ('data', 'GET'): 'view:data', ('issues', 'GET'): 'view', ('commits', 'GET'): 'view:commits'