Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6245_AutomateAcForCategoryId_fp

This commit is contained in:
Rodica Sutu
2018-04-11 16:14:43 +03:00
3 changed files with 44 additions and 0 deletions

View File

@@ -151,4 +151,12 @@ public interface CapabilityService
* @param group The group which should be removed
*/
void removeGroup(Group group);
/**
* Check if the current user has the given capability.
*
* @param capabilityName
* @return
*/
boolean hasCapability(NodeRef nodeRef, String capabilityName);
}

View File

@@ -282,4 +282,24 @@ public class CapabilityServiceImpl implements CapabilityService
groups.remove(group.getId());
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService#hasCapability(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Override
public boolean hasCapability(NodeRef nodeRef, String capabilityName)
{
Capability capability = getCapability(capabilityName);
if (capability != null)
{
AccessStatus accessStatus = getCapabilityAccessState(nodeRef, capabilityName);
if (accessStatus.equals(AccessStatus.ALLOWED))
{
return true;
}
}
return false;
}
}

View File

@@ -154,6 +154,22 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
this.capabilityService = capabilityService;
}
/**
* @return the filePlanService
*/
protected FilePlanService getFileplanService()
{
return this.filePlanService;
}
/**
* @return the capabilityService
*/
protected CapabilityService getCapabilityService()
{
return this.capabilityService;
}
/**
* @param dictionaryService dictionary service
*/