本文整理了Java中org.nuxeo.ecm.core.api.security.ACL.remove()
方法的一些代码示例,展示了ACL.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ACL.remove()
方法的具体详情如下:
包路径:org.nuxeo.ecm.core.api.security.ACL
类名称:ACL
方法名:remove
[英]Remove all ACEs for username.
[中]删除用户名的所有ACE。
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-api
@Override
public boolean removeACE(String aclName, ACE ace) {
if (aclName == null) {
throw new NullPointerException("'aclName' cannot be null");
}
ACL acl = getOrCreateACL(aclName);
boolean aclChanged = acl.remove(ace);
if (aclChanged) {
addACL(acl);
}
return aclChanged;
}
代码示例来源:origin: opentoutatice-ecm.platform/opentoutatice-ecm-platform-automation
/**
* Restore inheritance.
*
* @param session
* @param document
* @return acp
*/
protected ACP restoreInheritanceIfNecessary(CoreSession session, DocumentModel document, ACL localAcl) {
// ACP
ACP acp = document.getACP();
// Remove default rule
ACL defaultLocalACL = ACEsOperationHelper.buildDefaultLocalACL(session, document);
if (localAcl.containsAll(defaultLocalACL)) {
localAcl.removeAll(defaultLocalACL);
}
// Remove block to restore inheritance
ACE blockInACe = ACEsOperationHelper.getBlockInheritanceACe();
if (localAcl.contains(blockInACe)) {
localAcl.remove(blockInACe);
}
// To clear cache
acp.addACL(localAcl);
return acp;
}
//
代码示例来源:origin: opentoutatice-ecm.platform/opentoutatice-ecm-platform-automation
for (ACE ace : acl) {
if (ace.getUsername().equals(userName)) {
treatAcl.remove(ace);
acl.remove(ace);
代码示例来源:origin: org.nuxeo.ecm.routing/nuxeo-routing-core
@Override
public void run() {
DocumentModel instance = session.getDocument(documentRef);
if (instance == null) {
return;
}
ACP acp = instance.getACP();
// remove READ for everyone
ACL routingACL = acp.getOrCreateACL(DocumentRoutingConstants.DOCUMENT_ROUTING_ACL);
routingACL.remove(new ACE(SecurityConstants.EVERYONE, SecurityConstants.READ, true));
// unblock rights inheritance
ACL localACL = acp.getOrCreateACL(ACL.LOCAL_ACL);
localACL.remove(new ACE(SecurityConstants.EVERYONE, SecurityConstants.EVERYTHING, false));
instance.setACP(acp, true);
}
内容来源于网络,如有侵权,请联系作者删除!