permission-node: doc fixes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-02-04 15:39:10 +01:00
parent 2c7d35f844
commit d1a4831725
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -68,14 +68,12 @@ export type PermissionRule<
};
/**
* A function that can be used to look up permission rules by name for a particular resource type.
* A set of registered rules for a particular resource type.
*
* @remarks
*
* Accessed via {@link @backstage/backend-plugin-api#PermissionsRegistryService.getPermissionRuleset}.
*
* Will throw an error if a rule with the provided name does not exist.
*
* @public
*/
export type PermissionRuleset<
@@ -83,5 +81,12 @@ export type PermissionRuleset<
TQuery = unknown,
TResourceType extends string = string,
> = {
/**
* Returns a resource permission rule by name.
*
* @remarks
*
* Will throw an error if a rule with the provided name does not exist.
*/
getRuleByName(name: string): PermissionRule<TResource, TQuery, TResourceType>;
};