Skip to content

azure-devops - Updated permissions section in README #4230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/azure-devops/.changeset/modern-pigs-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-azure-devops': patch
---

Updated permissions section in `README` to remove legacy backend references and to make the instructions more clear
21 changes: 2 additions & 19 deletions workspaces/azure-devops/plugins/azure-devops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,33 +322,16 @@ To get the README component working you'll need to do the following two steps:

## Permission Framework

Azure DevOps plugin supports the permission framework for PRs, GitTags, Pipelines and Readme features.
Azure DevOps plugin supports the permission framework for PRs, GitTags, Pipelines and Readme features. To use these permissions you'll need to add the `@backstage-community/plugin-azure-devops-common` to the same location as your [Permission Policy](https://backstage.io/docs/permissions/writing-a-policy). This example assumes that your Permission Policy lives in your `packages/backend`:

```bash
# From your Backstage root directory
yarn --cwd packages/backend add @backstage-community/plugin-azure-devops-common
```

New Backend you can skip the below and proceed with [permission configuration](#configure-permission)

To enable permissions for the legacy backend system in `packages/backend/src/plugins/azure-devops.ts` add the following.

```diff
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return createRouter({
logger: env.logger,
config: env.config,
reader: env.reader,
+ permissions: env.permissions,
});
}
```

### Configure Permission

To apply the permission rules add the following in `packages/backend/src/plugins/permissions.ts`.
To apply the permission rules add the following in to your [Permission Policy](https://backstage.io/docs/permissions/writing-a-policy).

> Note: the following is just an example of how you might want to setup permissions, as an Adopter you can configure this to fit your needs. Also all the permissions are Resource Permissions as they work with an Entity with the exception of `azureDevOpsPullRequestDashboardReadPermission`.

Expand Down