@inrupt/solid-client / acl/group

Module: acl/group#

Functions#

getGroupAccess#

getGroupAccess(resourceInfo, group): Access | null

Note

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

Returns a Group’s explicity-granted Access Modes for a given Resource.

The function does not return Access Modes granted indirectly to the Group through other ACL rules, e.g., public permissions.

Parameters#

Name

Type

Description

resourceInfo

WithAcl & WithResourceInfo & { }

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

group

string

URL of the Group for which to retrieve what access it has to the Resource.

Returns#

Access | null

Access Modes that have been explicitly granted to the group 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).

Defined in#

src/acl/group.ts:60


getGroupAccessAll#

getGroupAccessAll(resourceInfo): Record<IriString, Access> | null

Note

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

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

The function does not return Access Modes granted indirectly to the Group through other ACL rules, e.g., public permissions.

Parameters#

Name

Type

Description

resourceInfo

WithAcl & WithResourceInfo & { }

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

Returns#

Record<IriString, Access> | null

Access Modes per Group 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).

Defined in#

src/acl/group.ts:85


getGroupDefaultAccess#

getGroupDefaultAccess(aclDataset, group): Access

Note

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

Returns a Group’s Access Modes explicitly granted for the children of the Container associated with an ACL (Access ControlList).

The function does not return:

  • Access Modes granted indirectly to the Group through other ACL rules, e.g. public permissions.

  • Access Modes granted to the Group for the Container Resource itself (see [[getGroupResourceAccess]] instead).

Parameters#

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains ACL rules for a certain Container.

group

string

URL of the Group for which to retrieve what access it has to the child Resources of the given Container.

Returns#

Access

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

Defined in#

src/acl/group.ts:169


getGroupDefaultAccessAll#

getGroupDefaultAccessAll(aclDataset): Record<UrlString, Access>

Note

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

Returns the Access Modes, per Group, 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 Groups through other ACL rules, e.g. public permissions.

  • Access Modes granted to the Groups for the Container Resource itself (see [[getGroupResourceAccessAll]] instead).

Parameters#

Name

Type

Description

aclDataset

AclDataset

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

Returns#

Record<UrlString, Access>

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

Defined in#

src/acl/group.ts:197


getGroupResourceAccess#

getGroupResourceAccess(aclDataset, group): Access

Note

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

Returns the Access Modes explicitly granted to a Group for the Resource associated with an ACL (Access Control List).

The function does not return:

  • Access Modes granted indirectly to the Group through other ACL rules, e.g., public permissions.

  • Access Modes granted to the Group for the child Resources if the associated Resource is a Container (see [[getGroupDefaultAccess]] instead).

Parameters#

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access Control List rules.

group

string

URL of the Group for which to retrieve what access it has to the Resource.

Returns#

Access

Access Modes explicitly granted to a Group for the Resource associated with an ACL.

Defined in#

src/acl/group.ts:115


getGroupResourceAccessAll#

getGroupResourceAccessAll(aclDataset): Record<UrlString, Access>

Note

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

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

The function does not return:

  • Access Modes granted indirectly to the Group through other ACL rules, e.g., public permissions.

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

Parameters#

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access Control List rules.

Returns#

Record<UrlString, Access>

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

Defined in#

src/acl/group.ts:143


setGroupDefaultAccess#

setGroupDefaultAccess(aclDataset, group, access): AclDataset & WithChangeLog

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 a Group’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 Group’s access.

If rules already exist for the Group 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 Group through other ACL rules, e.g., public or Agent-specific permissions.

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

  • The original ACL.

Parameters#

Name

Type

Description

aclDataset

AclDataset

The SolidDataset that contains Access-Control List rules.

group

string

The Group to grant specific Access Modes.

access

Access

The Access Modes to grant to the Group.

Returns#

AclDataset & WithChangeLog

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

Since

1.4.0

Defined in#

src/acl/group.ts:278


setGroupResourceAccess#

setGroupResourceAccess(aclDataset, group, access): AclDataset & WithChangeLog

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 Group. Specifically, the function returns a new resource ACL initialised with the given ACL and new rules for the Group’s access.

If rules for Groups’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 Groups through other ACL rules, e.g., public or Agent-specific permissions.

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

group

string

The Group to grant specific Access Modes.

access

Access

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

Returns#

AclDataset & WithChangeLog

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

Since

1.4.0

Defined in#

src/acl/group.ts:242