@inrupt/solid-client

Globals / “acl/agent”

Module: “acl/agent”

Type aliases

AgentAccess

Ƭ AgentAccess: Record<WebId, Access>

Defined in src/acl/agent.ts:61

Note

The Web Access Control specification is not yet finalised. As such, this function is still experimental and subject to change, even in a non-major release.

Functions

getAgentAccess

getAgentAccess(resourceInfo: WithAcl & WithServerResourceInfo, agent: WebId): Access | null

Defined in src/acl/agent.ts:77

Note

This function is still experimental and subject to change, even in a non-major release.

Returns an Agent’s explicitly-granted Access Modes for the given Resource.

The function does not return Access Modes granted indirectly to the Agent through other ACL rules, e.g., public or group-specific permissions.

Parameters:

Name

Type

Description

resourceInfo

WithAcl & WithServerResourceInfo

Information about the Resource to which the given Agent may have been granted access.

agent

WebId

WebID of the Agent for which to retrieve what access it has to the Resource.

Returns: Access | null

Access Modes that have been explicitly granted to the Agent for the given Resource, or null if it could not be determined (e.g. because the current user does not have Control access to a given Resource or its Container).


getAgentAccessAll

getAgentAccessAll(resourceInfo: WithAcl & WithServerResourceInfo): AgentAccess | null

Defined in src/acl/agent.ts:102

Note

This function is still experimental and subject to change, even in a non-major release.

Returns all explicitly-granted Access Modes per Agent for the given Resource.

The function does not return Access Modes granted indirectly to Agents through other ACL rules, e.g., public or group-specific permissions.

Parameters:

Name

Type

Description

resourceInfo

WithAcl & WithServerResourceInfo

Information about the Resource to which Agents may have been granted access.

Returns: AgentAccess | null

Access Modes per Agent that have been explicitly granted for the given Resource, or null if it could not be determined (e.g. because the current user does not have Control access to a given Resource or its Container).


getAgentDefaultAccess

getAgentDefaultAccess(aclDataset: AclDataset, agent: WebId): Access

Defined in src/acl/agent.ts:247

Note

This function is still experimental and subject to change, even in a non-major release.

Returns an Agent’s Access Modes explicitly granted for the children of the Container associated with the given ACL (Access Control List).

The function does not return:

  • Access Modes granted indirectly to the Agent through other ACL rules, e.g. public or group-specific permissions.

  • Access Modes granted to the Agent for the Container Resource itself (see getAgentResourceAccess instead).

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access-Control List rules for a certain Container.

agent

WebId

WebID of the Agent for which to retrieve what access it has to the Container’s children.

Returns: Access

Access Modes that have been explicitly granted to an Agent for the children of the Container associated with the given ACL.


getAgentDefaultAccessAll

getAgentDefaultAccessAll(aclDataset: AclDataset): AgentAccess

Defined in src/acl/agent.ts:277

Note

This function is still experimental and subject to change, even in a non-major release.

Returns the Access Modes, per Agent, that have been explicitly granted for the children of the Container associated with the given ACL (Access Control List).

The function does not return:

  • Access Modes granted indirectly to the Agents through other ACL rules, e.g. public or group-specific permissions.

  • Access Modes granted to the Agents for the Container Resource itself (see getAgentResourceAccessAll instead).

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access-Control List rules.

Returns: AgentAccess

Access Modes, per Agent, that have been explicitly granted for the children of the Container associated with the given ACL.


getAgentResourceAccess

getAgentResourceAccess(aclDataset: AclDataset, agent: WebId): Access

Defined in src/acl/agent.ts:133

Note

This function is still experimental and subject to change, even in a non-major release.

Returns the Access Modes explicitly granted to an Agent for the Resource associated with an ACL (Access ControlList).

The function does not return:

  • Access Modes granted indirectly to the Agent through other ACL rules, e.g., public or group-specific permissions.

  • Access Modes granted to the Agent for the child Resources if the associated Resource is a Container (see getAgentDefaultAccess instead).

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains ACL rules.

agent

WebId

WebID of the Agent for which to retrieve what access it has to the Resource.

Returns: Access

Access Modes that have been explicitly granted to an Agent for the Resource associated with an ACL SolidDataset.


getAgentResourceAccessAll

getAgentResourceAccessAll(aclDataset: AclDataset): AgentAccess

Defined in src/acl/agent.ts:163

Note

This function is still experimental and subject to change, even in a non-major release.

Returns the explicitly granted Access Modes per Agent for the Resource associated with an ACL (Access Control List).

The function does not return:

  • Access Modes granted indirectly to Agents through other ACL rules, e.g., public or group-specific permissions.

  • Access Modes granted to Agents for the child Resources if the associated Resource is a Container.

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains ACL rules.

Returns: AgentAccess

Access Modes per Agent that have been explicitly granted for the Resource associated with an ACL SolidDataset.


setAgentDefaultAccess

setAgentDefaultAccess(aclDataset: AclDataset, agent: WebId, access: Access): AclDataset & WithChangeLog

Defined in src/acl/agent.ts:309

Note

This function is still experimental and subject to change, even in a non-major release.

Modifies the default ACL (Access Control List) to set an Agent’s Access Modes for the Container’s children. Specifically, the function returns a new default ACL initialised with the given ACL and new rules for the Agent’s access.

If rules already exist for the Agent in the given ACL, in the returned ACL, they are replaced by the new rules.

This function does not modify:

  • Access Modes granted indirectly to the Agent through other ACL rules, e.g., public or group-specific permissions.

  • Access Modes granted to the Agent for the Container Resource itself.

  • The original ACL.

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access-Control List rules.

agent

WebId

The Agent to grant specific Access Modes.

access

Access

The Access Modes to grant to the Agent.

Returns: AclDataset & WithChangeLog

A new default ACL initialised with the given aclDataset and access for the agent.


setAgentResourceAccess

setAgentResourceAccess(aclDataset: AclDataset, agent: WebId, access: Access): AclDataset & WithChangeLog

Defined in src/acl/agent.ts:195

Note

This function is still experimental and subject to change, even in a non-major release.

Modifies the resource ACL (Access Control List) to set the Access Modes for the given Agent. Specifically, the function returns a new resource ACL initialised with the given ACL and new rules for the Agent’s access.

If rules for Agent’s access already exist in the given ACL, in the returned ACL, they are replaced by the new rules.

This function does not modify:

  • Access Modes granted indirectly to Agents through other ACL rules, e.g., public or group-specific permissions.

  • Access Modes granted to Agents for the child Resources if the associated Resource is a Container.

  • The original ACL.

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access-Control List rules.

agent

WebId

The Agent to grant specific Access Modes.

access

Access

The Access Modes to grant to the Agent for the Resource.

Returns: AclDataset & WithChangeLog

A new resource ACL initialised with the given aclDataset and access for the agent.