| ACLFilter | R Documentation |
Access Control List filter for security-aware search
acl_fieldMetadata field containing ACLs
new()Create a new ACLFilter
ACLFilter$new(acl_field = "_acl")
acl_fieldField name for ACLs (default: "_acl")
filter()Filter documents based on user's ACL principals
ACLFilter$filter(documents, user_principals, default_allow = FALSE)
documentsList of documents with metadata
user_principalsCharacter vector or list of ACLPrincipal
default_allowAllow if no ACL defined (default: FALSE)
Filtered documents
add_acl()Add ACL to document metadata
ACLFilter$add_acl(metadata, principals)
metadataDocument metadata
principalsCharacter vector of principal strings
Updated metadata
create_filter_condition()Create ACL filter condition for query
ACLFilter$create_filter_condition(user_principals)
user_principalsCharacter vector of principals
Filter condition list
clone()The objects of this class are cloneable with this method.
ACLFilter$clone(deep = FALSE)
deepWhether to make a deep clone.
## Not run:
acl_filter <- ACLFilter$new()
filtered <- acl_filter$filter(
documents = results,
user_principals = c("user:alice", "group:engineering")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.