mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
ACE-4863 - Cannot save content back to Alfresco
ACE-4887 - LockService.getLockState unaccessible Extended jUnit tests to test accessibility of getLockState method git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@120273 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -982,8 +982,16 @@ public class LockServiceImplTest extends BaseSpringTest
|
|||||||
// lock it as GOOD user
|
// lock it as GOOD user
|
||||||
this.securedLockService.lock(testNode, LockType.WRITE_LOCK, 2 * 86400, lt, null);
|
this.securedLockService.lock(testNode, LockType.WRITE_LOCK, 2 * 86400, lt, null);
|
||||||
|
|
||||||
|
// check lock state and status as GOOD user
|
||||||
|
assertNotNull(this.securedLockService.getLockState(testNode));
|
||||||
|
assertNotNull(this.securedLockService.getLockStatus(testNode));
|
||||||
|
|
||||||
TestWithUserUtils.authenticateUser(BAD_USER_NAME, PWD, rootNodeRef, this.authenticationService);
|
TestWithUserUtils.authenticateUser(BAD_USER_NAME, PWD, rootNodeRef, this.authenticationService);
|
||||||
|
|
||||||
|
// check lock state and status as BAD user
|
||||||
|
assertNotNull(this.securedLockService.getLockState(testNode));
|
||||||
|
assertNotNull(this.securedLockService.getLockStatus(testNode));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// try to unlock as bad user
|
// try to unlock as bad user
|
||||||
@@ -997,6 +1005,10 @@ public class LockServiceImplTest extends BaseSpringTest
|
|||||||
|
|
||||||
TestWithUserUtils.authenticateUser(AuthenticationUtil.getAdminUserName(), "admin", rootNodeRef, this.authenticationService);
|
TestWithUserUtils.authenticateUser(AuthenticationUtil.getAdminUserName(), "admin", rootNodeRef, this.authenticationService);
|
||||||
|
|
||||||
|
// check lock state and status as ADMIN user
|
||||||
|
assertNotNull(this.securedLockService.getLockState(testNode));
|
||||||
|
assertNotNull(this.securedLockService.getLockStatus(testNode));
|
||||||
|
|
||||||
// try to unlock as ADMIN user
|
// try to unlock as ADMIN user
|
||||||
this.securedLockService.unlock(testNode);
|
this.securedLockService.unlock(testNode);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user