Home › Forums › Calendar Products › Community Events › Edit Link Not Appearing for Subscribers
- This topic has 6 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
November 6, 2012 at 11:49 am #27620
Stephen
ParticipantHi Modern Tribers–
I’m having a bit of trouble getting the community events edit or delete link to appear for logged-in subscribers. Here’s my setup (this is an intranet otherwise I’d give you access to take a gander):
* Multisite install (3.4.1)
* Calendar is setup as a separate blog
* Basic calendar plugin plus community events running just on this blog
* Checkboxes for enabling users to edit/delete their own posts is enabled
* Using an ldap plugin (wpdirauth) to authenticate users, but tested with non-ldap subscriber user and get the same behavior.At first I thought it was because users weren’t actually being added to the site because it’s using an ldap plugin. I installed “Multisite User Management” (http://wordpress.org/extend/plugins/multisite-user-management/screenshots/) in order to automatically add users as subscribers, but it didn’t help. Even logging in as a local (non-ldap) subscriber doesn’t work.
I’m at a bit of a loss at this point. I’ve seen a few other posts about a missing edit link, but all seem to be resolved without taking any specific action (at least that I can see).
Any help would be greatly appreciated.
Stephen
November 6, 2012 at 12:05 pm #27623Stephen
ParticipantOk – a little further testing revealed something.
If I change the default status of a post to be “draft” instead of published then the edit and delete links show up correctly. Seems that if events are set to be immediately published then the subscriber is no longer able to edit them.
Is there a way to adjust the role? Something like:
$role_object = get_role( ‘subscriber’ );
$role->add_cap( ‘edit_published_events’ );
$role->add_cap( ‘delete_published_events’ );WIth that being said, I’m hoping if we can do something like that that it doesn’t enable a subscriber to edit/delete any event (even ones they didn’t create).
November 7, 2012 at 6:52 am #27646Barry
MemberHi Stephen – I believe the behaviour you are describing may be by design, otherwise a more complicated workflow would be necessary for moderation purposes.
(Please also note I’ve moved this across to the community forum. I’ll let one of my colleagues more familiar with that plugin take things from here though.)
November 7, 2012 at 8:04 am #27650Stephen
ParticipantHi Barry–
Thanks for moving the post to the correct forum. My apologies for sticking it in the wrong place.
November 7, 2012 at 9:48 am #27654Stephen
ParticipantOk, I think I have this figured out. I found the correct capabilities to add for subscribers to edit and delete their own events. As I mentioned, since this is for an intranet we’re not as concerned with the normal moderation process.
Anyway, here’s the code if anyone else would like it:
if( $blog_id == ’14’ ) {// get the role object
$role_object = get_role( ‘subscriber’ );
$role_object->add_cap( ‘edit_published_tribe_events’ );
$role_object->add_cap( ‘delete_published_tribe_events’ );
}The if statement is optional – I wanted to restrict it to a specific subsite.
November 7, 2012 at 2:49 pm #27676Casey
ParticipantStephen,
Glad you got everything sorted out! I’ll mark this one as closed, but just feel free to start a new thread if you have further issues. Thanks!July 7, 2015 at 6:26 am #978119Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Edit Link Not Appearing for Subscribers’ is closed to new replies.
