mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 12:10:34 +09:00
fixed some rebase conflicts
This commit is contained in:
@@ -40,7 +40,7 @@ class ItemController extends Controller
|
||||
$data["treat_tags_as"] = $treat_tags_as;
|
||||
|
||||
if (config('app.auth_roles_enable')) {
|
||||
$roles = explode(',', $request->header(config('app.auth_roles_header')));
|
||||
$roles = explode(config('app.auth_roles_delimiter'), $request->header(config('app.auth_roles_header')));
|
||||
if ($treat_tags_as == 'categories') {
|
||||
$data['categories'] = Item::whereHas('children')->with('children', function ($query) {
|
||||
$query->pinned()->orderBy('order', 'asc');
|
||||
|
||||
@@ -93,7 +93,7 @@ class TagController extends Controller
|
||||
$item = Item::whereUrl($slug)->first();
|
||||
//print_r($item);
|
||||
if (config('app.auth_roles_enable')) {
|
||||
$roles = explode(',', $request->header(config('app.auth_roles_header')));
|
||||
$roles = explode(config('app.auth_roles_delimiter'), $request->header(config('app.auth_roles_header')));
|
||||
$data['apps'] = $item->children()->whereIn('role', $roles)->pinned()->orderBy('order', 'asc')->get();
|
||||
} else {
|
||||
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
|
||||
|
||||
@@ -88,6 +88,11 @@ class AppServiceProvider extends ServiceProvider
|
||||
$view->with('trianglify_seed', $trianglify_seed);
|
||||
$view->with('allusers', $allusers);
|
||||
$view->with('current_user', $current_user);
|
||||
if (config('app.auth_roles_enable')){
|
||||
$view->with('enable_config_buttons', in_array(config('app.auth_roles_admin'),explode(config('app.auth_roles_delimiter'), $_SERVER[config('app.auth_roles_http_header')])));
|
||||
} else {
|
||||
$view->with('enable_config_buttons', true);
|
||||
}
|
||||
});
|
||||
|
||||
$this->app['view']->addNamespace('SupportedApps', app_path('SupportedApps'));
|
||||
|
||||
@@ -194,6 +194,8 @@ return [
|
||||
|
||||
'auth_roles_enable' => (bool) env('AUTH_ROLES_ENABLE', false),
|
||||
'auth_roles_header' => env('AUTH_ROLES_HEADER', 'remote-groups'),
|
||||
'auth_roles_http_header' => env('AUTH_ROLES_HTTP_HEADER', 'HTTP_REMOTE_GROUPS'),
|
||||
'auth_roles_admin' => env('AUTH_ROLES_ADMIN', 'admin'),
|
||||
'auth_roles_delimiter' => ',',
|
||||
|
||||
];
|
||||
|
||||
@@ -94,9 +94,8 @@
|
||||
</div>
|
||||
@endif
|
||||
@yield('content')
|
||||
@if($enable_config_buttons)
|
||||
<div id="config-buttons">
|
||||
|
||||
|
||||
@if(Route::is('dash') || Route::is('tags.show'))
|
||||
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i><div class="tooltip left">{{ __('app.dashboard.reorder') }}</div></a>
|
||||
|
||||
@@ -110,6 +109,7 @@
|
||||
<a id="folder" class="config" href="{{ route('tags.index', []) }}"><i class="fas fa-tag"></i><div class="tooltip left">{{ __('app.apps.tag_list') }}</div></a>
|
||||
<a id="settings" class="config" href="{{ route('settings.index', []) }}"><i class="fas fa-cogs"></i><div class="tooltip left">{{ __('app.dashboard.settings') }}</div></a>
|
||||
</div>
|
||||
@endif
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user