| Author |
Message |
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Sun Jan 06, 2008 10:21 am Post subject: Permission Problem With Admin |
|
|
Hi. I had the integration working fine on phpBB3 Gold with the permissions fix. I ended up reinstalling phpBB3 and before the I did the integration again, I made a new group for the administrator ("Founder") and added the administrator (id 2) to that group along with making it the default for that user and making that user the group leader.
I then integrated Gallery again, including the permissions fix and tried to synchronize users. It worked but the activeAdminID was not filled in (still 0) and no administrators were defined in Gallery.
I went to the database and added the user to the Admin group in Gallery (the user was in the "Registered Users" and "Founder" groups in Gallery). I then set the activeAdminID to 2.
This worked! I could access the Gallery administration. But then, after another user registered, the mapping between user 2 (administrator) and the gallery 2 administrator was gone.
This has happened 3 times so far and I've double, no triple, checked all the edits and I think it has something to do with the user being the default and group leader of a DIFFERENT group rather than the administrator group.
God, I hope you understood that!  |
|
| Back to top |
|
|
AdBot
|
| Post subject: Permission Problem With Admin |
|
|
|
|
|
| Back to top |
|
 |
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1139
|
Posted: Sun Jan 06, 2008 8:50 pm Post subject: Re: Permission Problem With Admin |
|
|
| So basically you moved the default admin to another group, with admin permissions, then did the integration? There could be an issue there, I'll have to look into that... |
|
| Back to top |
|
|
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Sun Jan 06, 2008 10:58 pm Post subject: Re: Permission Problem With Admin |
|
|
| The user is still a member of the Administrators group, just that the user has a different default group. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1139
|
Posted: Mon Jan 07, 2008 1:04 am Post subject: Re: Permission Problem With Admin |
|
|
The export function does not care about default groups, but I think you may have raised two important points here for me to look into (I'm noting here for own benefit):
1. Make sure the export function is properly checking admin permissions given that phpBB3 admins can have permissions for certain areas of the board and not others (There is some ambiguity on what the Administrator group means here during export).
2. The updateAdminPermissions function should check and validate the activeAdminId value in the gallery2 table when it is called.
So for your particular issue, when you say the user loses it's mapping as admin in gallery, do you mean the activeAdminId is still set in the gallery2 table but the user is no longer admin in gallery or the activeAdminId value is cleared from the db?
There is only one place in the integration code that I can think of where is value is changed after users are exported and this should not happen when a new user registers.
If the value is still set, but the user is no longer a G2 admin, then you have a permission setting issue in phpbb. You need to check the 'Can be administrator in Gallery2' permission setting in every role/group/user page this user belongs to and make sure there are none set to 'Never' for this permission and make sure at least something is set to 'Yes'. |
|
| Back to top |
|
|
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Mon Jan 07, 2008 1:49 am Post subject: Re: Permission Problem With Admin |
|
|
The activeAdminID is still set to 2 yet the user with ID of 2 doesn't have access to the gallery administration.
I think I have found the issue. I have set the administrator group to "Standard Admin" role (which has "no" set on the Can be administrator in Gallery2).
I have then set the founder group to be a "Full Admin" role but somehow the (Can be administrator in Gallery2 permission has also been set to "no"). I believe that is the issue and hopefully, by setting the Full Admin role to set "yes" to the permission, SHOULD fix it.
Thankyou for your quick responses and keep up the great work. Hopefully this will fix my only problem.  |
|
| Back to top |
|
|
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Mon Jan 07, 2008 2:02 am Post subject: Re: Permission Problem With Admin |
|
|
It seems like the users are not being imported into gallery properly. I tried to "Synchronize Users" again and this is the result:
1 group(s) processed for import to Gallery 2 from phpBB.
0 group(s) succeeded import to Gallery 2 from phpBB.
5 user(s) processed for import to Gallery 2 from phpBB.
5 user(s) already mapped to Gallery 2.
0 admin user(s) mapped to Gallery 2.
0 user(s) succeeded import to Gallery 2 from phpBB.
It says 5 users already mapped to Gallery 2 but the g2_Users table only has 2 members in it (myself and the guest user). The group "Founders" has been added to Gallery 2 but there are no members in it (i should be added as i'm a member of the Founders group in phpBB).
I think I may remove gallery and the mod and start over from scratch again because something has definately gone awry. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1139
|
Posted: Mon Jan 07, 2008 10:59 am Post subject: Re: Permission Problem With Admin |
|
|
| How many users are listed in the g2_externalidmap table? |
|
| Back to top |
|
|
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Mon Jan 07, 2008 12:08 pm Post subject: Re: Permission Problem With Admin |
|
|
| 2. myself and guest. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1139
|
Posted: Tue Jan 08, 2008 11:33 pm Post subject: Re: Permission Problem With Admin |
|
|
I don't know why you are getting 5 users exported when there are only two. I've never seen this before in testing.
I'm looking at the export function and the default Administrator group in phpBB3. It seems the default admin group is for founders only. I tried adding users to 'standard admin' and 'full admin', but they never show up in the default admin group. This would mean the export function is ok the way it is. There should probably be a call at the end of the export function to a function similar to the g2helper updateAdminPermissions to catch scenarios where groups and admin permissions have been setup prior to the integration. This would be a little odd, but it could happen if someone setup the integration and groups with the 'can be admin in g2' permission before running the synchronize user function.
Otherwise I think the problem with phpbb admins not having g2 admin permissions is one of proper settings within phpBB.
I'll go ahead and add the two code changes mentioned above to catch all possibilities and make the integration more robust. |
|
| Back to top |
|
|
denney
Novice


Joined: Dec 24, 2007 Posts: 28
|
Posted: Wed Jan 09, 2008 6:18 am Post subject: Re: Permission Problem With Admin |
|
|
I reinstalled phpBB and Gallery2 and started from scratch. This time I did EVERYTHING the same except I didn't add the administrator to a "Founders" group.
Everything is fine and all users are synced properly.  |
|
| Back to top |
|
|
slickplaid
Beginner


Joined: Jan 12, 2008 Posts: 2
|
Posted: Sun Jan 13, 2008 4:08 pm Post subject: Re: Permission Problem With Admin |
|
|
I am having the exact same problem and reinstalling the forum is not an option for me. Has this been looked into any further?
I have set the default administrator to a different group, and although it is still in the administrators group, it's just not set to default.
There are also several other admin accounts that have the same thing going on and they are being xfer'd, just not as administrators and when I try to sync, the AdminID is automatically set to "0" and no administrators are said to have transfered.
I'm going to try a couple different variations of setting the administrator's account to the default administrators group and return back with my findings. |
|
| Back to top |
|
|
slickplaid
Beginner


Joined: Jan 12, 2008 Posts: 2
|
Posted: Mon Jan 14, 2008 3:26 am Post subject: Re: Permission Problem With Admin |
|
|
| I removed the default administrator account from all custom groups and set it as the default member for Administrators and it works like a charm. Please note that I didn't change the adminID from what it was set to (0). I reinstalled Gallery2 and it transfered all admins and works perfectly. |
|
| Back to top |
|
|
|
|
|
|
|