mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Share interface now only shows groups in APP.DEFAULT zone.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14894 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -363,21 +363,28 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
|
||||
// Get the current user
|
||||
final String currentUser = authenticationContext.getCurrentUserName();
|
||||
|
||||
|
||||
|
||||
// Create the relevant groups and assign permissions
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
public String doWork() throws Exception
|
||||
{
|
||||
Set<String> shareZones = new HashSet<String>(2, 1.0f);
|
||||
shareZones.add(AuthorityService.ZONE_APP_SHARE);
|
||||
shareZones.add(AuthorityService.ZONE_AUTH_ALFRESCO);
|
||||
|
||||
|
||||
// Create the site's groups
|
||||
String siteGroup = authorityService
|
||||
.createAuthority(AuthorityType.GROUP, getSiteGroup(shortName, false));
|
||||
.createAuthority(AuthorityType.GROUP, getSiteGroup(shortName, false), shortName, shareZones);
|
||||
Set<String> permissions = permissionService.getSettablePermissions(SiteModel.TYPE_SITE);
|
||||
for (String permission : permissions)
|
||||
{
|
||||
// Create a group for the permission
|
||||
String permissionGroup = authorityService.createAuthority(AuthorityType.GROUP, getSiteRoleGroup(
|
||||
shortName, permission, false));
|
||||
shortName, permission, false), shortName, shareZones);
|
||||
authorityService.addAuthority(siteGroup, permissionGroup);
|
||||
|
||||
// Assign the group the relevant permission on the site
|
||||
|
Reference in New Issue
Block a user