public class AttributeAclSecurityManager extends AbstractBddSecurityManager implements BddSecurityManager, java.io.Serializable
BddSecurityManager
.
This implementation filters records in a collection according to access control list (ACL) multi-assign attributes which have been added to
each record during data-ingest. This class assumes that these attributes are named:
mdex:string
and isSingleAssign=false
.
Each record is filtered according to the name of the user and those of the groups/roles held by that user, the names of which need to be
assigned to the above attributes.Modifier and Type | Class and Description |
---|---|
protected static class |
AttributeAclSecurityManager.OrExpressionBuilder
Builder helper that simpifies building a long chain of nested OR expressions, equivalent to A OR B OR C ... etc.
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_ALLOW_GROUP_ACL_ATTRIBUTE_KEY
Default name for the multi-assigned attribute which holds permitted groups for the record.
|
protected static java.lang.String |
DEFAULT_ALLOW_ROLE_ACL_ATTRIBUTE_KEY
Default name for the multi-assigned attribute which holds permitted roles for the record.
|
protected static java.lang.String |
DEFAULT_ALLOW_USER_ACL_ATTRIBUTE_KEY
Default name for the multi-assigned attribute which holds permitted users for the record.
|
Constructor and Description |
---|
AttributeAclSecurityManager() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<com.endeca.mdex.conversation.types.EQLFilter> |
createFilters(javax.portlet.PortletRequest request,
MDEXState mdexState,
Query query,
com.endeca.mdex.conversation.types.State state,
com.liferay.portal.model.User user,
java.util.List<com.liferay.portal.model.UserGroup> userGroups,
java.util.Set<com.liferay.portal.model.Role> roles)
Creates the list of security filters, or returns an empty list if this state/collection should not be filtered.
|
protected java.lang.String |
getAllowGroupAclAttributeKey(com.endeca.mdex.conversation.types.State state) |
protected java.lang.String |
getAllowRoleAclAttributeKey(com.endeca.mdex.conversation.types.State state) |
protected java.lang.String |
getAllowUserAclAttributeKey(com.endeca.mdex.conversation.types.State state) |
protected java.lang.String |
getUserIdentifier(com.liferay.portal.model.User user) |
protected com.endeca.mdex.eql_parser.types.SetMembershipExpression |
in(java.lang.String attributeValue,
java.lang.String attributeKeyOfSet)
Creates a
SetMembershipExpression to see if the static value supplied is in the multi-attribute's assignments. |
applyFilters, applySecurity, lookupGroups, lookupRoles, lookupUser
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applySecurity
protected static final java.lang.String DEFAULT_ALLOW_USER_ACL_ATTRIBUTE_KEY
protected static final java.lang.String DEFAULT_ALLOW_GROUP_ACL_ATTRIBUTE_KEY
protected static final java.lang.String DEFAULT_ALLOW_ROLE_ACL_ATTRIBUTE_KEY
protected java.util.List<com.endeca.mdex.conversation.types.EQLFilter> createFilters(javax.portlet.PortletRequest request, MDEXState mdexState, Query query, com.endeca.mdex.conversation.types.State state, com.liferay.portal.model.User user, java.util.List<com.liferay.portal.model.UserGroup> userGroups, java.util.Set<com.liferay.portal.model.Role> roles) throws BddSecurityException
createFilters
in class AbstractBddSecurityManager
EQLFilter
to secure the current state/collection for this userBddSecurityException
protected com.endeca.mdex.eql_parser.types.SetMembershipExpression in(java.lang.String attributeValue, java.lang.String attributeKeyOfSet)
SetMembershipExpression
to see if the static value supplied is in the multi-attribute's assignments.attributeValue
- attributeKeyOfSet
- protected java.lang.String getAllowUserAclAttributeKey(com.endeca.mdex.conversation.types.State state)
protected java.lang.String getAllowGroupAclAttributeKey(com.endeca.mdex.conversation.types.State state)
protected java.lang.String getAllowRoleAclAttributeKey(com.endeca.mdex.conversation.types.State state)
protected java.lang.String getUserIdentifier(com.liferay.portal.model.User user)
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.