Events Made Easy Forums How do I … How can some users delete their own events

Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #60556
    Anonymous
    Inactive

    Hi Francky,
    Some users of my site can create events with this plugin. But they can’t delete their events after create it with this plugin.
    I give them access to the backend where they can access only to owned event. They can update it but they can’t delete their event.
    This option “delete” doesn’t exist in the menu setting/access/events only modify/update
    Is it necessary to be administrator to delete an event or is there a solution for those who have created this event ?
    Thanks a lot for your work.
    Best regards

    #60558
    Franky
    Keymaster

    When editing the event, they should be able to press the “delete button” as well if they are the owner of the event.

    #60560
    Anonymous
    Inactive

    I have the last Version 2.1.54.
    All access settings are returned by default.
    To modify or delete their own events they have to be “publish posts”. However, They have this error “access denied” when they press “delete button” (trash on the right) but it’s ok when they only modify it.
    I don’t understand

    #60562
    Franky
    Keymaster

    Your user needs the right defined in the EME setings called “Author events”. That right gives the person the right to edit his events and delete them if wanted. I just tried this here, it works as expected. The right to edit and delete your own event is indeed the same.

    #60573
    Anonymous
    Inactive

    I don’t understand where is the bug. On my site a user with “publish_post” right (setting for “author events”) can edit its own events but not delete them. To delete them I need to add “delete other post” to their role. Surprising !
    I use only plugins and do not develop with PHP. I use “User Role Editor” for manage user capabilities. And “Menu Editor” for manage Admin menu.
    Any idea where I could look for ?

    Best regards

    #60574
    Franky
    Keymaster

    Are you sure the event author is the same as the person trying to delete the event?
    If you can reproduce it: give me a temp account that has the issue and such an event, so I can take a look. Also give me a second admin account to see all the settings then.

    #60576
    Anonymous
    Inactive

    Yes.
    For the accounts have you a discreet means of communication ?

    #60578
    Anonymous
    Inactive

    As it is publish events, may be you give the capability delete_events but not delete_published_events ?

    #60579
    Franky
    Keymaster

    Ok, my test was wrong and you’ve helped me find the bug 🙂
    Replace in eme_events.php lines 205 and 206 from:

             $ids_arr=array($event_ID);
             $res=eme_trash_events($ids_arr);

    to just:
    $res=eme_trash_events($event_ID);

    Then it should work. I was distracted by the fact you said people got an “access denied”. I don’t get it on your site (the “access denied”), but I saw that the event was actually never deleted either. On my end I just focused on not getting the “access denied” and just never realized the event wasn’t deleted. So I dug a little deeper and found this bug.
    Via the dropdown it is not allowed (since you can’t manage events), but the message that it isn’t allowed is not shown, I’ll correct that too.

    #60581
    Anonymous
    Inactive

    Hi Franky
    After changing the lines, yes ! i can delete the own event after edit it and click on the button “delete event” at the bottom the of the form.
    Thanks for the solution.
    I understand also know why this doesn’t work via the dropdown. The box window (access denied) that i always have was not explicite enough for me.

    #60582
    Franky
    Keymaster

    Well, I’ll change the dropdown, so that if a user doesn’t have the correct rights, the accompanying options are hidden too.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top