mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
14919: Merged V2.2 to V3.1 14785: Fix for ETWOTWO-1164: Newly created access groups for web projects are not deleted when the project is removed git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14950 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1340,4 +1340,28 @@ public final class SandboxFactory extends WCMUtil
|
||||
this.userAuth = userAuth;
|
||||
}
|
||||
}
|
||||
|
||||
public void removeGroupsForStore(final String storeRoot)
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
String[] permissions = new String[] { PermissionService.WCM_CONTENT_CONTRIBUTOR, PermissionService.WCM_CONTENT_MANAGER, PermissionService.WCM_CONTENT_PUBLISHER,
|
||||
PermissionService.WCM_CONTENT_REVIEWER };
|
||||
for (String permission : permissions)
|
||||
{
|
||||
String shortName = storeRoot + "-" + permission;
|
||||
String group = authorityService.getName(AuthorityType.GROUP, shortName);
|
||||
if (authorityService.authorityExists(group))
|
||||
{
|
||||
authorityService.deleteAuthority(group);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user