You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I am trying to achieve, is to set a different disk depending on the user role like so:
if (Auth::user() && Auth::user()->hasRole('superadmin')) {
config(['filemanager.disk' => 'public']);
}
I tried placing that codeblock first in a Middleware and then in NovaServiceProdiver@tools method at the top. But the tool only picks up what I have set in config/filemanager.php.
Is it possible to have it pick up config changes at runtime? I'm a bit unsure of Nova Tools lifecycle. I don't understand why the 'config set' call is not picked up. If I log to a debug file, I notice the 'config set call' happens before constructing Nova-Filemanager/Http/Services/FilemanagerService. Maybe I'm missing something. Would be nice if there was a way to somehow set the disk at runtime but unsure if it's possible.
The text was updated successfully, but these errors were encountered:
Yes, would be nice to lockdown the registered user in dynamic folder based on user's (unique) name or Id, so only registered user can see the files & folders owned.
Yes, would be nice to lockdown the registered user in dynamic folder based on user's (unique) name or Id, so only registered user can see the files & folders owned.
What I am trying to achieve, is to set a different disk depending on the user role like so:
I tried placing that codeblock first in a Middleware and then in
NovaServiceProdiver@tools
method at the top. But the tool only picks up what I have set inconfig/filemanager.php
.Is it possible to have it pick up config changes at runtime? I'm a bit unsure of Nova Tools lifecycle. I don't understand why the 'config set' call is not picked up. If I log to a debug file, I notice the 'config set call' happens before constructing
Nova-Filemanager/Http/Services/FilemanagerService
. Maybe I'm missing something. Would be nice if there was a way to somehow set the disk at runtime but unsure if it's possible.The text was updated successfully, but these errors were encountered: