From b7b63ad527595c9a88e57347a22e39c16948e7f3 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Mon, 14 Mar 2022 11:32:53 +0000 Subject: [PATCH] docs: adjust permission framework plugin author tutorial titles Signed-off-by: MT Lewis --- docs/permission/overview.md | 2 +- .../{setup-for-the-tutorial.md => 01-setup.md} | 6 +++--- ...dpoint.md => 02-adding-a-basic-permission-check.md} | 6 +++--- ...int.md => 03-adding-a-resource-permission-check.md} | 6 +++--- ...t.md => 04-authorizing-access-to-paginated-data.md} | 6 +++--- microsite/sidebars.json | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) rename docs/permission/plugin-authors/{setup-for-the-tutorial.md => 01-setup.md} (97%) rename docs/permission/plugin-authors/{authorize-the-create-endpoint.md => 02-adding-a-basic-permission-check.md} (96%) rename docs/permission/plugin-authors/{authorize-the-update-endpoint.md => 03-adding-a-resource-permission-check.md} (97%) rename docs/permission/plugin-authors/{authorize-the-read-endpoint.md => 04-authorizing-access-to-paginated-data.md} (96%) diff --git a/docs/permission/overview.md b/docs/permission/overview.md index f9baff2830..8e87756faa 100644 --- a/docs/permission/overview.md +++ b/docs/permission/overview.md @@ -38,4 +38,4 @@ The permission framework was designed with a few key properties in mind: See the "[getting started](./getting-started.md)" permission documentation for Backstage integrators. -If you are a plugin author, see the permission [documentation for plugin authors](plugin-authors/setup-for-the-tutorial.md) on how to integrate permissions into your plugin. +If you are a plugin author, see the permission [documentation for plugin authors](plugin-authors/01-setup.md) on how to integrate permissions into your plugin. diff --git a/docs/permission/plugin-authors/setup-for-the-tutorial.md b/docs/permission/plugin-authors/01-setup.md similarity index 97% rename from docs/permission/plugin-authors/setup-for-the-tutorial.md rename to docs/permission/plugin-authors/01-setup.md index 60965e2018..e47311b0d8 100644 --- a/docs/permission/plugin-authors/setup-for-the-tutorial.md +++ b/docs/permission/plugin-authors/01-setup.md @@ -1,12 +1,12 @@ --- -id: setup-for-the-tutorial -title: Permission framework for plugin authors +id: 01-setup +title: 1. Tutorial setup description: How to get started with the permission framework as a plugin author --- The following tutorial is designed to help plugin authors add support for permissions to their plugins. We'll add support for permissions to example `todo-list` and `todo-list-backend` plugins, but the process should be similar for other plugins! -The rest of this page is focused on adding the `todo-list` and `todo-list-backend` plugins to your Backstage instance. If you want to add support for permissions to your own plugin instead, feel free to skip to the [next section](authorize-the-create-endpoint.md). +The rest of this page is focused on adding the `todo-list` and `todo-list-backend` plugins to your Backstage instance. If you want to add support for permissions to your own plugin instead, feel free to skip to the [next section](./02-adding-a-basic-permission-check.md). ## Setup for the Tutorial diff --git a/docs/permission/plugin-authors/authorize-the-create-endpoint.md b/docs/permission/plugin-authors/02-adding-a-basic-permission-check.md similarity index 96% rename from docs/permission/plugin-authors/authorize-the-create-endpoint.md rename to docs/permission/plugin-authors/02-adding-a-basic-permission-check.md index 91ce36c413..cb081e8d24 100644 --- a/docs/permission/plugin-authors/authorize-the-create-endpoint.md +++ b/docs/permission/plugin-authors/02-adding-a-basic-permission-check.md @@ -1,7 +1,7 @@ --- -id: authorize-the-create-endpoint -title: Authorize the create endpoint -description: Authorize the create endpoint +id: 02-adding-a-basic-permission-check +title: 2. Adding a basic permission check +description: Explains how to add a basic permission check to a Backstage plugin --- The first step we need to do in order to authorize the create endpoint, is to create a new `permission` inside our backend plugin. diff --git a/docs/permission/plugin-authors/authorize-the-update-endpoint.md b/docs/permission/plugin-authors/03-adding-a-resource-permission-check.md similarity index 97% rename from docs/permission/plugin-authors/authorize-the-update-endpoint.md rename to docs/permission/plugin-authors/03-adding-a-resource-permission-check.md index e7bb4e4d71..9dbe0e3807 100644 --- a/docs/permission/plugin-authors/authorize-the-update-endpoint.md +++ b/docs/permission/plugin-authors/03-adding-a-resource-permission-check.md @@ -1,7 +1,7 @@ --- -id: authorize-the-update-endpoint -title: Authorize the update endpoint -description: Authorize the update endpoint +id: 03-adding-a-resource-permission-check +title: 3. Adding a resource permission check +description: Explains how to add a resource permission check to a Backstage plugin --- When performing updates (or other operations) on specific resources, the permissions framework allows for the decision to be based on characteristics of the resource itself. This means that it's possible to write policies that (for example) allow the operation for users that own a resource, and deny the operation otherwise. diff --git a/docs/permission/plugin-authors/authorize-the-read-endpoint.md b/docs/permission/plugin-authors/04-authorizing-access-to-paginated-data.md similarity index 96% rename from docs/permission/plugin-authors/authorize-the-read-endpoint.md rename to docs/permission/plugin-authors/04-authorizing-access-to-paginated-data.md index 86d951e6e9..d1d652c9a7 100644 --- a/docs/permission/plugin-authors/authorize-the-read-endpoint.md +++ b/docs/permission/plugin-authors/04-authorizing-access-to-paginated-data.md @@ -1,7 +1,7 @@ --- -id: authorize-the-read-endpoint -title: Authorize the read endpoint -description: Authorize the read endpoint +id: 04-authorizing-access-to-paginated-data +title: 4. Authorizing access to paginated data +description: Explains how to authorize access to paginated data in a Backstage plugin --- Authorizing `GET /todos` is similar to the update endpoint, in that it should be possible to authorize read access to todo entries based on their characteristics. When a `GET /todos` request is received, only the items that the user is permitted to see should be returned. diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 4fd953917a..51da26c7b5 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -268,12 +268,12 @@ "permission/writing-a-policy", { "type": "subcategory", - "label": "Permission framework for plugin authors", + "label": "Tutorial: using Permissions in your plugin", "ids": [ - "permission/plugin-authors/setup-for-the-tutorial", - "permission/plugin-authors/authorize-the-create-endpoint", - "permission/plugin-authors/authorize-the-update-endpoint", - "permission/plugin-authors/authorize-the-read-endpoint" + "permission/plugin-authors/01-setup", + "permission/plugin-authors/02-adding-a-basic-permission-check", + "permission/plugin-authors/03-adding-a-resource-permission-check", + "permission/plugin-authors/04-authorizing-access-to-paginated-data" ] } ],