Add demo mode restrictions to user operations.

Added functionalities to restrict certain user operations like update, password change, and deletion in demo mode. This is done to prevent demo users from modifying crucial data. Helper methods are created for standard re-usable checks. Also, Blade directive is added for frontend UI demo checks.
This commit is contained in:
kor-elf committed 2023-12-05 00:53:04 +06:00
1 parent ebc2dfd944
commit b5db913c24
10 files changed
+67 -5

No files matched your search

+12
View File
@@ -30,6 +30,18 @@ return [
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Demo Mode
|--------------------------------------------------------------------------
|
| Enables or disables Demo mode.
| When Demo mode is enabled, it disables the ability to change user.
*/
'demo_mode' => (bool) env('APP_DEMO_MODE', false),
'demo_email' => env('APP_DEMO_EMAIL', false),
'demo_password' => env('APP_DEMO_PASSWORD', false),
/*
|--------------------------------------------------------------------------
| Application Debug Mode