Skip to content
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

Should include the default all in PrismaAbility types #584

Closed
floross opened this issue Dec 23, 2021 · 2 comments · Fixed by #615
Closed

Should include the default all in PrismaAbility types #584

floross opened this issue Dec 23, 2021 · 2 comments · Fixed by #615

Comments

@floross
Copy link
Contributor

floross commented Dec 23, 2021

In this class the default ability tuple is AbilityTuple = [string, Prisma.ModelName] but if I read correctly the documentation casl have a alldefault keyword. Is PrismaAbility class should use AbilityTuple = [string, 'all' | Prisma.ModelName] instead ?

@stalniy
Copy link
Owner

stalniy commented Dec 23, 2021

Probably you are right

@stalniy
Copy link
Owner

stalniy commented Dec 23, 2021

Can you make a PR that changes it?

scriptcoded added a commit to scriptcoded/casl that referenced this issue Apr 29, 2022
stalniy pushed a commit that referenced this issue Apr 30, 2022
stalniy pushed a commit that referenced this issue Jun 14, 2022
* fix: add 'all' to AbilityTuple

Fixes issue #584

* fix: improved AbilityTuple

adds ExtendedAbilityTuple that adds 'all' to the subject of AbilityTuple
without requiring the user to manually add the type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants