Home › Forums › Calendar Products › Events Calendar PRO › Custom user role cannot access Events in admin
- This topic has 7 replies, 2 voices, and was last updated 13 years, 1 month ago by
Jonah.
-
AuthorPosts
-
February 14, 2013 at 9:57 am #32654
Mark
ParticipantI am having a problem that seems very strange. I created a new custom user role for a project and cannot figure out why the Events menu will not show in the admin when logged in as a user with the custom role. I have triple checked the capabilities of my custom role and it seems it should be working but the Events menu will not display.
I read this forum post:
Joey said that you guys rely on the basic WP capabilities for permissions, I am using these (Editor capabilities):
‘delete_others_pages’ => true,
‘delete_others_posts’ => true,
‘delete_pages’ => true,
‘delete_posts’ => true,
‘delete_private_pages’ => true,
‘delete_private_posts’ => true,
‘delete_published_pages’ => true,
‘delete_published_posts’ => true,
‘edit_others_pages’ => true,
‘edit_others_posts’ => true,
‘edit_pages’ => true,
‘edit_posts’ => true,
‘edit_private_pages’ => true,
‘edit_private_posts’ => true,
‘edit_published_pages’ => true,
‘edit_published_posts’ => true,
‘manage_categories’ => true,
‘manage_links’ => true,
‘moderate_comments’ => true,
‘publish_pages’ => true,
‘publish_posts’ => true,
‘read’ => true,
‘read_private_pages’ => true,
‘read_private_posts’ => true,
‘unfiltered_html’ => true,
‘upload_files’ => true,Any idea why the Events menu would not display?
Thanks!
February 14, 2013 at 10:16 am #32656Jonah
ParticipantHi Mark, can you please post the code you are using to create the new Role so I can test it out locally? Please post to http://snippi.com/ or https://gist.github.com/
Thanks,
JonahFebruary 14, 2013 at 10:51 am #32658Mark
ParticipantThanks for the quick response Jonah.
Here ya go: http://snippi.com/s/vlgnuk8
February 14, 2013 at 2:32 pm #32685Jonah
ParticipantHi Mark,
We actually add a bunch of our capabilties now. You can see what’s added for admins, editors, etc by looking at /wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php around line 737. You should be able to take this and model it with your add_role function to setup your custom role.
Does that help?
– Jonah
February 14, 2013 at 3:08 pm #32696Mark
ParticipantAhaa!! Success! Thank you very much! I strongly suggest you add these specifics to the documentation as this was a crucial bit of code to get my project moving and would’ve been a deal-breaker had I not been able to get this working. Once again we truly appreciate the prompt and friendly support. Cheers!
February 14, 2013 at 3:17 pm #32698Jonah
ParticipantSweet, glad that worked! Good call, I’ve gone ahead an added an FAQ for the mean time: https://theeventscalendar.com/faq/what-plugin-capabilities-are-there-for-creating-custom-roles/ – we’re planning on doing some documentation updates in the near future so it will make more sense to include this somewhere else then.
Let me know if you need anything else!
– Jonah
March 22, 2013 at 9:17 am #43785Mark
ParticipantThis reply is private.
March 22, 2013 at 3:38 pm #43833Jonah
ParticipantHi Mark,
First try deactivating all other plugins to make sure another plugin is not interfering with things. Let me know if you’ve done that.
Thanks,
Jonah -
AuthorPosts
- The topic ‘Custom user role cannot access Events in admin’ is closed to new replies.
