From ff0a0aa9b702fcbbd4aec034ba991c7522cd1291 Mon Sep 17 00:00:00 2001 From: Szymon Witamborski Date: Thu, 25 Jul 2024 12:31:44 +0900 Subject: [PATCH] Allow all user within project to delete segments & change review status Equivalent to cb7777257ac295c8eaebf845c8317e12eb750cee in remaining places: deleting segments and marking/unmarking review status --- backend/routes/projects.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/backend/routes/projects.py b/backend/routes/projects.py index 67acaa9..a0e8749 100644 --- a/backend/routes/projects.py +++ b/backend/routes/projects.py @@ -493,9 +493,6 @@ def update_data(project_id, data_id): data = Data.query.filter_by(id=data_id, project_id=project_id).first() - if project.allow_all_users == False and request_user != data.assigned_user: - return jsonify(message="Unauthorized access!"), 401 - data.update_marked_review(is_marked_for_review) db.session.add(data) @@ -619,9 +616,6 @@ def delete_segmentations(project_id, data_id, segmentation_id): data = Data.query.filter_by(id=data_id, project_id=project_id).first() - if project.allow_all_users == False and request_user != data.assigned_user: - return jsonify(message="Unauthorized access!"), 401 - segmentation = Segmentation.query.filter_by( data_id=data_id, id=segmentation_id ).first()