latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Configuring Custom Roles

Home Forums Community Forum Configuring Custom Roles

This topic contains 3 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 15th, 2012 at 2:10 pm #13537
VegasKev
Username: vegaskev

I need to create a custom role for a sub-admin that gives them a few capabilities regarding listing users, creating users, etc. Here is the problem that I’m running into.

The only way to give a user role the ability to access the wp-dashboard is by giving them the “edit_post” capability. This is fine, as their posts will be sent to me for review, and they cannot screw anything up without me approving it anyhow. The problem that exists is that when giving them the “edit_post” capability they have access to the S2 Members Menu item and all subsequent settings within S2Member. This means that I will basically be giving them the ability to completely screw up my entire membership platform is they started clicking around in curiousity. This person would not do anything malicious, but curiousity killed the cat, as we all know.

I need to give this employee access to users’ data, but not access to S2 Member menu items and options within the WP-Admin area. How do I do this? Thanks in advance.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday May 16th, 2012 at 12:40 am #13613

Hi Kevin.

I don’t know, s2Member doesn’t manage this, it’s the way WordPress behaves.

I’ll ask Jason if he knows how it could be prevented in some way.

Posted: Wednesday May 16th, 2012 at 12:13 pm #13669
VegasKev
Username: vegaskev

Please Cristian, I can’t allow an employee to have access to the S2 Member options, but I don’t have time to check login amounts, TOS agreements, user assistance for customer service issues, etc.

Please help me find a workaround for this. PLEASE :)

Thanks in advance.

Posted: Thursday May 17th, 2012 at 6:44 pm #13817
Staff Member

By default, s2Member menu items will ONLY display if the current administrative user has the create_users Capability. So you might take a look to be sure the Role you’re dealing with, does NOT have this Capability. If it does, please remove that Capability from the custom Role that you’re setting up.

Otherwise, if more control is needed, you can always filter the s2Member menu out with a custom hack. s2Member exposes a Filter to make this possible.

Create the directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_filter("ws_plugin__s2member_during_add_admin_options_create_menu_items", "__return_false");
?>

Of course, you might want to apply some conditional logic before adding the filter, but this may help.

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.