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;
|
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());
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -724,7 +724,7 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
|||||||
// It does not matter what webapp name we give here, so "/ROOT"
|
// It does not matter what webapp name we give here, so "/ROOT"
|
||||||
// is as sensible as anything else. It's all going away.
|
// is as sensible as anything else. It's all going away.
|
||||||
|
|
||||||
String sandbox = WCMUtil.buildStagingStoreName(wpStoreId);
|
final String sandbox = WCMUtil.buildStagingStoreName(wpStoreId);
|
||||||
String path = WCMUtil.buildStoreWebappPath(sandbox, "/ROOT");
|
String path = WCMUtil.buildStoreWebappPath(sandbox, "/ROOT");
|
||||||
|
|
||||||
WCMUtil.removeAllVServerWebapps(virtServerRegistry, path, true);
|
WCMUtil.removeAllVServerWebapps(virtServerRegistry, path, true);
|
||||||
@@ -746,6 +746,8 @@ public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
|
|||||||
// delete the web project node itself
|
// delete the web project node itself
|
||||||
nodeService.deleteNode(wpNodeRef);
|
nodeService.deleteNode(wpNodeRef);
|
||||||
|
|
||||||
|
sandboxFactory.removeGroupsForStore(sandbox);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getSystemUserName());
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
|
Reference in New Issue
Block a user