@inrupt/solid-client

Globals / “acl/class”

Module: “acl/class”

Functions

getPublicAccess

getPublicAccess(resourceInfo: WithAcl & WithServerResourceInfo): Access | null

Defined in src/acl/class.ts:61

Note

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

Returns the Access Modes granted to the public in general for a Resource.

This function does not return Access Modes granted to specific Agents through other ACL (Access Control List) rules, e.g., agent- 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.

Returns: Access | null

Access Modes granted to the public in general for the 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).


getPublicDefaultAccess

getPublicDefaultAccess(aclDataset: AclDataset): Access

Defined in src/acl/class.ts:117

Note

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

Returns the Access Modes granted to the public in general for the child Resources of the Container associated with an ACL (Access Control List).

This function does not return:

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

  • Access Modes to the Container Resource itself (see getPublicResourceAccess instead).

Parameters:

Name

Type

Description

aclDataset

AclDataset

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

Returns: Access

Access Modes granted to the public in general for the children of the Container associated with the given aclDataset.


getPublicResourceAccess

getPublicResourceAccess(aclDataset: AclDataset): Access

Defined in src/acl/class.ts:88

Note

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

Returns the Access Modes granted to the public in general for the Resource associated with an ACL (Access Control List).

This function does not return:

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

  • Access Modes to child Resources if the associated Resource is a Container (see getPublicDefaultAccess instead).

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access Control List rules.

Returns: Access

Access Modes granted to the public in general for the Resource associated with the aclDataset.


setPublicDefaultAccess

setPublicDefaultAccess(aclDataset: AclDataset, access: Access): AclDataset & WithChangeLog

Defined in src/acl/class.ts:205

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 the public’s default Access Modes to child resources. Specifically, the function returns a new default ACL initialised with the given default ACL and new rules for the given public access.

If rules for public 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 to Agents through other ACL rules, e.g., agent- or group-specific permissions.

  • Access Modes to Container Resource itself.

  • The original ACL.

Parameters:

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access Control List rules.

access

Access

The Access Modes to grant to the public.

Returns: AclDataset & WithChangeLog

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


setPublicResourceAccess

setPublicResourceAccess(aclDataset: AclDataset, access: Access): AclDataset & WithChangeLog

Defined in src/acl/class.ts:152

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 public. Specifically, the function returns a new resource ACL (Access Control List) initialised with the given resource ACL and new rules for the given public access.

If rules for public 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 to Agents through other ACL rules, e.g., agent- or group-specific permissions.

  • Access Modes to 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.

access

Access

The Access Modes to grant to the public.

Returns: AclDataset & WithChangeLog

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