Events Made Easy › Forums › Bug fixed or feature request implemented › Edit User Capabilities
- This topic has 13 replies, 2 voices, and was last updated 13 years, 5 months ago by Franky.
-
AuthorPosts
-
Fri 18 Mar 2011 at 10:59 #42644AnonymousInactive
How can I remove the ability for authors to add/edit events? I didn’t see an area under settings to set the top user role that can access events info. I am using the WP Members Plugin where I can limit roles by user level.
Please let me know if I can limit Events Manager capabilities to just Editors & Administrators.
Thanks – Erik
Fri 18 Mar 2011 at 23:44 #47231FrankyKeymasterLook for the line
define('MIN_CAPABILITY', 'edit_posts'); // Minimum user level to edit own events
in events-manager.php and change it to your needs. I’ll try to make this configurable in the future.
Sat 19 Mar 2011 at 11:48 #47232AnonymousInactiveThanks Franky. In this case, what would I turn this line of code into so that only Administrators and Editors could add events?
Sat 19 Mar 2011 at 14:08 #47233FrankyKeymasterLook at the lines below that one:
define(‘MIN_CAPABILITY’, ‘edit_posts’); // Minimum user level to edit own events
define(‘AUTHOR_CAPABILITY’, ‘publish_posts’); // Minimum user level to put an event in public/private state
define(‘EDIT_CAPABILITY’, ‘edit_others_posts’); // Minimum user level to edit any event
define(‘SETTING_CAPABILITY’, ‘activate_plugins’); // Minimum user level to edit settings
Sat 19 Mar 2011 at 14:31 #47234AnonymousInactiveHi Franky, I’m still not understanding what I need to do at this point. What do I change? Do I add something to these lines of code or do I add these capabilities within the Members Plugin and change them within the plugin? How do I set the minimum user level? Can you provide an example?
Thanks
Sat 19 Mar 2011 at 14:54 #47235FrankyKeymasterSee here for the different roles you can use:
Sat 19 Mar 2011 at 15:50 #47236AnonymousInactiveOk, yes, I understand this, but edit_posts is the same function as editing blog posts. I need for my Author users to be able to blog, but not to be able to add an event. How do I distinguish between edit_posts for blogs and the events manager? Right now, I can’t turn off only the events addition or editing for Authors and I need to be able to do that.
Thank you.
Sat 19 Mar 2011 at 16:06 #47237FrankyKeymasterThe checks performed by EME for roles/rights are only for EME activities, nothing else. Try “edit_others_posts”
Sat 19 Mar 2011 at 17:07 #47238AnonymousInactiveUnder capabilities for the Author Role within my Members WordPress Plugin, I only have the following capabilities selected and yet the Authors are still able to add events through the Event Manager Extended WordPress admin area:
delete_published_posts
delete_posts
edit_posts
edit_published_posts
publish_posts
read
upload_files
I do not have edit_others_posts checked as an Author capability and yet they can still add/edit events. I don’t want my authors having the capability to do that.
How do I fix this?
Sun 20 Mar 2011 at 09:08 #47239FrankyKeymasterEME doesn’t use the roles you create, but uses the capabilities. So this must mean they still have this cpability somewhere. I don’t know the “Members WordPress Plugin”, but I’ll try this later on myself
Sun 20 Mar 2011 at 22:44 #47240AnonymousInactiveOk – do you know of any way to limit the adding and editing of events for the Author user group? I don’t want my Authors to be able to add or edit events through Events Manager Extended. Is there any plugin or code change available to make this a reality? Only my Editors and Administrators should have access to adding/editing events.
Sun 20 Mar 2011 at 22:50 #47241FrankyKeymasterChange the lines:
define(‘MIN_CAPABILITY’, ‘edit_posts’); // Minimum user level to edit own events
define(‘AUTHOR_CAPABILITY’, ‘publish_posts’); // Minimum user level to put an event in public/private state
define(‘EDIT_CAPABILITY’, ‘edit_others_posts’); // Minimum user level to edit any event
define(‘SETTING_CAPABILITY’, ‘activate_plugins’); // Minimum user level to edit settings
to be:
define(‘MIN_CAPABILITY’, ‘edit_others_posts’); // Minimum user level to edit own events
define(‘AUTHOR_CAPABILITY’, ‘edit_others_posts’); // Minimum user level to put an event in public/private state
define(‘EDIT_CAPABILITY’, ‘edit_others_posts’); // Minimum user level to edit any event
define(‘SETTING_CAPABILITY’, ‘activate_plugins’); // Minimum user level to edit settings
Mon 21 Mar 2011 at 11:11 #47242AnonymousInactivePerfect! That worked. Thank you very much.
Sun 10 Jul 2011 at 15:15 #47243FrankyKeymasterAccess rights management has been implemented in trunk.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.