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
When adding a permission to a role it works fine, but when adding a role to a permission, the ForgetCachedPermissions listener does not fire.
The fix is to just check for the role class as well (in ForgetCachedPermissions)
$permissionKey = (Nova::resourceForModel(app(PermissionRegistrar::class)->getPermissionClass()))::uriKey(); $roleKey = (Nova::resourceForModel(app(PermissionRegistrar::class)->getRoleClass()))::uriKey(); if ($request->viaRelationship === $permissionKey || $request->viaRelationship === $roleKey) { app(PermissionRegistrar::class)->forgetCachedPermissions(); }
The text was updated successfully, but these errors were encountered:
moroneyio
No branches or pull requests
When adding a permission to a role it works fine, but when adding a role to a permission, the ForgetCachedPermissions listener does not fire.
The fix is to just check for the role class as well (in ForgetCachedPermissions)
The text was updated successfully, but these errors were encountered: