{"id":179,"date":"2023-09-14T12:22:02","date_gmt":"2023-09-14T12:22:02","guid":{"rendered":"https:\/\/doc.freevision.me\/luxed\/?p=179"},"modified":"2023-09-14T12:22:02","modified_gmt":"2023-09-14T12:22:02","slug":"user-roles-and-capabilities","status":"publish","type":"post","link":"https:\/\/doc.freevision.me\/luxed\/user-roles-and-capabilities\/","title":{"rendered":"User roles and capabilities"},"content":{"rendered":"\n<p>You can restrict or grant access to the <a href=\"https:\/\/motopress.com\/products\/hotel-booking\/\">Hotel Booking plugin<\/a>, thus, for example, allow some people to only view bookings and others to perform more tasks with payments, clients, and more.<\/p>\n\n\n\n<p>The Hotel Booking plugin provides two custom user roles for this task:<\/p>\n\n\n\n<ul>\n<li><strong>Hotel Worker<\/strong><\/li>\n\n\n\n<li><strong>Hotel Manager<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Note: you can use custom user roles since Hotel Booking version <em>4.0.0 or greater.<\/em><\/p>\n\n\n\n<p>Custom MotoPress Hotel Booking plugin user roles (Hotel Worker and Hotel Manager) come with custom capabilities (tasks allowed to be performed).<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"User Roles for Hotel Booking Plugin: Restrict or Grant Access\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/5eDXij1SUl8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/custom-user-role-wordpress.jpg\" alt=\"custom user role wordpress\" class=\"wp-image-1216082\"\/><\/figure><\/div>\n\n\n<h2>Hotel Worker role<\/h2>\n\n\n\n<p>Hotel Worker role is the equivalent to Subscriber and has only <code>mphb_view_calendar<\/code> capability.<\/p>\n\n\n\n<p>By default, people granted this role can view all reservations in the Booking calendar menu (Bookings &gt; Calendar) of your Hotel Booking plugin.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/worker-user-role.gif\" alt=\"worker user role\" class=\"wp-image-1216075\"\/><\/figure><\/div>\n\n\n<p>That means they can\u2019t 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:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/booking-details.jpg\" alt=\"booking details\" class=\"wp-image-1217225\"\/><\/figure><\/div>\n\n\n<p>All the other menus where you normally see the payment history or bookings are by default <em>not accessible to a Hotel Worker<\/em>.<\/p>\n\n\n\n<p><strong>Hotel Worker can:<\/strong><\/p>\n\n\n\n<ul>\n<li>View reservations in the Calendar menu<\/li>\n<\/ul>\n\n\n\n<p><strong>Hotel Worker can\u2019t:<\/strong><\/p>\n\n\n\n<ul>\n<li>Work with other plugin settings and site menus<\/li>\n<\/ul>\n\n\n\n<p>This user role is most likely suitable to the hotel staff: receptionists, room cleaners and others who normally don\u2019t need more access than to arrival and departure dates, client names, and booking statuses.<\/p>\n\n\n\n<h2>Hotel Manager role<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p><strong>Hotel Manager can:<\/strong><\/p>\n\n\n\n<ul>\n<li>View all menus of the Hotel Booking plugin and configure all settings (i.e., access Accommodation and Bookings menus)<\/li>\n\n\n\n<li>Access the Media, Pages, and Comments menus on the site<\/li>\n<\/ul>\n\n\n\n<p><strong>Hotel Manager can\u2019t:<\/strong><\/p>\n\n\n\n<ul>\n<li>Access other essential administrative WordPress website settings, e.g. Plugins<\/li>\n<\/ul>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2>Capabilities<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3>Custom capabilities<\/h3>\n\n\n\n<ul>\n<li><code>mphb_manage_booking_rules<\/code> \u2013 the ability to view, add, and delete booking rules via the Booking rules menu<\/li>\n\n\n\n<li><code>mphb_manage_taxes_and_fees<\/code>\u2013 the ability to view, add, and delete taxes and fees via the Taxes and fees menu<\/li>\n\n\n\n<li><code>mphb_sync_ical<\/code> \u2013 the ability to sync calendars via the Sync Calendars menu<\/li>\n\n\n\n<li><code>mphb_import_ical<\/code> \u2013 the ability to add external calendars to the site via the Sync Calendars menu<\/li>\n\n\n\n<li><code>mphb_view_reports<\/code> \u2013 the ability to view CSV reports via the Reports Menu<\/li>\n\n\n\n<li><code>mphb_export_reports<\/code> \u2013 the ability to view, generate and download CSV reports via the Reports Menu<\/li>\n\n\n\n<li><code>mphb_manage_settings<\/code> \u2013 the ability to change settings via the Settings menu<\/li>\n\n\n\n<li><code>mphb_view_calendar<\/code> \u2013 the ability to view bookings in the Calendar menu.<\/li>\n<\/ul>\n\n\n\n<p>By default, the Hotel Worker user role is granted the <code>mphb_view_calendar<\/code> capability, while the Hotel Manager has all these custom capabilities.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p><strong>Note:<\/strong> it\u2019s okay to grant chosen roles more capabilities but we also wouldn\u2019t recommend you randomly and extensively editing capabilities to avoid any sort of conflicts between them.<\/p>\n\n\n\n<h3>Custom post type capabilities<\/h3>\n\n\n\n<ul>\n<li><code>delete_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>delete_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>delete_mphb_payments<\/code><\/li>\n\n\n\n<li><code>delete_mphb_rates<\/code><\/li>\n\n\n\n<li><code>delete_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>delete_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>delete_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>delete_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>delete_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>delete_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_payments<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_rates<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>delete_others_mphb_season<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_payments<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_rates<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>delete_private_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_payments<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_rates<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>delete_published_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>edit_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>edit_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>edit_mphb_payments<\/code><\/li>\n\n\n\n<li><code>edit_mphb_rates<\/code><\/li>\n\n\n\n<li><code>edit_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>edit_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>edit_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>edit_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>edit_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>edit_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_payments<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_rates<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>edit_others_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_payments<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_rates<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>edit_private_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_payments<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_rates<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>edit_published_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>publish_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>publish_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>publish_mphb_payments<\/code><\/li>\n\n\n\n<li><code>publish_mphb_rates<\/code><\/li>\n\n\n\n<li><code>publish_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>publish_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>publish_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>publish_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>publish_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>publish_mphb_seasons<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_bookings<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_coupons<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_payments<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_rates<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_reserved_rooms<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_room_attributes<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_room_services<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_room_types<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_rooms<\/code><\/li>\n\n\n\n<li><code>read_private_mphb_seasons<\/code><\/li>\n<\/ul>\n\n\n\n<p>The \u2018others\u2019 parameter means a user role can modify posts created by other people.<\/p>\n\n\n\n<p>Hotel Worker (and other roles, <em>except for Admin and Super Admin<\/em>) doesn\u2019t 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.<\/p>\n\n\n\n<h3>Capabilities of addons<\/h3>\n\n\n\n<p>If you use <a href=\"https:\/\/motopress.com\/products\/category\/hotel-booking-addons\/\">Hotel Booking addons<\/a> along with the core plugin, there are custom capabilities for them, too.<\/p>\n\n\n\n<p>These capabilities will also start with the <code>mphb<\/code> prefix (for example, the <a href=\"https:\/\/motopress.com\/products\/hotel-booking-payment-request\/\">Payment Request addon<\/a> adds its custom capability <code>mphb_send_payment_request<\/code>).<\/p>\n\n\n\n<h2>Manage user roles<\/h2>\n\n\n\n<p>Find all site users via <em>WordPress dashboard &gt; All Users. <\/em>In this menu, you can see a list of users with their assigned user roles and also add new users or change their roles.<\/p>\n\n\n\n<p>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 <a href=\"https:\/\/wordpress.org\/plugins\/user-role-editor\/\">User Role Editor<\/a> will do the job.<\/p>\n\n\n\n<p>If you use this plugin, you can find the list of user roles on your site and the list of capabilities by heading to <em>WordPress dashboard &gt; Users &gt; User Role Editor.<\/em><\/p>\n\n\n\n<p>It\u2019s also required to configure initial settings: <em>WordPress dashboard &gt; Settings &gt; User Role Editor.<\/em><\/p>\n\n\n\n<p>The User Role Editor plugin also allows you to assign Hotel Booking sourced roles as <em>additional roles<\/em> to new or existing users.<\/p>\n\n\n\n<p>With this plugin, you can also have one person granted two different roles, for example, to manage a<a href=\"https:\/\/motopress.com\/blog\/wordpress-clothing-store-site-woocommerce\/\"> WooCommerce store<\/a> (which requires a WordPress user role of its own) and the hotel booking site, too.<\/p>\n\n\n\n<p>You can use these free WordPress plugins to modify user roles and capabilities:<\/p>\n\n\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/user-role-editor\/\">User Role Editor<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/wordpress.org\/plugins\/capability-manager-enhanced\/\">Capability Manager Enhanced<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/wordpress.org\/plugins\/members\/\">Members<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/wordpress.org\/extend\/plugins\/groups\/\">Groups<\/a><\/li>\n<\/ul>\n\n\n\n<p>Furthermore, you can create custom user roles and grant them preferable capabilities:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/new-user-role-1024x473.jpg\" alt=\"new user role\" class=\"wp-image-1216081\"\/><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>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: Note: you can use custom user roles since Hotel Booking version [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/179"}],"collection":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":1,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/179\/revisions\/184"}],"wp:attachment":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}