Current User: Guest
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Admin can't change options wp 2.8.1 – no sufficient permissions

Information
UserPost

5:24 am
Jun 21, 2009


sonolento

Guest

 
1

With wp 2.8.1. + SimplePress 4.0.3. one can't access any of the forum admin pages.

One gets a "You do not have sufficient permissions to access this page." message.

7:24 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14800

 
2

have you turned on the block admin option in the forum – options – global tab?  if so, turn it off and your users will be able to get to the back end (our MOST requested feature).

7:43 am
Jun 21, 2009


sonolento

Guest

 
3

This option has been turned off (using wp 2.8). In wp 2.8.1. one can't even open that menu to change it.

The problem must have to do with the new permission checks in 2.8.1.

"Extra security has been put in place to better protect you from plugins that do not do explicit permission checks." in WordPress dev blog

7:46 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14800

 
4

Why do you think that is applicable to SPF?? I ask because when that trac ticket was committed, I wondered what it was all about…

We do explicit permission checks… And we have been running 2.8.1 here with no issues…

I can try to do some more research too…

7:55 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14800

 
5

Post edited 2:56 pm – Jun 21, 2009 by Mr Papa


Well, of course…  leave it to the wp devs to change something and break plugins on a bug fix point release (one that shouldnt have been needed if they had properly tested in the first place!)…

Yes, this is going to cause problems with wp 2.8.1…   Its not released yet, so will see if we can get a ANOTHER wp compatibility release up before they release…

thanks for bringing this to our attention!

7:59 am
Jun 21, 2009


sonolento

Guest

 
6

Exactly.

Thanks. And keep this great plugin going!

8:22 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14800

 
7

looks like its not really a permissions issue but they want menu and submenu pages added in a different order…

Are you up to trying a quick change for me to see if it solves it for you?

8:45 am
Jun 21, 2009


sonolento

Guest

 
8

Post edited 3:46 pm – Jun 21, 2009 by sonolento


Ok. What do I need to change?

8:49 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14800

 
9

find file sf-admin-header.php…  in routine sfa_admin_menu(), we need to reorder the add menu and add subpage stuff…  do the add menu first and then the sub-menus…   its a fairly simple re-ordering, but will paste the whole routine

function sfa_admin_menu()
{
    global $current_user;

    $status = sf_get_system_status();
    if ($status == 'ok')
    {
        $parent = 'simple-forum/admin/sf-adminforums.php';

        if (sf_current_user_can('SPF Manage Options') ||
            sf_current_user_can('SPF Manage Forums') ||
            sf_current_user_can('SPF Manage Components') ||
            sf_current_user_can('SPF Manage User Groups') ||
            sf_current_user_can('SPF Manage Permissions') ||
            sf_current_user_can('SPF Manage Database') ||
            sf_current_user_can('SPF Manage Users') ||
            sf_current_user_can('SPF Manage Admins') ||
            sf_get_member_item($current_user->ID, 'moderator'))
        {
            if(function_exists('add_object_page'))
            {
                add_object_page('Simple:Press Forum', __('Forum', 'sforum'), 8, $parent, '', 'div');
            } else {
                add_menu_page('Simple:Press Forum', __('Forum', 'sforum'), 8, $parent, '');
            }

            add_submenu_page($parent, __('Online Help', 'sforum'), __('Online Help', 'sforum'), 0, 'simple-forum/admin/sf-adminpopuphelp.php');
        }

        if (sf_current_user_can('SPF Manage Forums'))
        {
            add_submenu_page($parent, __('Forums', 'sforum'), __('Forums', 'sforum'), 0, 'simple-forum/admin/sf-adminforums.php');
        }
        if (sf_current_user_can('SPF Manage Options'))
        {
            add_submenu_page($parent, __('Options', 'sforum'), __('Options', 'sforum'), 0, 'simple-forum/admin/sf-adminoptions.php');
        }
        if (sf_current_user_can('SPF Manage Components'))
        {
            add_submenu_page($parent, __('Components', 'sforum'), __('Components', 'sforum'), 0, 'simple-forum/admin/sf-admincomponents.php');
        }
        if (sf_current_user_can('SPF Manage User Groups'))
        {
            add_submenu_page($parent, __('Usergroups', 'sforum'), __('User Groups', 'sforum'), 0, 'simple-forum/admin/sf-adminusergroups.php');
        }
        if (sf_current_user_can('SPF Manage Permissions'))
        {
            add_submenu_page($parent, __('Permissions', 'sforum'), __('Permission Sets', 'sforum'), 0, 'simple-forum/admin/sf-adminpermissions.php');
        }
        if (sf_current_user_can('SPF Manage Users'))
        {
            add_submenu_page($parent, __('Users', 'sforum'), __('Users', 'sforum'), 0, 'simple-forum/admin/sf-adminusers.php');
        }
        if (sf_current_user_can('SPF Manage Admins') || sf_get_member_item($current_user->ID, 'moderator'))
        {
            add_submenu_page($parent, __('Admins', 'sforum'), __('Admins', 'sforum'), 0, 'simple-forum/admin/sf-adminadmins.php');
        }
        if (sf_current_user_can('SPF Manage Database'))
        {
            add_submenu_page($parent, __('Database', 'sforum'), __('Database', 'sforum'), 0, 'simple-forum/admin/sf-admindatabase.php');
        }
    } else {

        if(function_exists('add_object_page'))
        {
            $parent = 'simple-forum-install';
        } else {
            $parent = 'simple-forum/sf-loader.php';
        }

        if(function_exists('add_object_page'))
        {
            add_object_page('Simple:Press Forum', __("Forum", "sforum"), 'activate_plugins', $parent, '', 'div');
        } else {
            add_menu_page('Simple:Press Forum', __("Forum", "sforum"), 'activate_plugins', $parent, '');
        }

        if($status == 'Install')
        {
            add_submenu_page($parent, __("Install Simple:Press Forum", "sforum"), __("Install Simple:Press Forum", "sforum"), 'activate_plugins', 'simple-forum/sf-loader.php');
        } else {
            add_submenu_page($parent, __("Upgrade Simple:Press Forum", "sforum"), __("Upgrade Simple:Press Forum", "sforum"), 'activate_plugins', 'simple-forum/sf-loader.php');
        }
    }
}

Be careful when cutting and pasting as you will get munged quotes…  If you can make your way around code, I think it will be pretty obvious what the actual changes are (moved add menu page stuff before add submenu page)…

this fixes any issues for me, but would be nice to get confirmation…

9:06 am
Jun 21, 2009


sonolento

Guest

 
10

Bingo! This solves it.

Thanks.

Information

Reply to Topic:
Admin can't change options wp 2.8.1 – no sufficient permissions

Guest Name (Required):

Guest Email (Required):

NOTE: First Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
2 + 12
   


Information


About the Simple:Press Forum

Forum Timezone: America/Chicago

Most Users Ever Online: 118

Currently Online: Lee H, rachelbaker
62 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 10
Topics: 6277
Posts: 44976

Membership:

There are 4332 Members
There have been 1697 Guests

There are 2 Admins
There are 2 Moderators

Top Posters:

jim – 410
ovizii – 232
Tal – 206
Isaak – 181
Barandum – 178
David Polensky – 173
neon – 152
peterhol – 145

Recent New Members: Baz, cdhmum, rachelbaker, dowbright, alfie, mfiorenza, Rupali, Evan, algaidaman, Caleb

Administrators: Yellow Swordfish (15029 Posts), Mr Papa (14800 Posts)

Moderators: -Radio- (1248 Posts), Luffer (482 Posts)