Group Admin Permissions doesn't save changes

This mod will make it posible to specify permissions to all "special pages, like MEMBERLIST, PROFILE VIEW and so on.
The permissions support USERGROUP, making this tool very powerfull

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Group Admin Permissions doesn't save changes

Postby drewkeller on Thu 01. Apr, 2004 09:18

I have the MEMBERLIST set wiuth Private [Hidden] permission.
I can select ON or OFF in the group permissions (advanced view)for view, post, etc. but after I click Submit and then come back in to view the group permissions, my changes have not taken affect.

When I look at the phpbb_forums database, there are no items listed with a forum_id that is negative. so I manually added a new line for the memberlist and the permissions hack seems to work properly for viewing the memberlist.

When I go back into change the group permissions again, the line i added before is removed again from the phpbb_forums database.

what is going on with this?
thanks.
drewkeller
Poster
Poster
 
Posts: 1
Joined: Thu 01. Apr, 2004 09:09

Postby Kazper on Sat 20. Nov, 2004 18:02

I have this same problem - after having moved to a new host for my forum. On my old host - using the exact same files for the forum - it works perfect.

In other words it must have something to do with the setup of php/mysql at one host that means this mod does not work.

My new host uses php safe mode - my old one didn't. THis might make a difference although I'm not sure what it could be.

In any case the strangest part is that normal forums work fine. I can edit their permissions just fine - but not the special pages.
Kazper
Poster
Poster
 
Posts: 5
Joined: Thu 12. Aug, 2004 00:36
Location: Denmark

Postby Kazper on Sat 20. Nov, 2004 20:45

Ironically it was fixed by changing the unique identifier number for my pages from a negative to a positive value despite the following quote by Niels:

you should choise a number witch is not already in use in the file constants.php, and it MUST be a negative value


But as soon as I made it a positive value it fixed the problem. I have not noticed any ill effect from doing this, but perhaps Niels can tell us why it is that it must be negative?

edit:

Also version differences:

Old host: PHP 4.3.3 & MySQL 3.23.58
New host: PHP 4.3.6 & MySQL 4.0.15

It is most certainly a part of the standard admin_ug_auth.php file that filters out all the "forums" with negative forum_id - on some hosts and not others. Very strange....
Kazper
Poster
Poster
 
Posts: 5
Joined: Thu 12. Aug, 2004 00:36
Location: Denmark

Postby Niels on Tue 23. Nov, 2004 22:33

I need to ask, if you all sucessfully did run the included db_update.php file ?

this file makes it posible to store a negative number in the uniqe identifyer in the DB.
failing doing so will make it imposible to store a negative identifyer - thereby makeing this mod not work.

if you have access to phpmyadmin or like, please verify thay the identifyer in the following tables can be a negative number.

auth_access (field "forum_id")
forums (both the field "forum_id" and "cat_id")
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Kazper on Thu 25. Nov, 2004 19:59

I ran it yes.

I'm not sure how you see this in phpMyAdmin? But I tried insterting a row from phpMyAdmin in each of those two tables with negative values in those keys and it worked.
Kazper
Poster
Poster
 
Posts: 5
Joined: Thu 12. Aug, 2004 00:36
Location: Denmark

Postby Kazper on Thu 09. Dec, 2004 20:35

Anyone got any good ideas?
Kazper
Poster
Poster
 
Posts: 5
Joined: Thu 12. Aug, 2004 00:36
Location: Denmark

Postby Kazper on Thu 16. Dec, 2004 19:14

Apparently the following code is the problem:

Code: Select all
         for($i = 0; $i < count($forum_access); $i++)
         {
            $forum_id = $forum_access[$i]['forum_id'];

            if (
               ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id]['auth_mod'] != $auth_access[$forum_id]['auth_mod'] ) ||
               ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]['auth_mod']) )
            )
            {
               $update_mod_status[$forum_id] = $change_mod_list[$forum_id]['auth_mod'];

               if ( !$update_mod_status[$forum_id] )
               {
                  $forum_auth_action[$forum_id] = 'delete';
               }
               else if ( !isset($auth_access[$forum_id]['auth_mod']) )
               {
                  $forum_auth_action[$forum_id] = 'insert';

               }
               else
               {
                  $forum_auth_action[$forum_id] = 'update';
               }
            }

            for($j = 0; $j < count($forum_auth_fields); $j++)
            {
               $auth_field = $forum_auth_fields[$j];

               if( $forum_access[$i][$auth_field] == AUTH_ACL && isset($change_acl_list[$forum_id][$auth_field]) )
               {
                  if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
                     ( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] != $auth_access[$forum_id][$auth_field] ) ||
                     ( !isset($auth_access[$forum_id][$auth_field]) && !empty($change_acl_list[$forum_id][$auth_field]) ) ) ||
                     !empty($update_mod_status[$forum_id])
                  )
                  {
                     $update_acl_status[$forum_id][$auth_field] = ( !empty($update_mod_status[$forum_id]) ) ? 0 :  $change_acl_list[$forum_id][$auth_field];

                     if ( isset($auth_access[$forum_id][$auth_field]) && empty($update_acl_status[$forum_id][$auth_field]) && $forum_auth_action[$forum_id] != 'insert' && $forum_auth_action[$forum_id] != 'update' )
                     {
                        $forum_auth_action[$forum_id] = 'delete';
                     }
                     else if ( !isset($auth_access[$forum_id][$auth_field]) && !( $forum_auth_action[$forum_id] == 'delete' && empty($update_acl_status[$forum_id][$auth_field]) ) )
                     {
                        $forum_auth_action[$forum_id] = 'insert';
                     }
                     else if ( isset($auth_access[$forum_id][$auth_field]) && !empty($update_acl_status[$forum_id][$auth_field]) )
                     {
                        $forum_auth_action[$forum_id] = 'update';
                     }
                  }
                  else if ( ( empty($auth_access[$forum_id]['auth_mod']) &&
                     ( isset($auth_access[$forum_id][$auth_field]) && $change_acl_list[$forum_id][$auth_field] == $auth_access[$forum_id][$auth_field] ) ) && $forum_auth_action[$forum_id] == 'delete' )
                  {
                     $forum_auth_action[$forum_id] = 'update';
                  }
               }

            }

         }



In that it always marks any "forums"/pages with a negative forum_id with delete, and does not mark it insert, no matter what the drop downs is set to... I verified this through several debug messages along the way
Kazper
Poster
Poster
 
Posts: 5
Joined: Thu 12. Aug, 2004 00:36
Location: Denmark


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron