UNPKG

@solid/community-server

Version:

Community Solid Server: an open and modular implementation of the Solid specifications

30 lines (29 loc) 1.58 kB
import type { PermissionMap } from '@solidlab/policy-engine'; import type { AuxiliaryStrategy } from '../http/auxiliary/AuxiliaryStrategy'; import type { PermissionReaderInput } from './PermissionReader'; import { PermissionReader } from './PermissionReader'; import type { MultiPermissionMap } from './permissions/Permissions'; /** * Determines the permission for authorization resources (such as ACL or ACR). * In contrast to the regular resource mechanism, read/write access to authorization resources * is obtained by setting Control permissions on the corresponding subject resource * rather than directly setting permissions for the authorization resource itself. * Hence, this class transforms Control permissions on the subject resource * to Read/Write permissions on the authorization resource. */ export declare class AuthAuxiliaryReader extends PermissionReader { protected readonly logger: import("global-logger-factory").Logger<unknown>; private readonly reader; private readonly authStrategy; constructor(reader: PermissionReader, authStrategy: AuxiliaryStrategy); handle({ requestedModes, credentials }: PermissionReaderInput): Promise<MultiPermissionMap>; /** * Finds all authorization resource identifiers and maps them to their subject identifier and the requested modes. */ private findAuth; /** * Updates the permissions for an authorization resource * by interpreting the Control access mode as allowing full access. */ protected interpretControl(permissionMap?: PermissionMap): PermissionMap; }