Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-23T22:33:41-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6515 2011-05-23T22:33:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15732#p15732 <![CDATA[Re: Admin access to all the pages?]]>
However, since the WordPress core runs much deeper than just s2Member's protection routines, that type of change would actually be in conflict with the way other core functionality ( i.e. has_cap, current_user_can, user_can ) deals with permissions at a fundamental level.

I'm not sure if we should change this behavior at all. I think what needs to change, is the way WordPress itself tests for Capabilities. Ideally, a standard WordPress installation would employ the concept of Super Administrators too, making it possible to exclude Super Administrators from all Capability tests, even on a standard installation. But this is something the framework should do, not s2Member.

* I do realize though, we can't change the WordPress framework to meet our specific needs, so I'll continue to think about this and see if we can come up with an alternative. Either that, or perhaps we should start a TRAC ticket at WordPress.org to address this concern.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 10:33 pm


]]>
2011-05-23T21:40:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15727#p15727 <![CDATA[Re: Admin access to all the pages?]]>
And were you thinking about using is_super_admin() in s2Member's code instead of is_admin? Maybe a new s2_admin()? :P

Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 9:40 pm


]]>
2011-05-23T21:17:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15724#p15724 <![CDATA[Re: Admin access to all the pages?]]> I agree with you Cristián.
The ability to "edit_users" seems more logical to me too, although by default, WordPress does not allow direct editing of Capabilities, only of Roles.

This built-in Conditional would probably be good to use for this,
http://codex.wordpress.org/Function_Ref ... uper_admin
as it would help to future-proof the design.

But, upon inspecting the source code for this function, I find this:
Code:
/**
 * Determine if user is a site admin.
 *
 * @since 3.0.0
 *
 * @param int $user_id (Optional) The ID of a user. Defaults to the current user.
 * @return bool True if the user is a site admin.
 */
function is_super_admin( $user_id = false ) {
    if ( $user_id )
        $user = new WP_User( $user_id );
    else
        $user 
= wp_get_current_user();

    if ( empty( $user->id ) )
        return false;

    if ( is_multisite() ) {
        $super_admins = get_super_admins();
        if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins ) )
            return true;
    } else {
        if ( $user->has_cap('delete_users') )
            return true;
    }

    return false;
}
 

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 9:17 pm


]]>
2011-05-23T20:25:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15712#p15712 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 8:25 pm


]]>
2011-05-23T17:47:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15696#p15696 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by cassel — May 23rd, 2011, 5:47 pm


]]>
2011-05-23T17:25:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15691#p15691 <![CDATA[Re: Admin access to all the pages?]]> Investigation completed.
I was able to reproduce the issue described here.
This is the intended behavior.


In WordPress, there are two kinds of "Administrators".

1. On a standard WordPress installation,
there are "Administrator" Roles.

2. On a Multisite installation of WordPress, there are
"Administrator" Roles, and "Super Administrators" too.

On a standard WordPress installation, even "Administrator" Roles must satisfy any internal Capability ( and/or Custom Capability ) requirements. Administrators are not exempt from this, because there could potentially be more than one Administrator for a single standard installation of WordPress. Therefore, WordPress/s2Member disallowing access to an area of the site that requires a specific Capability, is correct, even for Administrators. If you require a certain Capability to access an area of your site, you need to make sure that your own Administrator account also has this Capability. This can be accomplished by editing your Profile in the Dashboard. s2Member provides a box to enter Custom Capabilities. There are also several Role/Capability editing plugins available, which allow further customization.

On a Multisite installation, "Super Administrators" have *all* Capabilities. In other words, nothing is ever off limits to a "Super Administrator". Unfortunately, a standard installation of WordPress does not have this feature yet. However, a standard installation of WordPress does assume that any Administrator with the permission to "delete_users", is a Super Administrator ( of sorts ). So the question is, should s2Member allow access to *anything*, if it's a standard installation Administrator that can "delete_users"? I'm leaning in that direction, but I'd like some feedback on this please.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 5:25 pm


]]>
2011-05-23T12:40:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15649#p15649 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 12:40 pm


]]>
2011-05-23T04:38:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15629#p15629 <![CDATA[Re: Admin access to all the pages?]]>
Cristián Lávaque wrote:
I can confirm I just reproduced this. The problem is with the custom capability, not the level. If the admin account doesn't have the ccap required by the page, then you are denied access. Jason may see this soon. In the meantime, add the custom capability to your profile and that fixes it.

Thanks guys. I'm investigating now.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 4:38 am


]]>
2011-05-21T23:18:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15568#p15568 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by Cristián Lávaque — May 21st, 2011, 11:18 pm


]]>
2011-05-21T23:16:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15567#p15567 <![CDATA[Re: Admin access to all the pages?]]> Thanks.

Statistics: Posted by cassel — May 21st, 2011, 11:16 pm


]]>
2011-05-21T23:13:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15566#p15566 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by cassel — May 21st, 2011, 11:13 pm


]]>
2011-05-21T23:05:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15565#p15565 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by Cristián Lávaque — May 21st, 2011, 11:05 pm


]]>
2011-05-21T22:48:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15564#p15564 <![CDATA[Re: Admin access to all the pages?]]> Statistics: Posted by Cristián Lávaque — May 21st, 2011, 10:48 pm


]]>
2011-05-21T22:31:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15563#p15563 <![CDATA[Re: Admin access to all the pages?]]> I tried to access the page for unit 4 which has level 1 and "basic" restriction.
I was automatically redirected to the "oops" page, prompting me to register.
If i remove the "basic" custom capabilities, i CAN access the page.

Is there something i should do with the "Basic" custom capability in order to overide the restriction and view it as an admin? I didn't do anything except put it under the restriction level. I have not yet configure the paypal button and such. Not sure what else i can say to describe the situation.

Statistics: Posted by cassel — May 21st, 2011, 10:31 pm


]]>
2011-05-21T22:21:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15562#p15562 <![CDATA[Re: Admin access to all the pages?]]>
Are you positive you were trying to access them from your admin account?

Could you please give more details of the problem?

Statistics: Posted by Cristián Lávaque — May 21st, 2011, 10:21 pm


]]>
2011-05-21T18:46:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6515&p=15556#p15556 <![CDATA[Admin access to all the pages?]]>
Is there anything i forgot to do to access it? I thought as an admin, i would be able to access anything at anytime.

Statistics: Posted by cassel — May 21st, 2011, 6:46 pm


]]>