refactor: rename permission to visibilityPermission

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2026-03-12 15:07:32 +01:00
parent 5f739e1312
commit 97c917ea1c
9 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
'@backstage/backend-plugin-api': minor
---
Added optional `permission` field to `ActionsRegistryActionOptions`, allowing actions to declare a `BasicPermission` that controls visibility and access.
Added optional `visibilityPermission` field to `ActionsRegistryActionOptions`, allowing actions to declare a `BasicPermission` that controls visibility and access.
```typescript
import { createPermission } from '@backstage/plugin-permission-common';
@@ -16,7 +16,7 @@ actionsRegistry.register({
name: 'my-action',
title: 'My Action',
description: 'An action that requires permission',
permission: myPermission,
visibilityPermission: myPermission,
schema: {
input: z => z.object({ name: z.string() }),
output: z => z.object({ ok: z.boolean() }),
@@ -27,4 +27,4 @@ actionsRegistry.register({
});
```
Actions without a `permission` field continue to work as before.
Actions without a `visibilityPermission` field continue to work as before.
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/backend-defaults': patch
---
Added permissions integration to the actions registry. Actions registered with a `permission` field are now checked against the permissions framework when listing and invoking. Denied actions are filtered from list results, and invoking a denied action returns a `404 Not Found` as if the action does not exist. Permissions are automatically registered with the `PermissionsRegistryService` so they appear in the permission policy system.
Added permissions integration to the actions registry. Actions registered with a `visibilityPermission` field are now checked against the permissions framework when listing and invoking. Denied actions are filtered from list results, and invoking a denied action returns a `404 Not Found` as if the action does not exist. Permissions are automatically registered with the `PermissionsRegistryService` so they appear in the permission policy system.