mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
TAS-967 REST API - valid request returns status code 403 with Contributor role
This commit is contained in:
@@ -75,7 +75,7 @@ public class DeleteSiteMemberSanityTests extends RestTest
|
||||
executionType = ExecutionType.SANITY,
|
||||
description = "Verify site collaborator does not have permission to delete another member of the site")
|
||||
// TODO BUG ACE-5444
|
||||
public void siteCollaboratorCanDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
|
||||
public void siteCollaboratorIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
|
||||
{
|
||||
newUser = dataUser.createRandomTestUser();
|
||||
siteMember = new SiteMember(Role.SiteContributor.toString(), newUser.getUsername());
|
||||
@@ -86,5 +86,21 @@ public class DeleteSiteMemberSanityTests extends RestTest
|
||||
peopleApi.deleteSiteMember(newUser.getUsername(), siteModel.getId());
|
||||
sitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
|
||||
}
|
||||
|
||||
@TestRail(section = { "rest-api", "people" },
|
||||
executionType = ExecutionType.SANITY,
|
||||
description = "Verify site contributor does not have permission to delete another member of the site")
|
||||
// TODO BUG ACE-5444
|
||||
public void siteContributorUIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
|
||||
{
|
||||
newUser = dataUser.createRandomTestUser();
|
||||
siteMember = new SiteMember(Role.SiteCollaborator.toString(), newUser.getUsername());
|
||||
restClient.authenticateUser(adminUser);
|
||||
sitesApi.addPerson(siteModel.getId(), siteMember);
|
||||
restClient.authenticateUser(usersWithRoles.get(UserRole.SiteContributor));
|
||||
|
||||
peopleApi.deleteSiteMember(newUser.getUsername(), siteModel.getId());
|
||||
sitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user