3
0
mirror of https://github.com/snipe/snipe-it.git synced 2025-10-29 11:21:21 +00:00

Small tweaks

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-08-20 14:43:52 +01:00
parent 3f7ed73395
commit ae109be631
3 changed files with 11 additions and 4 deletions

View File

@ -51,14 +51,16 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
/**
* Register the Telescope gate.
*
* This gate determines who can access Telescope in non-local environments.
* This gate determines who can access Telescope in NON-LOCAL environments.
*/
protected function gate(): void
{
Gate::define('viewTelescope', function ($user) {
if (($this->app->environment('local')) && ($user->isSuperUser())) {
if ($user->isSuperUser()) {
return true;
}
return false;
});
}
}

View File

@ -114,8 +114,6 @@ return [
'ignore_paths' => [
'livewire*',
'nova-api*',
'pulse*',
],
'ignore_commands' => [

View File

@ -985,6 +985,13 @@ dir="{{ Helper::determineLanguageDirection() }}">
@endif
@endif
@if (($user->isSuperUser()) && (app()->environment('local')))
<a href="{{ url('telescope') }}" class="btn btn-default btn-xs" rel="noopener">Open Telescope</a>
@endif
@if ($snipeSettings->support_footer!='off')
@if (($snipeSettings->support_footer=='on') || (($snipeSettings->support_footer=='admin') && (Auth::user()->isSuperUser()=='1')))
<a target="_blank" class="btn btn-default btn-xs"