Menu

#102 Allow admin to override force_private

open
nobody
None
1
2020-11-19
2020-09-08
No

Shouldn't an admin always be able to override force private? For example I want all users to only commit private bookings. But as an admin I want to add closing hours/days with visible descriptions (instead of "Private").

The easiest way would be to add if (is_book_admin()) $private_mandatory = false; in edit_entry.php within the function get_field_privacy_status.

Or is there a reason why even the admin would not be allowed to use every option? :)

Discussion

  • Campbell Morrison

    Good point. I've now committed this in 3a545a. (I've implemented it slightly differently in order to avoid modifying the global.)

     
    • Tobias Zeumer

      Tobias Zeumer - 2020-09-09

      Great. Thanks!

       
  • Anonymous

    Anonymous - 2020-11-19

    I just tried to set many entries to public. As admin I can select "public" with that patch, but they are always saved as private anyway.

    I think I just missed it before, because I was still logged in as admin. Or am I doing something wrong conceptually.

     
    • Tobias Zeumer

      Tobias Zeumer - 2020-11-19

      Sorry, I forgot to log in. The example doesn't make that much sense exactly without a full description like "Library closed (holidays)". Also the german brief description is "Closed" :)

       
  • Campbell Morrison

    Yes, it's a bug. I think edit_entry_handler.php also needs to be changed. I'm working on a fix.

     
  • Campbell Morrison

    Now fixed in 7d4843. It needed a change to edit_entry.php as well as edit_entry_handler.php.

     
    • Tobias Zeumer

      Tobias Zeumer - 2020-11-19

      Thank you very much! That was fast - and works fine now. :)