Skip to content

Commit

Permalink
fix: add policy property in DirectusPermission type (directus#23380)
Browse files Browse the repository at this point in the history
* fix: add policy property in DirectusPermission type

Also remove role property from type

* chore: add EdouardDem in contributors

* Add changeset

---------

Co-authored-by: Rijk van Zanten <[email protected]>
  • Loading branch information
EdouardDem and rijkvanzanten authored Aug 16, 2024
1 parent d5bf00f commit 0bfd0f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-balloons-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@directus/sdk': patch
---

Fixed an outdated property name in the permissions typing
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,5 @@
- danilobuerger
- joggienl
- EdwardLi-coder
- EdouardDem
- Xchos
4 changes: 2 additions & 2 deletions sdk/src/schema/permission.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { MergeCoreCollection } from '../index.js';
import type { DirectusRole } from './role.js';
import type { DirectusPolicy } from './policy.js';

export type DirectusPermission<Schema = any> = MergeCoreCollection<
Schema,
'directus_permissions',
{
id: number;
role: DirectusRole<Schema> | string | null;
policy: DirectusPolicy<Schema> | string | null;
collection: string; // TODO keyof complete schema
action: string;
permissions: Record<string, any> | null;
Expand Down

0 comments on commit 0bfd0f0

Please sign in to comment.