Here's what I changed in the class ("None" is a custom permission I've defined that has no rights):
// Admin Authority has full permissions by default (automatic - set in the permission config)
// give "None" permissionsto the new user
this.permissionService.setPermission(homeSpaceRef, this.userName, "None", true);
// by default other users will only have GUEST access to the space contents
// or whatever is configured as the default in the web-client-xml config
//String permission = getDefaultPermission();
//if (permission != null && permission.length() != 0)
//{
//this.permissionService.setPermission(homeSpaceRef, permissionService.getAllAuthorities(), permission, true);
//}
// the new user is the OWNER of their own space and always has full permissions
//this.ownableService.setOwner(homeSpaceRef, this.userName);
//this.permissionService.setPermission(homeSpaceRef, permissionService.getOwnerAuthority(), permissionService.getAllPermission(), true);
// now detach (if we did this first we could not set any permissions!)
this.permissionService.setInheritParentPermissions(homeSpaceRef, false);
As you can see, I've commented out everything except for the assignment of the "None" permission and the disallowing of inheritable permissions. However, when I create a new user and then "Manage Space Users" on their home space, they are listed with permissions "All, None". I can't figure out where the All is coming from? I've search through all the config files and code…what's the deal??
Thanks!