Skip to main content
Version: Next

createPermission()

Home > @backstage/plugin-permission-common > createPermission

Utility function for creating a valid ResourcePermission, inferring the appropriate type and resource type parameter.

Signature:

function createPermission<TResourceType extends string>(input: {
name: string;
attributes: PermissionAttributes;
resourceType: TResourceType;
}): ResourcePermission<TResourceType>;

Parameters

Parameter

Type

Description

input

{ name: string; attributes: PermissionAttributes; resourceType: TResourceType; }

**Returns:**

ResourcePermission<TResourceType>