From d5639aa34e73d8cd24a04e33a34bfa9d74d328b8 Mon Sep 17 00:00:00 2001 From: Maria Khrustaleva Date: Tue, 5 Mar 2024 15:08:52 +0100 Subject: [PATCH] Fixed scope defining when checking status of project import --- cvat/apps/iam/permissions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat/apps/iam/permissions.py b/cvat/apps/iam/permissions.py index 10fa069da5e9..8891f588f096 100644 --- a/cvat/apps/iam/permissions.py +++ b/cvat/apps/iam/permissions.py @@ -754,7 +754,7 @@ def get_scopes(request, view, obj): ('append_dataset_chunk', 'HEAD'): Scopes.IMPORT_DATASET, ('append_dataset_chunk', 'PATCH'): Scopes.IMPORT_DATASET, ('annotations', 'GET'): Scopes.EXPORT_ANNOTATIONS, - ('dataset', 'GET'): Scopes.EXPORT_DATASET, + ('dataset', 'GET'): Scopes.EXPORT_DATASET if request.query_params.get('action') != 'import_status' else Scopes.IMPORT_DATASET, ('export_backup', 'GET'): Scopes.EXPORT_BACKUP, ('import_backup', 'POST'): Scopes.IMPORT_BACKUP, ('append_backup_chunk', 'PATCH'): Scopes.IMPORT_BACKUP,