Web Scripts: fix issue where the creation of javascript & template root repository objects was attempted even though not authenticated

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-11-29 15:14:58 +00:00
parent 69690687e3
commit e39370f0ef

View File

@@ -158,7 +158,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer
*/ */
private void addRepoParameters(Map<String, Object> params) private void addRepoParameters(Map<String, Object> params)
{ {
if (AlfrescoTransactionSupport.getTransactionId() != null) if (AlfrescoTransactionSupport.getTransactionId() != null && AuthenticationUtil.getCurrentAuthentication() != null)
{ {
NodeRef rootHome = repository.getRootHome(); NodeRef rootHome = repository.getRootHome();
if (rootHome != null && permissionService.hasPermission(rootHome, PermissionService.READ).equals(AccessStatus.ALLOWED)) if (rootHome != null && permissionService.hasPermission(rootHome, PermissionService.READ).equals(AccessStatus.ALLOWED))