Move PolicyQuery to permission-node

Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
Vincenzo Scamporlino
2022-03-24 14:20:32 +01:00
parent b1bbb9c760
commit 2903c1fd5d
6 changed files with 38 additions and 29 deletions
+1 -1
View File
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export type { PermissionPolicy } from './types';
export type { PermissionPolicy, PolicyQuery } from './types';
+15 -1
View File
@@ -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.
*