From 053d9af9b71def48f33a1ed219991056f0588318 Mon Sep 17 00:00:00 2001
From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com>
Date: Wed, 13 Dec 2023 15:01:56 +0100
Subject: [PATCH] Added new config keys
---
.env | 3 +++
resources/lang/en/messages.php | 2 ++
resources/views/components/config/config.blade.php | 3 +++
resources/views/components/finishing.blade.php | 6 ++++++
4 files changed, 14 insertions(+)
diff --git a/.env b/.env
index 4f43f5e..a7fdb5c 100644
--- a/.env
+++ b/.env
@@ -132,3 +132,6 @@ ALLOW_USER_IMPORT=true
MANUAL_USER_VERIFICATION=true
ENABLE_REPORT_ICON=false
+
+ENABLE_ADMIN_BAR=true
+ENABLE_ADMIN_BAR_USERS=false
\ No newline at end of file
diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php
index 20775a9..4146751 100644
--- a/resources/lang/en/messages.php
+++ b/resources/lang/en/messages.php
@@ -695,6 +695,8 @@ return [
'FORCE_HTTPS.description' => 'Makes all links utilize HTTPS by default. It is advised to enable this option if you are using a reverse proxy.',
'ALLOW_CUSTOM_CODE_IN_THEMES.title' => 'Allow custom code in themes',
'ALLOW_CUSTOM_CODE_IN_THEMES.description' => 'Allows use of custom code in themes. If you use themes from unknown sources,
this may pose a security risk.',
+ 'ENABLE_ADMIN_BAR_USERS.title' => 'Enable Admin Bar for all users',
+ 'ENABLE_ADMIN_BAR_USERS.description' => 'If enabled users, all authenticated users will have an Admin Bar displayed on their links pages.',
'ENABLE_THEME_UPDATER.title' => 'Enable Theme Updater',
'ENABLE_THEME_UPDATER.description' => 'Determines if the theme updater should be active.',
'ENABLE_SOCIAL_LOGIN.title' => 'Enable social login',
diff --git a/resources/views/components/config/config.blade.php b/resources/views/components/config/config.blade.php
index fdbc195..21bab73 100644
--- a/resources/views/components/config/config.blade.php
+++ b/resources/views/components/config/config.blade.php
@@ -294,6 +294,9 @@ foreach($users as $user){if($user->littlelink_name != $configValue2){echo '{{__('messages.Security')}}
diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php
index 358a0bf..097bd6a 100644
--- a/resources/views/components/finishing.blade.php
+++ b/resources/views/components/finishing.blade.php
@@ -63,6 +63,12 @@ use App\Models\Page;
if(EnvEditor::keyExists('ENABLE_REPORT_ICON')){ /* Do nothing if key already exists */
} else {EnvEditor::addKey('ENABLE_REPORT_ICON', 'false');}
+ if(EnvEditor::keyExists('ENABLE_ADMIN_BAR')){ /* Do nothing if key already exists */
+ } else {EnvEditor::addKey('ENABLE_ADMIN_BAR', 'true');}
+
+ if(EnvEditor::keyExists('ENABLE_ADMIN_BAR_USERS')){ /* Do nothing if key already exists */
+ } else {EnvEditor::addKey('ENABLE_ADMIN_BAR_USERS', 'false');}
+
if(EnvEditor::keyExists('ADMIN_EMAIL')){} else
{if(Auth::user()->id == 1){EnvEditor::addKey('ADMIN_EMAIL', App\Models\User::find(1)->email);}
else{EnvEditor::addKey('ADMIN_EMAIL', '');}}