Skip to main content
Version: Next

PermissionsRegistryServiceAddResourceTypeOptions

Home > @backstage/backend-plugin-api > PermissionsRegistryServiceAddResourceTypeOptions

Options for adding a resource type to the permission system.

Signature:

export type PermissionsRegistryServiceAddResourceTypeOptions<TResourceType extends string, TResource> = {
resourceType: TResourceType;
permissions?: Array<Permission>;
rules: PermissionRule<TResource, any, NoInfer<TResourceType>>[];
getResources?(resourceRefs: string[]): Promise<Array<TResource | undefined>>;
};

References: Permission, PermissionRule