Create multi admin user system for venues
WordPress Event Management, Calendars & Registration › Forums › Pre Sales Questions › Create multi admin user system for venues
This topic contains 9 replies, has 3 voices, and was last updated by Stephen Harris 8 years, 8 months ago.
November 22, 2013 at 12:15 pm #8328
I have been reading your docs and browsing the forums – the API looks flexible.
I wonder if you could help – I am tasked to build a WP events booking system for multiple venues, where each venue has an owner that can view/manage their events and bookings – not those of the other venue owners.
Do you think I could achieve this with your Pro plugin – and, if so, could you outline how I could do this ?
Joejoe aliferisNovember 22, 2013 at 1:05 pm #8330
There is an update due shortly (1.5) which will allow non-admins to manage bookings for their events (provided they have been given the permission to do so). Admins, will of course, be able to manage all bookings. In this way if each venue has a specific user ‘managing’ that venue, then you can ensure that user is the ‘organiser’ of any event occurring at that venue (there is no UI for this, but it’s possible to achieve with a little code1). Then that user could manage bookings for those events which occur at their venue.
You would need to associate each venue with a user (which you could do via the venue custom fields or something a bit more bespoke for better usability).
The only slight hitch is that bookings will still be viewable by other users (who can manage bookings): it’s very much like posts which a user cannot edit. Specifically a post which an ‘author’ has not created will not be able to edit the post, but it will appear in the admin list.
The user managing bookings can of course filter the bookings list by event if they wish.
A future release may seek to address, but the reason that “others’ bookings” are not automatically hidden is due to performance considerations (and the fact that its not been a widely requested feature).
I hope that helps
Stephen HarrisNovember 23, 2013 at 12:18 am #8339
I’d be happy to provide this ↩
Thanks for that
What about if I use another addon to fine tune users/roles permissions so users cannot see eachothers bookings ?
joejoe aliferisNovember 23, 2013 at 12:40 am #8340
I don’t any user/role management plug-in would allow you to do that. There’s no direct relationship between users who can edit a booking and the booking itself – that is a user can edit a booking, if they are the event organiser. So the relationship between user and booking goes through the event.Stephen HarrisNovember 23, 2013 at 8:49 am #8346
I see (kind of)
Are the organisers WordPress users ?
Are bookings a custom post type ?
JoeJoeNovember 23, 2013 at 9:59 am #8347
Just thinking about this:
Could you not just apply a filter to the bookings list so that users only see bookings that are associated with the venue they are associated with ?
JoeJoeNovember 23, 2013 at 2:25 pm #8348
Or, how about just putting a different class on booking rows that do not belong to the user, then I can easily hide rows from a user that cannot manage a booking ?
JoeJoeNovember 25, 2013 at 3:15 pm #8373
You could, but again, bookings are not directly linked to the venue but only via the event – so it doesn’t avoid the difficulties of filtering bookings by the event’s organiser .
Adding a class to the booking rows would allow you to hide rows from a user, but then you end up with incorrect and confusing pagination (e.g. it claims there are 20 bookings displayed, but there aren’t). In any case, if bookings were hidden using CSS then a user could simply edit this in their browser to reveal the hidden bookings. If this is solely intended as a way of allowing the organiser to view bookings only for their event – just for usability’s sake – then they can do that by filtering by the bookings by their event.Stephen HarrisNovember 25, 2013 at 4:09 pm #8376
It is not a system that requires extreme security to prevent one venue manager seeing anothers bookings but just a workable method of preventing one user seeing another bookings
each CMS user needs to have venue assigned to them and needs to have and manage:
A calendar of events for their venue
A table of bookings for the venue
whilst not seeing the events and bookings that belong to other venues
IS this going to be possible with the new version coming (Pro) plus some extra coding by yourself ?
perhaps for my functions file ?
joejoeNovember 26, 2013 at 3:14 pm #8394
The free version has an admin calendar so users can see their events (and others’ events if they have permission). You can also filter by venue. There’s a cache related bug with this currently, but there shall be an update shortly.
As noted above, event organisers will be able to view bookings (and with the next update allow event organiser to manage their own event’s bookings). Allocating a user to a venue can be done with a bit of custom code or by using the venue custom fields. As mentioned in an earlier post you can then assign a venue to an event based on the organiser of the event.
By default notifications are sent to the site admin. The next update will allow this email to be filtered, so you could, for example, send it to the appropriate user (according to venue of the booked event).
As noted above users will be able to see (but not edit) the other’s events or the bookings of other events. This is similar to the way that post authors can see, but not edit, the posts of other users. Supporting multiple event organisers in the booking management is a very new feature to the plug-in – and while this feature will be improved upon, this is a limitation which will be present in this first iteration.Stephen Harris