fix shifttypes permission

This commit is contained in:
Xu 2024-05-21 19:22:00 +02:00
parent f1f5cd7c01
commit c82e3183d6
3 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ function make_navigation()
'users' => ['All Angels', 'admin_user'], 'users' => ['All Angels', 'admin_user'],
'admin_free' => 'Free angels', 'admin_free' => 'Free angels',
'admin/questions' => ['Answer questions', 'question.edit'], 'admin/questions' => ['Answer questions', 'question.edit'],
'admin/shifttypes' => ['shifttype.shifttypes', 'shifttypes'], 'admin/shifttypes' => ['shifttype.shifttypes', 'shifttypes.view'],
'admin_shifts' => 'Create shifts', 'admin_shifts' => 'Create shifts',
'admin/locations' => ['location.locations', 'admin_locations'], 'admin/locations' => ['location.locations', 'admin_locations'],
'admin_groups' => 'Grouprights', 'admin_groups' => 'Grouprights',

View File

@ -155,7 +155,7 @@ function Shift_view(
$shift_admin = auth()->can('admin_shifts'); $shift_admin = auth()->can('admin_shifts');
$user_shift_admin = auth()->can('user_shifts_admin'); $user_shift_admin = auth()->can('user_shifts_admin');
$admin_locations = auth()->can('admin_locations'); $admin_locations = auth()->can('admin_locations');
$admin_shifttypes = auth()->can('shifttypes'); $admin_shifttypes = auth()->can('shifttypes.view');
$nightShiftsConfig = config('night_shifts'); $nightShiftsConfig = config('night_shifts');
$goodie = GoodieType::from(config('goodie_type')); $goodie = GoodieType::from(config('goodie_type'));
$goodie_enabled = $goodie !== GoodieType::None; $goodie_enabled = $goodie !== GoodieType::None;

View File

@ -23,7 +23,7 @@ class ShiftTypesController extends BaseController
/** @var array<string> */ /** @var array<string> */
protected array $permissions = [ protected array $permissions = [
'shifttypes', 'shifttypes.view',
'edit' => 'shifttypes.edit', 'edit' => 'shifttypes.edit',
'delete' => 'shifttypes.edit', 'delete' => 'shifttypes.edit',
'save' => 'shifttypes.edit', 'save' => 'shifttypes.edit',