Skip to content

Commit

Permalink
avoid revealing keys when making videos
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Nov 11, 2024
1 parent 2659bee commit 109924f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class SettingsController extends Controller
public function getAll(GetAllConfigsRequest $request): ConfigCollectionResource
{
$editable_configs = Configs::query()
->when(config('features.hide-lychee-SE', false) === true, fn ($q) => $q->where('cat', '!=', 'lychee SE'))
->when(!$request->is_se() && !Configs::getValueAsBool('enable_se_preview'), fn ($q) => $q->where('level', '=', 0))
->orderBy('cat', 'asc')->get();

Expand Down
7 changes: 7 additions & 0 deletions config/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@
| Put images on AWS instead of locally to save space.
*/
'use-s3' => (env('AWS_ACCESS_KEY_ID', '') !== '') && (bool) env('S3_ENABLED', false),

/*
|--------------------------------------------------------------------------
| Hide Lychee SE from config to allow for easier video
|--------------------------------------------------------------------------
*/
'hide-lychee-SE' => (bool) env('HIDE_LYCHEE_SE_CONFIG', false),
];

0 comments on commit 109924f

Please sign in to comment.