Open goellner opened 1 year ago
We use Statamic & Laravel Nova in a couple of apps without any issues.
In our NovaServiceProvider
, we do this (we only want super users to access Nova but I imagine you could make roles work here too):
Gate::define('viewNova', function ($user) {
return $user->super;
});
Also, heads up, Telescope will slow your Statamic site down: #5752
This works, but it would be ideal to get the default settings with the emails working too. If we need more fine grained control on Horizon, Telescope, Nova users it doesn't work atm.
I know its an edge case for people using eloquent and auth via eloquent, but honestly I think Statamics Auth/Gate should not interfere with the other services if possible.
Bug description
i am currently trying to get Laravel Nova and Statamic to work with eloquent and after debugging for 5 hours I found one issue in the statamic AuthServiceProvider:
This
before
hook also overrides gates defined in Laravel Nova, Telescope, Horizion, ...Example of Novas default gate:
Can the before be wrapped in something to only be applied to statamics auth?
How to reproduce
If you need a demo repo with Statamic and Telescope for example I could set one up for you if needed.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response