Move PolicyQuery to permission-node
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type { PermissionPolicy } from './types';
|
||||
export type { PermissionPolicy, PolicyQuery } from './types';
|
||||
|
||||
@@ -15,11 +15,25 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Permission,
|
||||
PolicyDecision,
|
||||
PolicyQuery,
|
||||
} from '@backstage/plugin-permission-common';
|
||||
import { BackstageIdentityResponse } from '@backstage/plugin-auth-node';
|
||||
|
||||
/**
|
||||
* A query to be evaluated by the {@link PermissionPolicy}.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Unlike other parts of the permission API, the policy does not accept a resource ref. This keeps
|
||||
* the policy decoupled from the resource loading and condition applying logic.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type PolicyQuery = {
|
||||
permission: Permission;
|
||||
};
|
||||
|
||||
/**
|
||||
* A policy to evaluate authorization requests for any permissioned action performed in Backstage.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user