meeting-room-booking-system / mrbs-code

MRBS application code
Other
121 stars 59 forks source link

only admin room #2841

Open jberanek opened 4 years ago

jberanek commented 4 years ago

Hello,

how to make one room that only admin can book.

Thank you

Reported by: *anonymous

Original Ticket: mrbs/support-requests/2148

jberanek commented 4 years ago

Assuming you are running MRBS 1.9.0 then modify the function getWritable() in mrbs_auth.inc and at line 280 add

  if ($rooms == 4)  // Change 4 to the id of the room in question
  {
    return is_book_admin($rooms);
  }

Original comment by: campbell-m

jberanek commented 4 years ago

yes, it is. Thank you

Original comment by: *anonymous

jberanek commented 2 years ago

How should I change the code in 1.9.4 to only allow admin to book rooms from 3 to 7?

Original comment by: simona1974

jberanek commented 2 years ago

At line 313 insert

  if (in_array($rooms, array(3, 4, 5, 6, 7)))
  {
    return is_book_admin($rooms);
  }

Original comment by: campbell-m

jberanek commented 2 years ago

Thank you very much

Original comment by: simona1974