Skip to main content

createPermissionRule()

Home > @backstage/plugin-permission-node > createPermissionRule

Helper function to create a PermissionRule for a specific resource type using a PermissionResourceRef.

Signature:

function createPermissionRule<TRef extends PermissionResourceRef, TParams extends PermissionRuleParams = undefined>(rule: CreatePermissionRuleOptions<TRef, TParams>): PermissionRule<TRef['TResource'], TRef['TQuery'], TRef['resourceType'], TParams>;

Parameters

Parameter

Type

Description

rule

CreatePermissionRuleOptions<TRef, TParams>

**Returns:**

PermissionRule<TRef['TResource'], TRef['TQuery'], TRef['resourceType'], TParams>