mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-08 14:51:20 +00:00
TAS-961 contributor can't delete comment created by admin
This commit is contained in:
@@ -76,7 +76,7 @@ public class DeleteCommentsSanityTests extends RestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
@TestRail(section = { "rest-api",
|
@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")
|
"comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't delete comments created by admin user with Rest API and status code is 403")
|
||||||
public void collaboratorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception
|
public void collaboratorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception
|
||||||
{
|
{
|
||||||
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteCollaborator));
|
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteCollaborator));
|
||||||
@@ -84,4 +84,13 @@ public class DeleteCommentsSanityTests extends RestTest
|
|||||||
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
|
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestRail(section = { "rest-api",
|
||||||
|
"comments" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't delete comments created by admin user with Rest API and status code is 403")
|
||||||
|
public void contributorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception
|
||||||
|
{
|
||||||
|
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteContributor));
|
||||||
|
commentsAPI.deleteComment(document.getNodeRef(), commentId);
|
||||||
|
commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user