Skip to content

Conversation

@JohnVillalovos
Copy link
Contributor

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

@JohnVillalovos JohnVillalovos requested a review from Copilot July 4, 2025 19:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the UI to hide reservation options for resources where the user only has view-only permissions.

  • Replaced permission checks from CanAccess to CanBook to control both the “reserve” link visibility and individual slot display.
Comments suppressed due to low confidence (1)

tpl/Schedule/schedule-reservations-grid.tpl:36

  • Consider adding a UI or integration test to verify that reservation links are hidden for resources where CanBook is false, ensuring view-only resources cannot be reserved.
                        {if $resource->CanBook && $DailyLayout->IsDateReservable($date)}

@JohnVillalovos
Copy link
Contributor Author

With this PR I now see this in the UI

image

Conference Room 1 has been to to ViewOnly for the user.

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
@JohnVillalovos JohnVillalovos merged commit 34de93b into develop Jul 7, 2025
9 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/issue_655 branch July 7, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Resources with read-only access appear bookable

2 participants