Skip to main content
Version: Next

PermissionsService.authorizeConditional()

Home > @backstage/backend-plugin-api > PermissionsService > authorizeConditional

Evaluates ResourcePermissions and returns both definitive and conditional decisions, depending on the configured PermissionPolicy.

Signature:

authorizeConditional(requests: QueryPermissionRequest[], options: PermissionsServiceRequestOptions): Promise<QueryPermissionResponse[]>;

Parameters

Parameter

Type

Description

requests

QueryPermissionRequest[]

options

PermissionsServiceRequestOptions

**Returns:**

Promise<QueryPermissionResponse[]>

Remarks

This method is useful when the caller needs more control over the processing of conditional decisions. For example, a plugin backend may want to use conditions in a database query instead of evaluating each resource in memory.

The returned array has the same number of items, in the same order, as the given requests.