mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge remote-tracking branch 'remotes/origin/feature/RM-6171_ViewClassifyAction' into feature/RM-2053_ClassificationCapability_UI_tests
This commit is contained in:
@@ -151,4 +151,12 @@ public interface CapabilityService
|
|||||||
* @param group The group which should be removed
|
* @param group The group which should be removed
|
||||||
*/
|
*/
|
||||||
void removeGroup(Group group);
|
void removeGroup(Group group);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the current user has the given capability.
|
||||||
|
*
|
||||||
|
* @param capabilityName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean hasCapability(NodeRef nodeRef, String capabilityName);
|
||||||
}
|
}
|
||||||
|
@@ -282,4 +282,24 @@ public class CapabilityServiceImpl implements CapabilityService
|
|||||||
|
|
||||||
groups.remove(group.getId());
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -154,6 +154,14 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
this.capabilityService = capabilityService;
|
this.capabilityService = capabilityService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the nodeService
|
||||||
|
*/
|
||||||
|
protected CapabilityService getCapabilityService()
|
||||||
|
{
|
||||||
|
return this.capabilityService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dictionaryService dictionary service
|
* @param dictionaryService dictionary service
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user