Skip to content

Commit

Permalink
Add delete permissions on File models
Browse files Browse the repository at this point in the history
  • Loading branch information
jabrah committed Jan 29, 2024
1 parent 3804d33 commit 4c2407c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public void testCreateUpdateDeleteFileAsShibUserOwningSubmission() throws IOExce

Response response = client.newCall(request).execute();

check(response, 403);
check(response, 204);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javax.persistence.Table;

import com.yahoo.elide.annotation.CreatePermission;
import com.yahoo.elide.annotation.DeletePermission;
import com.yahoo.elide.annotation.Include;
import com.yahoo.elide.annotation.UpdatePermission;
import org.eclipse.pass.object.converter.FileRoleToStringConverter;
Expand All @@ -35,6 +36,7 @@

@CreatePermission(expression = "User is Backend OR Object part of User Submission")
@UpdatePermission(expression = "User is Backend OR Object part of User Submission")
@DeletePermission(expression = "User is Backend OR Object part of User Submission")
@Include
@Entity
@Table(name = "pass_file")
Expand Down

0 comments on commit 4c2407c

Please sign in to comment.