Menu

#361 Give admins ability to easily change 'create_by' field

None
closed
nobody
None
1
2021-10-26
2017-06-09
carmean
No

I would like admins to be able to change the 'create_by' field so that when they book a room for someone else that person will receive the confirmation email and be able to modify the booking.

Alternatively, have a separate field that will cc a different person and give that person control of that booking (though the Admins do not want to be cc'd, so that should be a choice).

Discussion

  • Anonymous

    Anonymous - 2018-12-16

    Is there a workouround do implement this feature?

     
  • Campbell Morrison

    It shouldn't be too difficult to do, but you probably need to be running the 'db' authentication scheme so that you know all the usernames.

    You'd need to modify edit_entry.php and change the create_by field so that's not a hidden input, but instead make it a select field populated with all the available usernames as options and defaulting to the current user. You probably also want to limit this feature to admins.

     
  • Campbell Morrison

    I think this shouldn't be too difficult to do. I'll take a look at adding the feature this week.

     
  • carmean

    carmean - 2018-12-17

    We use "remote_user" and our admins normally know the usernames that they would want to enter. If they put in an incorrect username the worst that would happen is only admins would be able to modify the booking, but that is the case now anyway. (It is unlikely that they would put in a incorrect username that would be used by that person) .

    It will be a helpful enhancement for us!

     
    • Campbell Morrison

      OK. I'm in the middle of implementing it and have a select element if you know all the users and otherwise an ordinary text input field.

       
  • Campbell Morrison

    I've now added this feature to the nav_improvements branch, which will eventually be merged with the default_branch and then be included in an MRBS release. The feature is enabled by default but can be disabled by setting:

    $auth['admin_can_only_book_for_self'] = true;
    

    I have so far implemented an authGetUsernames() function for the 'config', 'db' and 'wordpress' authentication schemes. I still need to do some others, eg 'joomla'.

    I'd treat it as an experimental feature for the moment. Let me know of any problems.

     
  • Campbell Morrison

    I've now added support for Joomla and fixed a problem with the WordPress support.

     
  • Campbell Morrison

    The nav_improvements branch has now been closed and merged back into the default branch. Note that this feature wasn't included in the recent 1.7.2 release (deliberately, as we didn't want to destabilize it), but it will be included in the next MRBS release after 1.7.2. In the meantime if you want this feature you will need to use the latest code in the default branch, which you can download here.

     
  • Anonymous

    Anonymous - 2018-12-20

    Fair play Campbell, that's fast work :)

     
  • Campbell Morrison

    • status: open --> closed
    • Group: -->
     
MongoDB Logo MongoDB