Skip to content

Commit

Permalink
Merge pull request #3 from iknow/fixes
Browse files Browse the repository at this point in the history
Allow all user within project to delete segments & change review status
  • Loading branch information
bearice authored Jul 25, 2024
2 parents d104491 + ff0a0aa commit 0232fce
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions backend/routes/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0232fce

Please sign in to comment.