WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
Access to the Tools > Subscribers Page (11 posts)

  1. pixelyzed
    Member
    Posted 2 years ago #

    Hi there!

    I'm having a specific issue with Subscribe2 on a multisite install and was wondering if it is something I'm not doing right or if it is a limitation of the plugin.

    First, a little context. This site is a multisite network with 1 main site/blog and 60 "sub sites" or blogs on the network. This is an artists-painters association. Most of the sub site have one main owner/admin but I restrict their capabilities quite severely with Justin Tadlock's Members plugin. They have no access to managing other users on their blog/site for exemple (as well as many other limitations related to keeping the branding and the number of pages the same on all those sub sites).

    The issue I'm having is that, I could swear that, when I first started running the site, these users had access to the Tools > Subscribers page (/wp-admin/tools.php?page=s2_tools) so they could add to and remove emails from the list of subscribers. But now they don't. Same for the page to edit the subscriptions of these users (/wp-admin/users.php?page=s2_users&email=stephberg%40webfocusdesign.com for example).

    Is there a specific capability in Members that needs to be enabled to give users access to these features? Keep in mind I need to keep tight control over what my network users have access to as they are very non-technical users that could break their site if they had access to too much. I don't want to give them access to modify other user accounts and especially NOT the ability to create new ones as they could create adminitrator accounts (roles editing is not granular enough in WOrdPress to control what type of account a user in a certain role could create). In any case, even giving user that capability doesn't give them access to the Subscribers page.

    I also don't see anything in the Subscribe2 settings page to modify what user role has access to those pages.

    So, my question is, is there a way to give users access to the Subscribers page without giving them the keys to the whole building... ;) Can a new capability be added to be controlled by Members and similar plugins? Is there something else I can do right now that I'm just not seeing?

    Thanks! Purchased the HTML email addon recently and can't wait to have more time to tinker with it.

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @pixelyzed,

    I'm fairly sure this will be to do with the Members plugin. To check disable it and see of access is granted to these pages again.

    Within Subscribe2 the Tools menu is granted access with the "manage_options" capability. I don't use a member management plugin myself so I can't advise you what you need to do within that plugin to grant access to the Subscribe2 without opening up the whole administration area.

  3. pixelyzed
    Member
    Posted 2 years ago #

    Hi there!

    Thanks for the reply!

    Indeed, giving the user the manage_options capability did enable access to the Subscribers page but, I'm sure you can understand that on a tightly controlled network, giving some users this kind of access is simply not an option. It gives them access to way too many features I don't want them to see or modify.

    Would it be possible for you in a future update to either, create a setting in the Subscribe2 settings page to select user roles that can have access to managing subscribers? This should include non-default WordPress roles as that is what I'm using and other similar plugins besides Members offer the ability to create roles.

    Another option would be to create a new capability. Plugins like NextGen, Gravity Forms and Headway which is my theme all add different capabilities control access to some of their features with a high level of granularity through Members and similar plugins. It works very well. That way, admins could edit certain roles and enable access to subscribers management for only these roles they need to without the need to give them manage_options access which is simply not workable for a lot of multisite network administration scenarios.

    What do you think?

  4. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @pixelyzed,

    I'll take a look but I can't easily see how NextGEN has done it. I can see a custom capability but I'll have to figure out how this will work on installs without any role management plugins.

    Adding another option is something I'd rather avoid since I suspect it will remain unused by the vast majority of users.

    Any solution would also need to be something that works with the majority of role management plugins rather than just one.

  5. pixelyzed
    Member
    Posted 2 years ago #

    I hear you.

    Without a role management plugin I think you should fall back on the default WordPress roles. Any admin sees everything but even Editors (the next one down) do not get the manage_options capability by default which makes sense. Managing options is an admin kind of privilege. So they wouldn't see the Subscribers page either.

    As for NextGen, I'm not a plugin developer yet so I don't how it does it but it adds 6 new capabilities to control access to its different admin features. Gravity Forms adds 20 new capabilities and Headway adds 4. Even JetPack adds 1 for WordPress.com Stats (view_stats). Other plugins and themes probably add them too.

    That way, you can check if the role the current user is in has your new subscribers_management (or whatever) capability enabled and show them the Subscribers management pages (list and edit) if they do. Access to the main Subscribe2 settings page will keep depending on the manage_options capability.

    On a general note, I think that more and more people use WordPress multisite and, since your plugin is the only one that keeps everything within WordPress there's gonna be more and more people using it and running into the same issues with individual site "owners" on multisite network wanting to access subscribers management while the network admins need to control these owns access to other stuff.

  6. Jason Lemahieu (MadtownLems)
    Member
    Posted 2 years ago #

    I love when plugins work nicely with Members.

    Basically, I think you'd want to do this:
    if (members plugin active) { use custom capability for that page }
    else { use normal manage_options capability }

  7. pixelyzed
    Member
    Posted 2 years ago #

    @MadtownLems

    Thanks for putting this a lot more succinctly than I have :)

    But this is not just for Members. User Role Manager and Advanced Access Manager just to name these two also can add new user roles to WP and assign them any default or plugin/theme added capabilities. So Subscribe2 should check if that custom capability is enabled for the current user and if yes, show the page and if no, then check for manage_options.

  8. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @ pixelyzed, @MadtownLems

    Guys, I found this blog from the author of Members.

    It's a very elegant solution that I can quickly implement. Basically I create a new filter called s2_capability and wrap that around where I specify the core capabilities to access the Subscribe2 pages. Then of you want to over ride or customise it use something like this either using core capabilities or having created your own new ones:

    function s2_admin_changes( $capability, $menu ) {
    	// $capability is the core WordPress capability to allow admin page access
    	// $menu is the title of the page:
    	//	'user' for access to personal subscription settings
    	//	'manage' to allow access to the user management screen
    	//	'settings' to allow access to the plugin settings
    	//	'send' for access to the Send Email page
    	if ( $menu == 'send' ) {
    		return 'read';
    	}
    
    	return $capability;
    }
    
    add_filter('s2_capability', 's2_admin_changes', 10, 2);

    I'll get this into version 7.0.

  9. pixelyzed
    Member
    Posted 2 years ago #

    Never took the time to thank you for this Matt but the new filter works beautifully for my needs. Awesome work with version 7.0!

    I had a question about the HTML addon I purchased a while ago. How do I get access to the new version for Subscribe2 7.x? Do I need to purchase it again or an upgrade?

    Thanks again and very Happy Holidays to you!

  10. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @pixelyzed,

    For updated version of the HTML code you need to login in and download from WPPlugins.com. You'll need to be paying for continuing upgrades and support though, otherwise it's a case of purchasing again.

  11. pixelyzed
    Member
    Posted 2 years ago #

    Hi Rob!

    Yes, I found the info in my emails after posting last so I could download the latest Subscribe2 HTML version.

    Thank you! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags