diff --git a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java index 07c2e5aea..79b0f9928 100644 --- a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java @@ -75,4 +75,13 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT.toString()); } + @TestRail(section = { "rest-api", + "comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user delete comments created by admin user with Rest API and status code is 403") + public void collaboratorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception + { + restClient.authenticateUser(usersWithRoles.get(UserRole.SiteCollaborator)); + commentsAPI.deleteComment(document.getNodeRef(), commentId); + commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString()); + } + }