#288 No deletion for users or no deletion for past bookings

open
nobody
Deletion (1)
1
2014-01-09
2012-10-12
Anonymous
No

Hey there,

I've succesfully installed mrbs-1.4.9. Great tool, with great opportunities!

I'm wondering if it's possible to deny deletion for non-admins. Creation must be feasible.
$auth['only_admin_can_book'] = TRUE; doesn't work for that purpose.

Otherwise I would like to have a deletion prohibition for past dates including 'today'.

Someone have a hint?

Discussion

  • You can prevent creation, editing and deletion of past events by enabling min_book_ahead. You can also set how far back (or forward) this should apply. Go to the Rooms page and edit the area you are interested in. The default settings for new areas can be set in the config file.

    Campbell

     

  • Anonymous
    2012-10-12

    What do you mean with enabling min_book_ahead? Do I have to put in:
    $vocab["min_book_ahead"] = "TRUE"; into config?
    It doesn't work.

    I need to know who booked which room and when at the end of the month. Cancellation can be done by E-Mail. What's the best way?

     

  • Anonymous
    2012-10-13

    Log in as an admin. Click the "Rooms" link at the top of the page. Select the area you are interested in, click the pencil icon to edit it. Then check the ckeckbox "Advance booking - minimum" and select one day as the time. This will mean that ordinary users have to book at least one day in advance - and moreover can't edit or delete bookings which are due to start less than one day awat. This isn't quite what you want because the time is 24 hours ahead rather than the rest of the day, but with any luck it's close enough.

    If you want to make sure that new areas automatically have these settings then copy the appropriate settings from areadefaults.inc.php into your config file and edit them there.

    By the way, you should remove the

    $vocab["min_book_ahead"] = "TRUE";
    

    from your config setting because it will cause problems.

    Campbell

     
  • Robson
    Robson
    2014-01-08

    How can we configure MRBS to prevent non-admin users to delete approved entries? I cannot find any parameter to meet it. We can prevent non-admin users to delete past entries, but approved entries are future events.

     
  • There isn't a standard way of doing this. However you could try setting

    $page_level['del_entry.php'] = 2;
    

    in mrbs_auth.inc

    This should stop ordinary users deleting entries (but I haven't tested it) and so will achieve your goal, but it won't be very tidy. If you want to make it a bit tidier you could also modify the code and make the delete entry link on the view_entry page only visible to admins:

    if ($is_admin)
    {
      // Show the delete entry link
    }
    

    Campbell

     
  • Robson
    Robson
    2014-01-09

    I preferred the second option, and It became cool! Now, just Admins can delete entries.

     
  • You should implement the first option anyway to prevent users who know what they are doing from calling the del_entry.php directly.

     


Anonymous


Cancel   Add attachments