Class ParentContainerReader

Determines delete and create permissions for those resources that need it by making sure the parent container has the required permissions.

Create requires append permissions on the parent container. Delete requires write permissions on both the parent container and the resource itself.

Hierarchy

Constructors

Properties

identifierStrategy: IdentifierStrategy
logger: Logger = ...

Methods

  • Merges the container permission set into the resource permission set based on the parent container rules for create/delete permissions.

    Parameters

    • Optional resourceSet: Partial<Record<AccessMode, boolean>>
    • Optional containerSet: Partial<Record<AccessMode, boolean>>

    Returns Partial<Record<AccessMode, boolean>>

  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    Returns Promise<void>

    A promise resolving if the input can be handled, rejecting with an Error if not.

  • Determines the create and delete permissions for the given resource permissions based on those of its parent container.

    Parameters

    • resourcePermission: Partial<Record<AccessMode, boolean>>
    • containerPermission: Partial<Record<AccessMode, boolean>>

    Returns Partial<Record<AccessMode, boolean>>