more fixes
This commit is contained in:
@@ -40,6 +40,11 @@ return [
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
// ControlPanel guard used by the ControlPanel package
|
||||
'controlpanel' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'controlpanel_users',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -65,6 +70,12 @@ return [
|
||||
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||
],
|
||||
|
||||
// Provider for ControlPanel users
|
||||
'controlpanel_users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => Klevze\ControlPanel\Models\Auth\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
|
||||
27
config/controlpanel.php
Normal file
27
config/controlpanel.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| cPad Control Panel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file contains the configuration options for cPad Control Panel.
|
||||
| You can publish the full configuration using:
|
||||
| php artisan vendor:publish --provider="Klevze\ControlPanel\ServiceProvider"
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('CPAD_ENABLED', true),
|
||||
|
||||
'debug' => env('CPAD_DEBUG', false),
|
||||
|
||||
'route_prefix' => env('CPAD_ROUTE_PREFIX', 'admin'),
|
||||
|
||||
'middleware' => ['web', 'auth'],
|
||||
|
||||
'permissions' => [
|
||||
'enabled' => true,
|
||||
'super_admin_role' => 'super-admin',
|
||||
],
|
||||
];
|
||||
34
config/cors.php
Normal file
34
config/cors.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|
|
||||
| This file configures CORS for the application. Toggle CORS on/off using
|
||||
| the `CP_ENABLE_CORS` environment variable. When disabled the `paths`
|
||||
| array is empty and the CORS middleware will not apply to any routes.
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'paths' => env('CP_ENABLE_CORS', true)
|
||||
? [
|
||||
'api/*',
|
||||
'sanctum/csrf-cookie',
|
||||
]
|
||||
: [],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => ['*'],
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
'exposed_headers' => [],
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
];
|
||||
23
config/cp.php
Normal file
23
config/cp.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'logo' => '/admin/images/cp/logo.png',
|
||||
'footer' => '2020 © <a href="mailto:info@klevze.net">info@klevze.net</a>',
|
||||
'flag_folder' => '/admin/images/flags/languages/16/',
|
||||
'flag_folder_24' => '/admin/images/flags/languages/24/',
|
||||
'flag_folder_32' => '/admin/images/flags/languages/32/',
|
||||
'flag_folder_64' => '/admin/images/flags/languages/64/',
|
||||
'admin_path' => '/admin',
|
||||
'webroot' => '/cp',
|
||||
'theme' => 'adminlte',
|
||||
//'theme' => 'porto',
|
||||
|
||||
'login' => [
|
||||
'footer' => '2020 © klevze.net',
|
||||
'logo' => '/admin/images/cp/logo.png',
|
||||
],
|
||||
|
||||
'tinymce' => [
|
||||
'apikey' => 'xbqp7qz3idlwqmbessgwzlptb87ffxwphdgadio4dyp72sbw',
|
||||
],
|
||||
];
|
||||
14
config/cpad.php
Normal file
14
config/cpad.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return array (
|
||||
'debug' => false,
|
||||
'cache_enabled' => true,
|
||||
'log_level' => 'warning',
|
||||
'features' =>
|
||||
array (
|
||||
0 => 'core',
|
||||
1 => 'security',
|
||||
),
|
||||
'security_level' => 'maximum',
|
||||
'backup_enabled' => true,
|
||||
);
|
||||
166
config/file-manager.php
Normal file
166
config/file-manager.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
|
||||
use Alexusmai\LaravelFileManager\Services\ConfigService\DefaultConfigRepository;
|
||||
use Alexusmai\LaravelFileManager\Services\ACLService\ConfigACLRepository;
|
||||
|
||||
return [
|
||||
|
||||
/**
|
||||
* Set Config repository
|
||||
*
|
||||
* Default - DefaultConfigRepository get config from this file
|
||||
*/
|
||||
'configRepository' => DefaultConfigRepository::class,
|
||||
|
||||
/**
|
||||
* ACL rules repository
|
||||
*
|
||||
* Default - ConfigACLRepository (see rules in - aclRules)
|
||||
*/
|
||||
'aclRepository' => ConfigACLRepository::class,
|
||||
|
||||
//********* Default configuration for DefaultConfigRepository **************
|
||||
|
||||
/**
|
||||
* LFM Route prefix
|
||||
* !!! WARNING - if you change it, you should compile frontend with new prefix(baseUrl) !!!
|
||||
*/
|
||||
'routePrefix' => 'file-manager',
|
||||
|
||||
/**
|
||||
* List of disk names that you want to use
|
||||
* (from config/filesystems)
|
||||
*/
|
||||
'diskList' => ['public'],
|
||||
|
||||
/**
|
||||
* Default disk for left manager
|
||||
*
|
||||
* null - auto select the first disk in the disk list
|
||||
*/
|
||||
'leftDisk' => null,
|
||||
|
||||
/**
|
||||
* Default disk for right manager
|
||||
*
|
||||
* null - auto select the first disk in the disk list
|
||||
*/
|
||||
'rightDisk' => null,
|
||||
|
||||
/**
|
||||
* Default path for left manager
|
||||
*
|
||||
* null - root directory
|
||||
*/
|
||||
'leftPath' => null,
|
||||
|
||||
/**
|
||||
* Default path for right manager
|
||||
*
|
||||
* null - root directory
|
||||
*/
|
||||
'rightPath' => null,
|
||||
|
||||
/**
|
||||
* File manager modules configuration
|
||||
*
|
||||
* 1 - only one file manager window
|
||||
* 2 - one file manager window with directories tree module
|
||||
* 3 - two file manager windows
|
||||
*/
|
||||
'windowsConfig' => 2,
|
||||
|
||||
/**
|
||||
* File upload - Max file size in KB
|
||||
*
|
||||
* null - no restrictions
|
||||
*/
|
||||
'maxUploadFileSize' => null,
|
||||
|
||||
/**
|
||||
* File upload - Allow these file types
|
||||
*
|
||||
* [] - no restrictions
|
||||
*/
|
||||
'allowFileTypes' => [],
|
||||
|
||||
/**
|
||||
* Show / Hide system files and folders
|
||||
*/
|
||||
'hiddenFiles' => true,
|
||||
|
||||
/***************************************************************************
|
||||
* Middleware
|
||||
*
|
||||
* Add your middleware name to array -> ['web', 'auth', 'admin']
|
||||
* !!!! RESTRICT ACCESS FOR NON ADMIN USERS !!!!
|
||||
*/
|
||||
'middleware' => ['web'],
|
||||
|
||||
/***************************************************************************
|
||||
* ACL mechanism ON/OFF
|
||||
*
|
||||
* default - false(OFF)
|
||||
*/
|
||||
'acl' => false,
|
||||
|
||||
/**
|
||||
* Hide files and folders from file-manager if user doesn't have access
|
||||
*
|
||||
* ACL access level = 0
|
||||
*/
|
||||
'aclHideFromFM' => true,
|
||||
|
||||
/**
|
||||
* ACL strategy
|
||||
*
|
||||
* blacklist - Allow everything(access - 2 - r/w) that is not forbidden by the ACL rules list
|
||||
*
|
||||
* whitelist - Deny anything(access - 0 - deny), that not allowed by the ACL rules list
|
||||
*/
|
||||
'aclStrategy' => 'blacklist',
|
||||
|
||||
/**
|
||||
* ACL Rules cache
|
||||
*
|
||||
* null or value in minutes
|
||||
*/
|
||||
'aclRulesCache' => null,
|
||||
|
||||
//********* Default configuration for DefaultConfigRepository END **********
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* ACL rules list - used for default ACL repository (ConfigACLRepository)
|
||||
*
|
||||
* 1 it's user ID
|
||||
* null - for not authenticated user
|
||||
*
|
||||
* 'disk' => 'disk-name'
|
||||
*
|
||||
* 'path' => 'folder-name'
|
||||
* 'path' => 'folder1*' - select folder1, folder12, folder1/sub-folder, ...
|
||||
* 'path' => 'folder2/*' - select folder2/sub-folder,... but not select folder2 !!!
|
||||
* 'path' => 'folder-name/file-name.jpg'
|
||||
* 'path' => 'folder-name/*.jpg'
|
||||
*
|
||||
* * - wildcard
|
||||
*
|
||||
* access: 0 - deny, 1 - read, 2 - read/write
|
||||
*/
|
||||
'aclRules' => [
|
||||
null => [
|
||||
//['disk' => 'public', 'path' => '/', 'access' => 2],
|
||||
],
|
||||
1 => [
|
||||
//['disk' => 'public', 'path' => 'images/arch*.jpg', 'access' => 2],
|
||||
//['disk' => 'public', 'path' => 'files/*', 'access' => 1],
|
||||
],
|
||||
],
|
||||
|
||||
/**
|
||||
* Enable slugification of filenames of uploaded files.
|
||||
*
|
||||
*/
|
||||
'slugifyNames' => false,
|
||||
];
|
||||
@@ -67,7 +67,7 @@ return [
|
||||
'client_secret' => env('DISCORD_CLIENT_SECRET'),
|
||||
'redirect' => env('DISCORD_REDIRECT_URI', '/auth/discord/callback'),
|
||||
],
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Google AdSense
|
||||
|
||||
22
config/skinbase.php
Normal file
22
config/skinbase.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'reserved_usernames' => [
|
||||
'admin',
|
||||
'administrator',
|
||||
'support',
|
||||
'staff',
|
||||
'system',
|
||||
'root',
|
||||
'api',
|
||||
'cdn',
|
||||
'upload',
|
||||
'settings',
|
||||
'login',
|
||||
'logout',
|
||||
'register',
|
||||
'skinbase',
|
||||
],
|
||||
];
|
||||
@@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||
return [
|
||||
'min' => 3,
|
||||
'max' => 20,
|
||||
'regex' => '/^[a-zA-Z0-9_-]+$/',
|
||||
'rename_cooldown_days' => 90,
|
||||
'regex' => '/^[a-zA-Z0-9_]{3,20}$/',
|
||||
'rename_cooldown_days' => 30,
|
||||
'similarity_threshold' => 2,
|
||||
'reserved' => [
|
||||
'admin',
|
||||
|
||||
Reference in New Issue
Block a user