acl.add(new ACE(defaultGroup, READ, true));
}
private void makePublicDashboardReadable(CoreSession session,
SocialWorkspace socialWorkspace) throws ClientException {
PathRef dashboardSpacesRootRef = new PathRef(
socialWorkspace.getDashboardSpacesRootPath());
DocumentModel dashboardSpacesRoot = session.getDocument(dashboardSpacesRootRef);
ACP acp = dashboardSpacesRoot.getACP();
ACL acl = acp.getOrCreateACL(PUBLIC_SOCIAL_WORKSPACE_ACL_NAME);
acl.clear();
addReadForDefaultGroup(acl);
dashboardSpacesRoot.setACP(acp, true);
session.saveDocument(dashboardSpacesRoot);
PathRef privateDashboardSpaceRef = new PathRef(
socialWorkspace.getPrivateDashboardSpacePath());
DocumentModel privateDashboardSpace = session.getDocument(privateDashboardSpaceRef);
acp = privateDashboardSpace.getACP();
acl = acp.getOrCreateACL(PUBLIC_SOCIAL_WORKSPACE_ACL_NAME);
addSocialWorkspaceACL(acl, socialWorkspace);