Skip to content

Commit

Permalink
Add Delete permissions for Submission and Publication
Browse files Browse the repository at this point in the history
  • Loading branch information
jabrah committed Feb 27, 2024
1 parent 3481411 commit 4cea8f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public void testCreateUpdateDeleteSubmissionAsShibUser() throws IOException, JSO

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

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

Expand Down Expand Up @@ -373,7 +373,7 @@ public void testCreateUpdateDeletePublicationAsShibUser() throws IOException, JS

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 @@ -18,6 +18,7 @@
import java.util.Objects;

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 jakarta.persistence.Column;
Expand All @@ -33,6 +34,7 @@

@CreatePermission(expression = "User is Backend OR User is Submitter")
@UpdatePermission(expression = "User is Backend OR User is Submitter")
@DeletePermission(expression = "User is Backend OR User is Submitter")
@Include
@Entity
@Table(name = "pass_publication")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.Objects;

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 jakarta.persistence.Column;
Expand All @@ -44,6 +45,7 @@

@CreatePermission(expression = "User is Backend OR User is Submitter")
@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_submission")
Expand Down

0 comments on commit 4cea8f4

Please sign in to comment.