-
Notifications
You must be signed in to change notification settings - Fork 8
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
Automatically discover available permissions #1706
Conversation
3b6468e
to
1e8131e
Compare
1e8131e
to
0c0d506
Compare
packages/api/cms-api/src/user-permissions/user-permissions.service.ts
Outdated
Show resolved
Hide resolved
great! I think that is a huge simplification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog entry is missing
|
I added a commit which exports the permissions used in cms-api |
This reverts commit 6605d91.
packages/api/cms-api/src/user-permissions/user-permissions.types.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the cometPermissions
object in Demo please?
packages/api/cms-api/src/user-permissions/user-permissions.types.ts
Outdated
Show resolved
Hide resolved
…es.ts Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
- `packageDimensions` was nullable, although the database fields aren't nullable (caused an DB error if null was saved) - Admin Generator (present and future) doesn't support nested fields (for future it is WIP, present will never get it) - Easy solution: remove it - #1729 will showcase nested fields and everything (as replacement for packageDimensions)
However, my opinion is that the cometPermissions-object as well as deprecating the availablePermissions-option would not be necessary. |
@nsams @johnnyomair Reverted the last commits |
Adds dependency https://github.com/golevelup/nestjs/tree/master/packages/discovery We lose code completion in RequiredPermission-decorator and getPermissionsForUser as there are only strings but that's not a huge deal as the system gets much more flexible. --------- Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com> Co-authored-by: Ben-Ho <bh@vivid-planet.com>
Adds dependency https://github.com/golevelup/nestjs/tree/master/packages/discovery
We lose code completion in RequiredPermission-decorator and getPermissionsForUser as there are only strings but that's not a huge deals as the system gets much more flexible.