mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user