diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-07-29 14:29:12 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-07-29 14:29:12 +0000 |
| commit | 45ddcf37ccaffd110b9b29c1cf8ac65f26f7d850 (patch) | |
| tree | d07b2f0d9dc9dbe4cf92e300918a4149972d6ffc /app/controllers/room_management/planning.php | |
| parent | b6a6e79fbd389d309b8522e165eae5ef560ff10d (diff) | |
make public booking plans only visible when RESOURCES_SHOW_PUBLIC_ROOM_PLANS is set, fixes #143
Closes #143
Merge request studip/studip!847
Diffstat (limited to 'app/controllers/room_management/planning.php')
| -rw-r--r-- | app/controllers/room_management/planning.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/room_management/planning.php b/app/controllers/room_management/planning.php index 06a460b..7aafe68 100644 --- a/app/controllers/room_management/planning.php +++ b/app/controllers/room_management/planning.php @@ -457,10 +457,7 @@ class RoomManagement_PlanningController extends AuthenticatedController } //Check the permissions for the room: - $sufficient_permissions = - $room->userHasPermission($current_user, 'user') - || $room->booking_plan_is_public; - if (!$sufficient_permissions) { + if (!$room->bookingPlanVisibleForUser($current_user)) { throw new AccessDeniedException(); } } |
