Capitalizes the input string.
String to transform.
The capitalized string.
Checks if the authorization grants the agent permission to use the given mode. Throws a ForbiddenHttpError or UnauthorizedHttpError depending on the credentials if access is not allowed.
Agent that wants access.
An Authorization containing the permissions the agent has on the resource.
Which mode is requested.
Creates an Authorization object based on the quads found in the store.
Agent who's credentials will be used for the user
field.
Store containing all relevant authorization triples.
Creates the authorization permissions for the given credentials.
Credentials to find the permissions for.
Store containing all relevant authorization triples.
Finds all triples in the data stream of the given representation that use the given predicate and object. Then extracts the unique subjects from those triples, and returns a Store containing all triples from the data stream that have such a subject.
This can be useful for finding the acl:Authorization
objects corresponding to a specific URI
and returning all relevant information on them.
Representation with data stream of internal/quads.
Predicate to match.
Object to match.
A store containing the relevant triples.
Returns the acl triples that are relevant for the given identifier. These can either be from a corresponding acl file or an acl file higher up with defaults. Rethrows any non-NotFoundHttpErrors thrown by the ResourceStore.
ResourceIdentifier of which we need the acl triples.
Only used internally for recursion.
A store containing the relevant acl triples.
Returns the identifiers of all authorizations that grant the given mode access for a resource.
The store containing the quads of the acl resource.
A valid acl mode (ACL.Write/Read/...)
Checks if an agent is allowed to execute the requested actions. Will throw an error if this is not the case.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not. Return value depends on the given type.
Checks if the given agent has access to the modes specified by the given authorization.
Credentials of agent that needs access.
acl:Authorization that needs to be checked.
A store containing the relevant triples of the authorization.
If the agent has access.
Checks if the given agent has permission to execute the given mode based on the triples in the store.
Agent that wants access.
A store containing the relevant triples for authorization.
Which mode is requested.
Handles most web access control predicates such as
acl:mode
,acl:agentClass
,acl:agent
,acl:default
andacl:accessTo
. Does not supportacl:agentGroup
,acl:origin
andacl:trustedApp
yet.