mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1427 (Delete RM site permanently)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@66031 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.site.SiteInfo;
|
||||
import org.alfresco.service.cmr.site.SiteService;
|
||||
import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
@@ -74,6 +75,9 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
/** Capability service */
|
||||
protected CapabilityService capabilityService;
|
||||
|
||||
/** Authority service */
|
||||
private AuthorityService authorityService;
|
||||
|
||||
/** Map of file plan type's key'ed by corresponding site types */
|
||||
protected Map<QName, QName> mapFilePlanType = new HashMap<QName, QName>(3);
|
||||
|
||||
@@ -102,6 +106,14 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
this.capabilityService = capabilityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authorityService authority service
|
||||
*/
|
||||
public void setAuthorityService(AuthorityService authorityService)
|
||||
{
|
||||
this.authorityService = authorityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a file plan type for a specific site type.
|
||||
*
|
||||
@@ -256,6 +268,10 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
{
|
||||
throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan.");
|
||||
}
|
||||
|
||||
// delete the authority
|
||||
String siteGroup = siteService.getSiteGroup(siteInfo.getShortName());
|
||||
authorityService.deleteAuthority(siteGroup, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user