LibreBooking / app

Repository for the last open source version of Booked Scheduler. The "develop" branch contains the most current working code of the project and should be considered beta. The "master" branch is the most current stable release of BookedScheduler. Please read doc/README.md for further details.
GNU General Public License v3.0
403 stars 241 forks source link

Check-in button on reservation page only shows for admins #457

Open njm506 opened 4 days ago

njm506 commented 4 days ago

Affects 2.8.6.2

Regular users are unable to check-in on the Edit Reservation page (where the email links to), but they can check in from the dashboard. This is due to an error in the logic (PR to follow):

{if $CheckInRequired && (!checkinAdminOnly || $CanViewAdmin)}

Compiles down to:

<?php
  if (
    $_smarty_tpl->tpl_vars['CheckInRequired']->value &&
    (!'checkinAdminOnly' || $_smarty_tpl->tpl_vars['CanViewAdmin']->value)
  ) {?>

There is a missing $, so a string is used, which always evaluates to true (so the ! always evaluates to false).