• Resolved melderhorst

    (@melderhorst)


    Hi,

    I am using this plugin on my site for a little while and so far it works very fine! My question is: I want only the Administrator to be able to (completely) manage the bookings. For my “Event Creator” role I want the underlying users to be able only to view the bookings; so not edit them.

    In other words, for this role I want the “Bookings Overview” page, but without the right column (with the hyperlinks in it).

    How can I achieve this?

    Thanks.

    Marcel

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    This sounds like it should be possible via User Capabilities management. Please view Settings > General > User Capabilities Tab and adjust the permissions as you see fit.

    https://wp-events-plugin.com/documentation/user-capabilities/

    Thread Starter melderhorst

    (@melderhorst)

    Hi Jordan,

    I already tried that option: unfortunately I can only assign the capability of “managing bookings”, thus including the editing-permissions. And that is not what I want; I want that certain role to be able to view (read) only.

    Marcel

    Plugin Support angelo_nwl

    (@angelo_nwl)

    just to confirm, did you mean My Bookings page or Manage Bookings under events > settings > pages > other pages ?

    Thread Starter melderhorst

    (@melderhorst)

    Hi Angelo,

    Thanks for your reply. In fact, it’s none of them: in the admin section (back end) it is the “Events” – “Bookings” page (see screenshot).

    I can add this capability to any user role via the Event Manager Settings menu, or via the User Role Editor plugin as well. But I want a certain role, let’s say “organisor”, just to be able to view the bookings for his event, not to edit it.

    So, I want a page that looks like this screenshot, but except the rigth part of the screen, which contains the links. Is it clear now?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try to hook into em_bookings_table_cols_col_action filter to show/hide action links; for reference, this is located under events-manager/classes/em-bookings-table.php

    Thread Starter melderhorst

    (@melderhorst)

    Hi Angelo,

    Thanks. I have found the file and I think I know what you mean (I am sorry, I am not such a coder / developer): you are suggesting to hide the “action” column if the user has the “organiser” role?

    I will try to find out…

    Yes, that should work.

    Thread Starter melderhorst

    (@melderhorst)

    I am very sorry, but so far I am not able to fix it. Although I am willing to learn, so can I find some example code somewhere? Thanks. again!

    Marcel

    Thread Starter melderhorst

    (@melderhorst)

    Hi, I have figured it out and I added “if (current_user_can (publish_events))” in front of the last line. It works: now only the admin sees the “action” column.

    But I get a little error message when I log in as another user (than admin):
    Warning: implode(): invalid arguments passed in /…../em-bookings-table.php on line 563

    When I click on the “filter” button, the error message is gone.

    Can you post your exact custom snippet?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Only view Bookings’ is closed to new replies.