Broke up changesets to reflect the package changes
Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': minor
|
||||
'@backstage/plugin-permission-common': minor
|
||||
'@backstage/plugin-permission-node': minor
|
||||
'@backstage/plugin-playlist-backend': minor
|
||||
---
|
||||
|
||||
**BREAKING**: When defining permission rules, it's now necessary to provide a ZodSchema that specifies the parameters the rule expects. This has been added to help better describe the parameters in the response of the metadata endpoint and to validate the parameters before a rule is executed.
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
'@backstage/plugin-playlist-backend': minor
|
||||
---
|
||||
|
||||
**BREAKING** Due to the changes made in the Permission framework. The playlist backends permission rules have change to reflect this.
|
||||
|
||||
As an example the `playlistConditions.isOwner` API has changed from
|
||||
|
||||
```ts
|
||||
playlistConditions.isOwner(['user:default/me', 'group:default/owner']);
|
||||
```
|
||||
|
||||
to the new API
|
||||
|
||||
```ts
|
||||
playlistConditions.isOwner({
|
||||
owners: ['user:default/me', 'group:default/owner'],
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': minor
|
||||
---
|
||||
|
||||
**BREAKING** Due to the changes made in the Permission framework. The catalogs permission rules and the API of `createCatalogPermissionRule` have been changed to reflect the change from individual function parameters to a single object parameter and the addition of the `paramsSchema`.
|
||||
|
||||
As an example for the `hasLabel` rule. The API before the change was
|
||||
|
||||
```ts
|
||||
hasLabel.apply(entity, 'backstage.io/testLabel');
|
||||
hasLabel.toQuery('backstage.io/testLabel');
|
||||
```
|
||||
|
||||
and the API after the change now is
|
||||
|
||||
```ts
|
||||
hasLabel.apply(entity, {
|
||||
label: 'backstage.io/testLabel',
|
||||
});
|
||||
|
||||
hasLabel.toQuery({
|
||||
label: 'backstage.io/testLabel',
|
||||
});
|
||||
```
|
||||
|
||||
This applies to all of the permission rules exported by the catalog backend.
|
||||
|
||||
- `hasAnnotation`
|
||||
- `hasLabel`
|
||||
- `hasMetadata`
|
||||
- `hasSpec`
|
||||
- `isEntityKind`
|
||||
- `isEntityOwner`
|
||||
Reference in New Issue
Block a user