From e42d0b7d211423f193bec8c901355512b0c98548 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Tue, 12 Dec 2023 01:18:17 +0100 Subject: [PATCH] Enabled admin bar for admins only by default --- resources/views/linkstack/modules/admin-bar.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/linkstack/modules/admin-bar.blade.php b/resources/views/linkstack/modules/admin-bar.blade.php index a4d573c..b43dafd 100644 --- a/resources/views/linkstack/modules/admin-bar.blade.php +++ b/resources/views/linkstack/modules/admin-bar.blade.php @@ -1,6 +1,6 @@ -@if(auth()->check()) +@if(auth()->check() && theme('disable_admin_bar') != "true" && EnvEditor::getKey('ENABLE_ADMIN_BAR', $default = 'true') != "false") @php -if(Auth::user()->id !== $userinfo->id){ +if(Auth::user()->id == $userinfo->id){ $isUser = true; } else { $isUser = false; @@ -8,7 +8,7 @@ if(Auth::user()->id !== $userinfo->id){ @endphp -@if($isUser or auth()->user()->role == 'admin') +@if(($isUser || auth()->user()->role == 'admin') && EnvEditor::getKey('ENABLE_ADMIN_BAR_USERS', $default = 'false') != "false")