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.

Creating A Sub-Admin To Allow Add Users

Home Forums Community Forum Creating A Sub-Admin To Allow Add Users

This topic contains 8 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 8 months ago.

Topic Author Topic
Posted: Monday Apr 16th, 2012 at 3:43 pm #10918
VegasKev
Username: vegaskev

I am trying to create a sub-admin, so to speak. I don’t want them to actually have admin capabilities, I really just want them to have the ability to add and create new users.

I have created a new role using Justin Tadlock’s Members Plugin and have created an admin role titled “qadmin”. This role has only the following capabilities:

access_s2member_level0
access_s2member_level1
add_users
create_users
edit_dashboard

So far, when I log into the site using this new “sub-admin”, the only thing I can see is the members area. I cannot access the wp-dashboard or the user creation page. Ironically enough, the admin bar is on the top of the site with the option to add a user, but when I click it, it gets redirected to the Members Welcome page I built for the client.

I am using S2Member Pro. I have scoured documentation for this, but am having serious issues.

My partner is pending approval from Authorize.net and until then, he needs to be able to add users manually, but I cannot give him access to everything in the wp-admin via admin role, or he will completely ruin this site (been there, done that..lol). Can anyone please chime in and help me with this issue.

Thanks in advance.

  • This topic was modified 4 years, 8 months ago by  VegasKev.

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Tuesday Apr 17th, 2012 at 5:08 am #10983

Hi Kevin.

Sorry, but this is not something that s2Member supports.

You should probably contact the developer of the plugin you’re using to create that new role. Or try another one, like the User Role Editor. http://wordpress.org/extend/plugins/user-role-editor/

Here’s the WordPress documentation for roles and capabilities. http://codex.wordpress.org/Roles_and_Capabilities#Capabilities

I hope that helps. :)

Posted: Tuesday Apr 17th, 2012 at 12:25 pm #11012
VegasKev
Username: vegaskev

Thank you for your response. I understand that s2member doesn’t support that plugin. My question is how do I give certain roles (other than admin) the capability to see the wp-admin dashboard? s2 member is obviously blocking everyone except admin from wp dashboard (which makes perfect sense), but I need to know where this code is, so that I can give that one specific role wp-dashboard access. Thanks in advance.

Posted: Wednesday Apr 18th, 2012 at 2:05 am #11067

No, s2Member doesn’t touch the access to the admin area of WordPress, only the front. This is a WordPress issue, or some other plugin, but I’m sure that you should be able to find the answer googling it a bit or asking in forum about WordPress.

I’m not even sure if a single capability is what gives access to all the admin area or you get parts of it depending on the capabilities. I don’t have much experience with that, but you should read the documentation on them, that should help. http://codex.wordpress.org/Roles_and_Capabilities#Capabilities

I hope it helps.

Posted: Wednesday Apr 18th, 2012 at 2:06 pm #11135
VegasKev
Username: vegaskev

Thank you Christian. I’m on it!

Posted: Wednesday Apr 18th, 2012 at 2:54 pm #11139
VegasKev
Username: vegaskev

Okay…here is what I’ve found…

1.) Giving a role the “read” capability is what gives them access to the wp-admin. However, S2 has that blocked, as the “read” capability is assigned to the lowest role “subscriber”, which S2 Member reserves that role for “trial” and “non-paying” members.

2.) Apparently the “edit_posts” capabilities is the other capability that gives a user access to the wordpress admin when S2Member is installed. The only problem with that is that it gives a user all the access to start playing around with creating posts and sliders (using the flex slider on my theme and slides are created with custom posts).

3.) Unfortunately, even though I can give a quasi-admin the “edit_posts” capability and then just deny any post submissions, the problem now is that when giving the “add_user” and “create_user” capabilities, the quasi-admin has complete access to the S2 Member Menu item in wp-admin and can completely screw up the entire membership platform if they wanted to.

So…..here are the options that I can think of to keep everything as fail safe as possible.

1.) Have S2 Member not dissallow wp-admin with roles using the “read” capability. (though, I fear that would screw up a huge amount of functions within S2 Member)…that being stated, I fear this would not be an option.

2.) Have S2 Member create a capability in the wordpress role manager that would allow access to S2 Member such as “access_S2 Member”. The problem with that is that I fear it would screw up custom roles that existing S2 Member users already have and force them to manually go in and add this new capability to custom roles that they’ve created.

3.) Have S2 Member create a capability that does reverse of what a capability normally does and actually BLOCK S2 Member menu item and functions, such as “block_S2Member_menu”. This way, I can still give someone access to create a user, without giving them access to all of S2 Member functions, thus risking the chances that they will try to play with S2 Member and screw up all of the configurations.

Hopefully we can make some progress with this. I’m sure that people with massive membership sites could use this option as quasi-admins can sometimes become a “MUST HAVE” scenario where the site management is divided between multiple people. Being the head developer, I don’t have time to manually create users on the backend when necessary, yet for the site’s purpose, manually added users is a must.

Maybe I’m missing something….I don’t know. Unfortunately, I need to be able to give some new users the same capabilities as paying customers…I know it probably makes no sense (as it kind of defeats the purpose), but it is needed. Thanks in advance for all of your assistance Christian and any insight you have to helping me come to a solution on this.

  • This reply was modified 4 years, 8 months ago by  VegasKev.
Posted: Monday Apr 23rd, 2012 at 1:26 pm #11614
Raam Dev
Username: Raam
Staff Member

Hi Kevin,

As Cristian mentioned, s2Member does not integrate with or handle WordPress admin access. s2Member is designed to offer control over content restriction for users with the Subscriber capabilities. If you want to create an additional WordPress admin, you can do so within the WordPress Add User panel. If you want to create a custom sub-admin WordPress role, you’ll need to handle that customization yourself as s2Member doesn’t support that.

As per our support policy we cannot assit with custom features (please see s2Member® » Support Policy » Outside Scope).

Posted: Monday Apr 23rd, 2012 at 2:11 pm #11627
VegasKev
Username: vegaskev

Raam….are you telling me that S2Member doesn’t block the WP-Admin dashboard for any of the roles …i.e. “subscriber”?

If so….then why can my subscribers not access the wp-admin dashboard? I have not hidden it with any plugins or scripts. I have disabled access for subscribers to view the wp-admin, yet when I log in as a subscriber and I enter http://mydomain.com/wp-admin, they are redirected to the Members Welcome page….so what could it be if not S2 Member blocking clients from accessing wp-admin?

Posted: Monday Apr 23rd, 2012 at 6:27 pm #11642

s2Member doesn’t prevent any role from entering the admin area, WordPress itself regulates the access to it based on the WP capabilities that user has.

Viewing 8 replies - 1 through 8 (of 8 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.