Give admins ability to easily change 'create_by' field
Brought to you by:
jberanek
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).
Is there a workouround do implement this feature?
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.
I think this shouldn't be too difficult to do. I'll take a look at adding the feature this week.
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!
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.
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:
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.
I've now added support for Joomla and fixed a problem with the WordPress support.
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.
Fair play Campbell, that's fast work :)