Added new config keys

This commit is contained in:
Julian Prieber 2023-12-13 15:01:56 +01:00
parent 445f3ecfae
commit 053d9af9b7
4 changed files with 14 additions and 0 deletions

3
.env
View File

@ -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

View File

@ -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, <br>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',

View File

@ -294,6 +294,9 @@ foreach($users as $user){if($user->littlelink_name != $configValue2){echo '<opti
{{toggle('ALLOW_CUSTOM_BACKGROUNDS')}}
{{toggle('ENABLE_ADMIN_BAR_USERS')}}
<a name="Security"><h2 class="ch2">{{__('messages.Security')}}</h2></a>

View File

@ -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', '');}}