mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
committed by
GitHub
parent
af2e069b2e
commit
4cbacecada
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user