• Resolved simonc17

    (@simonc17)


    Hi,

    I have set the authors group to be able to only create and edit and delete their own events.

    I have as administrator created a series of draft events that authors can duplicate to quickly create their own events. When a member of the author group hovers over one of these events in the list of events, the Duplicate command appears. When they click this however, a message appears stating that they do not have permission to edit other people’s events.

    Surely this is wrong as duplicating an event creates a new version of it owned by the person doing the duplication. It has nothing to do with the event being draft as they can’t duplicate a published event either.

    I really need to find a way around this if anyone can help.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I looked at the function EM_Events::duplicate in the file wp-content/events-manager/classes/em-event.php and I see the following code:

    if( $this->can_manage('edit_events','edit_others_events') ){
        ...
    }

    It’s only allowing duplication of the event if the user has the ability to edit_events and the ability to edit_other events. I agree that the edit_others_events capability should not be required in order to duplicate an event. I don’t know of any way to workaround this problem (other than editing the plugin file). Changing the code to this should fix the problem:

    if( $this->can_manage('edit_events') ){
        ...
    }
    Thread Starter simonc17

    (@simonc17)

    Thanks for your help. I don’t want to keep having to remember to edit the plugin file so authors will just have to spend a little more time creating events. Hopefully Marcus might see this and fix it (not holding my breath).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Author cannot duplicate an event’ is closed to new replies.