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
At this moment you can only set the sanctum permissions on plugin initialization (by my knowledge).
In my case i have some middlewares for each tenant and there the abilities change of the users.
Is there any other way of setting the abilities later on? now i've done it like this in my tenantMiddleware() of a panel:
function array_values_recursive(array $array): array { $flat = array(); foreach ($array as $value) { if (is_array($value)) { $flat = array_merge($flat, array_values_recursive($value)); } else { $flat[] = $value; } } return $flat; } $apiplugin = Filament::getCurrentPanel()->getPlugin('api-service'); // https://filamentphp.com/plugins/rupadana-api-service $abilities = $apiplugin->getAbilities(Filament::getCurrentPanel()); // gets all resources with their abilities $abilities = array_values_recursive($abilities); $breezyplugin = Filament::getCurrentPanel()->getPlugin('filament-breezy'); $breezyplugin->enableSanctumTokens(true, $abilities);
so getting the plugin and then enableSanctumTokens() function...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At this moment you can only set the sanctum permissions on plugin initialization (by my knowledge).
In my case i have some middlewares for each tenant and there the abilities change of the users.
Is there any other way of setting the abilities later on? now i've done it like this in my tenantMiddleware() of a panel:
so getting the plugin and then enableSanctumTokens() function...
The text was updated successfully, but these errors were encountered: