Skip to content

Commit b5be1f7

Browse files
committed
feat: require project in source image upload
1 parent 7fc8c59 commit b5be1f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ami/main/api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ class SourceImageUploadViewSet(DefaultViewSet, ProjectMixin):
760760

761761
serializer_class = SourceImageUploadSerializer
762762
permission_classes = [SourceImageUploadCRUDPermission]
763+
project_required = True
763764

764765
def get_queryset(self) -> QuerySet:
765766
# Only allow users to see their own uploads
@@ -783,7 +784,6 @@ def perform_create(self, serializer):
783784
user = get_current_user(self.request)
784785

785786
# Create the SourceImageUpload object with the user
786-
# @TODO IMPORTANT ensure current user is a member of the deployment's project
787787
obj = serializer.save(user=user)
788788

789789
# Get process_now flag from request data

0 commit comments

Comments
 (0)