Skip to content

Commit fa62c52

Browse files
committed
Merge branch 'development' into staging
2 parents 0b38f04 + 68fd043 commit fa62c52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Http/Controllers/Dormitory/Reservations/ReservableItemController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function index(Request $request)
3333
]);
3434

3535
$stringType = $validatedData['type'];
36-
$this->authorize('requestReservationForType', [
36+
$this->authorize('viewType', [
3737
ReservableItem::class,
3838
ReservableItemType::from($stringType)
3939
]);

app/Policies/ReservableItemPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function viewType(User $user, ReservableItemType $type): bool
9393
case ReservableItemType::WASHING_MACHINE:
9494
return $user->hasRole([Role::COLLEGIST, Role::TENANT, Role::RECEPTIONIST]);
9595
case ReservableItemType::ROOM:
96-
return $user->hasRole([Role::COLLEGIST, Role::RECEPTIONIST]);
96+
return $user->hasRole([Role::COLLEGIST, Role::WORKSHOP_LEADER, Role::RECEPTIONIST]);
9797
default:
9898
throw new \Exception("unknown ReservableItemType");
9999
}

0 commit comments

Comments
 (0)