refactor: rename permission to visibilityPermission
Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -25,7 +25,7 @@ Each action registered with the service must conform to the `ActionsRegistryActi
|
||||
|
||||
### Optional Properties
|
||||
|
||||
- **`permission`:** A `BasicPermission` that controls visibility and access to the action through the permissions framework. See [Permissions](#permissions) below.
|
||||
- **`visibilityPermission`:** A `BasicPermission` that controls visibility and access to the action through the permissions framework. See [Permissions](#permissions) below.
|
||||
- **`attributes`:** Object containing behavioral flags:
|
||||
- **`destructive`:** Boolean indicating if the action modifies or deletes data
|
||||
- **`idempotent`:** Boolean indicating if running the action multiple times produces the same result
|
||||
@@ -160,7 +160,7 @@ export const myPlugin = createBackendPlugin({
|
||||
|
||||
## Permissions
|
||||
|
||||
Actions can optionally declare a `permission` to control visibility and access through the Backstage permissions framework. When a permission is set, the action is only visible in listings and accessible by users who are authorized.
|
||||
Actions can optionally declare a `visibilityPermission` to control visibility and access through the Backstage permissions framework. When a permission is set, the action is only visible in listings and accessible by users who are authorized.
|
||||
|
||||
When accessed via the Actions Service or the `/.backstage/actions/v1/...` HTTP endpoints, actions that are denied by the permission policy are filtered from list results and return a `404 Not Found` on invocation, as if they don't exist.
|
||||
|
||||
@@ -181,7 +181,7 @@ actionsRegistry.register({
|
||||
name: 'delete-entity',
|
||||
title: 'Delete Entity',
|
||||
description: 'Removes an entity from the catalog',
|
||||
permission: myDeletePermission,
|
||||
visibilityPermission: myDeletePermission,
|
||||
schema: {
|
||||
input: z => z.object({ entityRef: z.string() }),
|
||||
output: z => z.object({ deleted: z.boolean() }),
|
||||
@@ -193,7 +193,7 @@ actionsRegistry.register({
|
||||
});
|
||||
```
|
||||
|
||||
Actions without a `permission` field remain visible and accessible by all callers, preserving backwards compatibility.
|
||||
Actions without a `visibilityPermission` field remain visible and accessible by all callers, preserving backwards compatibility.
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ backend:
|
||||
|
||||
### Permissions
|
||||
|
||||
Actions registered with a `permission` field are automatically checked against the permissions framework. When listing actions, any actions denied by the active permission policy are filtered out of the results. When invoking a denied action, a `404 Not Found` error is returned. See the [Actions Registry Permissions](./actions-registry.md#permissions) documentation for how to configure permissions on actions.
|
||||
Actions registered with a `visibilityPermission` field are automatically checked against the permissions framework. When listing actions, any actions denied by the active permission policy are filtered out of the results. When invoking a denied action, a `404 Not Found` error is returned. See the [Actions Registry Permissions](./actions-registry.md#permissions) documentation for how to configure permissions on actions.
|
||||
|
||||
## Using the Service
|
||||
|
||||
|
||||
Reference in New Issue
Block a user