Table of Contents
You can restrict or grant access to the Hotel Booking plugin, thus, for example, allow some people to only view bookings and others to perform more tasks with payments, clients, and more.
The Hotel Booking plugin provides two custom user roles for this task:
- Hotel Worker
- Hotel Manager
Note: you can use custom user roles since Hotel Booking version 4.0.0 or greater.
Custom MotoPress Hotel Booking plugin user roles (Hotel Worker and Hotel Manager) come with custom capabilities (tasks allowed to be performed).
Hotel Worker role
Hotel Worker role is the equivalent to Subscriber and has only
By default, people granted this role can view all reservations in the Booking calendar menu (Bookings > Calendar) of your Hotel Booking plugin.
That means they can’t edit bookings or add reservations; they can do only the tasks you can normally do when in the Calendar menu. By clicking on a particular reservation, they can also see more details about a booking and client:
All the other menus where you normally see the payment history or bookings are by default not accessible to a Hotel Worker.
Hotel Worker can:
- View reservations in the Calendar menu
Hotel Worker can’t:
- Work with other plugin settings and site menus
This user role is most likely suitable to the hotel staff: receptionists, room cleaners and others who normally don’t need more access than to arrival and departure dates, client names, and booking statuses.
Hotel Manager role
The Hotel Manager user role has more extensive access to the Hotel Booking plugin. It has almost all privileges the Editor role had before the plugin version 4.0.0.
Hotel Manager can:
- View all menus of the Hotel Booking plugin and configure all settings (i.e., access Accommodation and Bookings menus)
- Access the Media, Pages, and Comments menus on the site
Hotel Manager can’t:
- Access other essential administrative WordPress website settings, e.g. Plugins
This role is suitable for people who need to work a lot with the Hotel Booking plugin but must not have access to the other site data and settings.
The Hotel Booking plugin capabilities are sourced from default WordPress capabilities. There are three logical groups of capabilities: custom capabilities, custom post types capabilities and addons capabilities.
mphb_manage_booking_rules– the ability to view, add, and delete booking rules via the Booking rules menu
mphb_manage_taxes_and_fees– the ability to view, add, and delete taxes and fees via the Taxes and fees menu
mphb_sync_ical– the ability to sync calendars via the Sync Calendars menu
mphb_import_ical– the ability to add external calendars to the site via the Sync Calendars menu
mphb_view_reports– the ability to view CSV reports via the Reports Menu
mphb_export_reports– the ability to view, generate and download CSV reports via the Reports Menu
mphb_manage_settings– the ability to change settings via the Settings menu
mphb_view_calendar– the ability to view bookings in the Calendar menu.
By default, the Hotel Worker user role is granted the
mphb_view_calendar capability, while the Hotel Manager has all these custom capabilities.
Using extra user role editor plugins, you can change the capabilities of either of these roles, for example, allow a Hotel Worker to sync calendars.
Note: it’s okay to grant chosen roles more capabilities but we also wouldn’t recommend you randomly and extensively editing capabilities to avoid any sort of conflicts between them.
Custom post type capabilities
The ‘others’ parameter means a user role can modify posts created by other people.
Hotel Worker (and other roles, except for Admin and Super Admin) doesn’t have access to capabilities associated with the Hotel Booking custom post types. At the same time, the Editor, Contributor, Author user roles have access to the Shortcodes menu.
Capabilities of addons
If you use Hotel Booking addons along with the core plugin, there are custom capabilities for them, too.
These capabilities will also start with the
mphb prefix (for example, the Payment Request addon adds its custom capability
Manage user roles
Find all site users via WordPress dashboard > All Users. In this menu, you can see a list of users with their assigned user roles and also add new users or change their roles.
In order to manage what users of your site/plugin can do, we recommend you to install a preferable user role editor WordPress plugin to edit capabilities in a user-friendly way. For example, the User Role Editor will do the job.
If you use this plugin, you can find the list of user roles on your site and the list of capabilities by heading to WordPress dashboard > Users > User Role Editor.
It’s also required to configure initial settings: WordPress dashboard > Settings > User Role Editor.
The User Role Editor plugin also allows you to assign Hotel Booking sourced roles as additional roles to new or existing users.
With this plugin, you can also have one person granted two different roles, for example, to manage a WooCommerce store (which requires a WordPress user role of its own) and the hotel booking site, too.
You can use these free WordPress plugins to modify user roles and capabilities:
Furthermore, you can create custom user roles and grant them preferable capabilities: