REPO-2819 : DELETE /shared-links/{id} with admin returns 403 (#9)

* REPO-2819 : DELETE /shared-links/{id} with admin returns 403
   Add an extra check to QuickShareServiceImpl.canDeleteSharedLink, because the admin user can return the SiteName of a nodeRef (even if it's private).
      Add a JUnit test into QuickShareServiceIntegrationTest
         Add a comment to the test - no actual shared Link is needed for this test.

* REPO-2520 : SiteMembership Java API calls should tell which site resulted in errors
   Add the test class into the test suite (was not previously added).
This commit is contained in:
Alexandru-Eusebiu Epure
2017-08-30 10:26:07 +03:00
committed by GitHub
parent af2e069b2e
commit 4cbacecada
4 changed files with 74 additions and 1 deletions

View File

@@ -133,6 +133,7 @@ public abstract class BaseAlfrescoSpringTest extends BaseSpringTest
createUser(userName, userName, "PWD");
}
@SuppressWarnings("deprecation")
protected void createUser(String userName, String nameSuffix, String password)
{
if (this.authenticationService.authenticationExists(userName) == false)
@@ -150,4 +151,17 @@ public abstract class BaseAlfrescoSpringTest extends BaseSpringTest
personService.createPerson(ppOne);
}
}
/**
* We assume: Admin user is already authenticated and userName already exists.
*
* @param userName
*/
@SuppressWarnings("deprecation")
protected void deleteUser(String userName)
{
PersonService personService = (PersonService) applicationContext.getBean("personService");
personService.deletePerson(userName);
}
}