Merged DEV to HEAD (5.0)

85993 : ACE-2181 : Non-owner cannot execute cancel editing for content
      - Tests changes according to new lock store behavior 
   86133 : ACE-2181 : Non-owner cannot execute cancel editing for content
      - Added test case - attempt to unlock node by user who has ALL_PERMISSIONS 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@86239 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Pavel Yurke
2014-10-02 09:43:43 +00:00
parent ef5954a1a4
commit 7cf754053f
2 changed files with 19 additions and 27 deletions

View File

@@ -919,7 +919,7 @@ public class LockServiceImplTest extends BaseSpringTest
}
@SuppressWarnings("deprecation")
public void testUnlockNodeWithAdminUser()
public void testUnlockNodeWithAdminUserAndAllPermissionsUser()
{
for (Lifetime lt : new Lifetime[]{Lifetime.EPHEMERAL, Lifetime.PERSISTENT})
{
@@ -955,6 +955,12 @@ public class LockServiceImplTest extends BaseSpringTest
this.securedLockService.lock(testNode, LockType.WRITE_LOCK, 2 * 86400, lt, null);
this.securedLockService.unlock(testNode);
this.securedLockService.lock(testNode, LockType.WRITE_LOCK, 2 * 86400, lt, null);
// user who has ALL PERMISSIONS is able to unlock another's user lock
TestWithUserUtils.authenticateUser(GOOD_USER_NAME, PWD, rootNodeRef, this.authenticationService);
this.securedLockService.unlock(testNode);
this.nodeService.deleteNode(testNode);
}
}