Fix incorrect diffs in plugin author permission docs (#17439)

Signed-off-by: Joon Park <joonp@spotify.com>
This commit is contained in:
Joon Park
2023-05-04 10:35:12 +01:00
committed by GitHub
parent e8e71ee459
commit 82148bbe09
2 changed files with 4 additions and 7 deletions
@@ -31,11 +31,12 @@ export const todoListUpdatePermission = createPermission({
/* highlight-remove-next-line */
export const todoListPermissions = [todoListCreatePermission];
/* highlight-add-next-line */
/* highlight-add-start */
export const todoListPermissions = [
todoListCreatePermission,
todoListUpdatePermission,
];
/* highlight-add-end */
```
Notice that unlike `todoListCreatePermission`, the `todoListUpdatePermission` permission contains a `resourceType` field. This field indicates to the permission framework that this permission is intended to be authorized in the context of a resource with type `'todo-item'`. You can use whatever string you like as the resource type, as long as you use the same value consistently for each type of resource.
@@ -66,16 +66,12 @@ export const todoListReadPermission = createPermission({
});
/* highlight-add-end */
/* highlight-add-next-line */
export const todoListPermissions = [
todoListCreatePermission,
todoListUpdatePermission,
];
/* highlight-add-next-line */
export const todoListPermissions = [
todoListCreatePermission,
todoListUpdatePermission,
/* highlight-add-start */
todoListReadPermission,
/* highlight-add-end */
];
```