From e64d5f2cf1b3190889c53cdeedec19ba94328f9b Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 4 Jul 2025 12:21:04 -0700 Subject: [PATCH] fix: don't attempt to reserve view-only resource Previously a user could attempt to reserve a resource that they had "view-only" permission. The reservation would then fail. Change the UI so that it doesn't offer them the option to reserve the resource. Closes: #655 --- tpl/Schedule/schedule-reservations-grid.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tpl/Schedule/schedule-reservations-grid.tpl b/tpl/Schedule/schedule-reservations-grid.tpl index c3f09032e..789493281 100644 --- a/tpl/Schedule/schedule-reservations-grid.tpl +++ b/tpl/Schedule/schedule-reservations-grid.tpl @@ -33,7 +33,7 @@ HasColor()}style="background-color:{$resource->GetColor()} !important" {/if}> - {if $resource->CanAccess && $DailyLayout->IsDateReservable($date)} + {if $resource->CanBook && $DailyLayout->IsDateReservable($date)} {foreach from=$slots.$ts item=Slot} {assign var=slotRef value="{$Slot->BeginDate()->Format('YmdHis')}{$resourceId}"} - {displaySlot Slot=$Slot Href="$href" AccessAllowed=$resource->CanAccess SlotRef=$slotRef ResourceId=$resourceId} + {displaySlot Slot=$Slot Href="$href" AccessAllowed=$resource->CanBook SlotRef=$slotRef ResourceId=$resourceId} {/foreach} {/foreach}