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.

Restrict access to User/S2 dashboard widgets?

Home Forums Community Forum Restrict access to User/S2 dashboard widgets?

This topic contains 3 replies, has 2 voices. Last updated by  Terri 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 13th, 2012 at 11:25 am #8001
Terri
Username: tokyoterri

Hi Folks:

Please see the attached screenshot that illustrates the member levels I’m creating:
chart describing member restrictions: http://www.flickr.com/photos/tokyoterri/6979354743/
illustration of the dashboard restriction: http://www.flickr.com/photos/tokyoterri/6833279628/

In S2Member Level 2, how do I limit this level so that they don’t see either the Users or S2Member option in the Dashboard sidebar? They need to have no access to member information at all, other than what’s already in the Membership part of the community.

S2Member Level 3 will have all access to the Membership options. The other levels won’t have access to the dashboard at all, so it’s only Level 2 that I need to restrict.

I am not good at PHP at all, but I am working with a developer who may be able to do this if I have clear instructions on what to do. help!

thank you,

Terri

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Mar 13th, 2012 at 12:54 pm #8017
Staff Member

Hi Terri. Thanks for your inquiry.

s2Member is designed for end-users of a site, and not for Users/Members that actually gain access to your Dashboard in some way. This could certainly be accomplished, using s2Member as a framework on which to build such a site, but it’s not something that s2Member provides by default. Here are some links that might help in your work to integrate this.

See: http://codex.wordpress.org/Roles_and_Capabilities
See: http://codex.wordpress.org/Function_Reference/current_user_can
See: http://wordpress.org/extend/plugins/user-role-editor/

Regarding your specific request here to block and/or grant access to certain admin panels. This can be accomplished through custom coding, where the permissions required to view certain admin panels is dictated by whether a specific User has the Capability required. The required Capability is determined whenever WordPress and/or s2Member adds the menu page into the WordPress core. Your developer could begin their work by searching through WordPress and s2Member’s source code, for calls to these WordPress functions.
add_menu_page() or add_submenu_page()

By default, all s2Member menu panels require a site administrator with the create_users Capability. If you need to change that, you would need to modify code inside this s2Member source file: /s2member/includes/classes/menu-pages.inc.php starting at this line (see source file here).

Posted: Thursday Mar 15th, 2012 at 4:29 am #8206
Terri
Username: tokyoterri

Hi Jason:

Thanks so much: I’ve read through the Codex notes and kind of understand the principle, and I’ve downloaded the user role editor and will look at that as well, to see if it will allow people to post, without seeing the rest of the admin panel.

in the meantime, I gave all of your notes to my developer and am hoping he can figure it out if I can’t (which is likely)..

thanks!

best,
Terri

Posted: Thursday Mar 15th, 2012 at 8:32 am #8221
Terri
Username: tokyoterri

Hi Jason:

I had an idea, a way to shortcut most of the coding that’s so time-consuming (and I don’t even know if my developer can do it), but still give me what I’m looking for, which is that one level of person can’t access the SuperAdmin dashboard:

1. I found a plugin by WPMU called: http://premium.wpmudev.org/project/easy-blogging/installation/
2. I only have a small group of 8-12 people who need to be restricted.
3. if I set their accounts up for them and put them in EasyBlogging mode, when the person signs in, they don’t see either the Users or the S2Member plugins – they only see their own posting and profile options (basically).

What do you think of this as a solution?

What would be even better is if S2Member can be site so that this level of person can’t exit EasyBlogging mode: then there’s no way for them to go to the SuperAdmin parts of the site. Is that possible? I will also ask at WPMU, but I think it needs to originate from S2Member’s control of the member’s role…

I’m hoping against hope that this is the answer: it’ll probably be a big help for others as well.

thanks,

best,
Terri

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.