mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
AVMLockingException now has I18N message for locked item error.
Added new variant of hasAccess() method to AVMLockingService to support the case where you already have the NodeRef of the webproject available (improves performance by removing the need to perform a lucene search to locate the webproject node). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6017 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -823,12 +823,12 @@ public class AVMLockingAwareService implements AVMService
|
||||
String userName = fAuthenticationService.getCurrentUserName();
|
||||
if (!fLockingService.hasAccess(webProject, path, userName))
|
||||
{
|
||||
throw new AVMLockingException(userName + " does not have access to " + path);
|
||||
throw new AVMLockingException("avmlockservice.locked", new Object[]{path});
|
||||
}
|
||||
fLockingService.addWebProject(webProject);
|
||||
if (fLockingService.getLock(webProject, storePath[1]) == null)
|
||||
{
|
||||
List<String> owners = new ArrayList<String>();
|
||||
List<String> owners = new ArrayList<String>(1);
|
||||
owners.add(userName);
|
||||
AVMLock lock = new AVMLock(webProject, storePath[0], storePath[1], AVMLockingService.Type.DISCRETIONARY, owners);
|
||||
fLockingService.lockPath(lock);
|
||||
|
Reference in New Issue
Block a user