We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When I use subject helper multiple time in the same function to check multiple permission then it's showing error
subject
ability.can('create', subject('folder', {})); ability.can('read', subject('chat',{}));
Error
Error: Trying to cast object to subject type chat but previously it was casted to folder
CASL Version
@casl/ability - v6.7.1
@casl/ability
Environment: Nodejs version v21
The text was updated successfully, but these errors were encountered:
Cannot reproduce, If you look into code this error is thrown only if you try to change the type of previously used object - https://github.com/stalniy/casl/blob/master/packages/casl-ability/src/utils.ts#L25
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When I use
subject
helper multiple time in the same function to check multiple permission then it's showing errorError
CASL Version
@casl/ability
- v6.7.1Environment:
Nodejs version v21
The text was updated successfully, but these errors were encountered: