Fix to set person permission if guest is found and not made

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2264 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-01-31 16:04:28 +00:00
parent 2f7aaab592
commit 5623299943

View File

@@ -39,9 +39,8 @@ import org.springframework.context.MessageSource;
import org.springframework.context.support.ResourceBundleMessageSource;
/**
* Ensures that the <b>guest</b> user homespace exists.<br/>
* A guest user homespace is now created during bootstrap. It is required for guest user
* access, but in older databases will not exist.
* Ensures that the <b>guest</b> user homespace exists.<br/> A guest user homespace is now created during bootstrap. It is required for guest user access, but in older databases
* will not exist.
*
* @author Andy Hind
*/
@@ -174,11 +173,13 @@ public class GuestUserPatch extends AbstractPatch
personService.createPerson(properties);
NodeRef personRef = personService.getPerson(guestId);
permissionService.setInheritParentPermissions(personRef, false);
permissionService.setPermission(personRef, guestId, PermissionService.READ, true);
}
NodeRef personRef = personService.getPerson(guestId);
permissionService.setInheritParentPermissions(personRef, false);
permissionService.setPermission(personRef, guestId, PermissionService.READ, true);
}
private NodeRef addGuestHomeSpace(NodeRef storeRootNodeRef, Properties configuration, String companyHomeChildName,
@@ -259,8 +260,8 @@ public class GuestUserPatch extends AbstractPatch
NodeRef companyHomeRef = nodeRefs.get(0);
permissionService.setInheritParentPermissions(companyHomeRef, false);
permissionService
.setPermission(companyHomeRef, PermissionService.ALL_AUTHORITIES, PermissionService.GUEST, true);
permissionService.setPermission(companyHomeRef, PermissionService.ALL_AUTHORITIES, PermissionService.GUEST,
true);
return companyHomeRef;
}