coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: jcocking on November 24, 2005, 04:19:40 PM

Title: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 04:19:40 PM
Current versions:  Gallery 1.4.2 bridged to phpBB 2.0.018

I log on to the forum with my admin user id.  Link over to the gallery and lose my admin rights.  It appears the bridging is accepting the user id, but not giving any permissions.  It is treating the user id as a guest/anonymous user id. 

For example.

1. I logon to the forums with my admin id.
2. link to galleries and am treated as a guest.
3. turn bridging off and my user id becomes the admin of the galleries.
4. turn bridging on and my user looses all addmin permissions


Coppermine install: http://www.lotuselan.net/gallery/
Forum install: http://www.lotuselan.net/forums/
Coppermine version: cpg1.4.2
Forum version: phpBB 2.0.18
Test user account: test / test

BridgeManager settings:
Forum URL:  http://www.lotuselan.net/forums
Relative path to your BBS's config file:  ../forums/
Use post-based groups?:  0 


What have I missed?

jeff
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 24, 2005, 05:27:15 PM
Please post more information about your setup: http://forum.coppermine-gallery.net/index.php?topic=24032.0
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Joachim Müller on November 24, 2005, 05:30:46 PM
When bridging is enabled, your coppermine admin account will be no longer valid - coppermine then drops it's own user management in favor of the user management of your bbs app. Therefor, you'll have to log in with your admin account from the BBS.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 05:36:58 PM
I am using the BBS admin.  All users lose thier user rights when moving from phpbb to CPG.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Joachim Müller on November 24, 2005, 05:38:21 PM
do as Nibbler suggested.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 05:40:37 PM
See original post.  Modifies to have all info in one post.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Joachim Müller on November 24, 2005, 05:50:52 PM
when logging in into your bbs, you get redirected back to coppermine as expected. However, coppermine doesn't recognize you as being logged in (as it still displays the login link). This usually means you have something wrong in your bridge setup, or your bbs cookie is not readable for coppermine. Make sure that your bbs app is using cookie authentification (not only a session-driven authentification scheme).
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 06:04:49 PM
So.......

I turned off the bridge.  I can not log into the standalone version with my CPG admin id.  I was able to logon with the standalone id earlier.

jeff
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 24, 2005, 06:09:22 PM
Looks like your groups are not properly synced. Comment out this line in groupmgr.php and then go to the page directly in your browser

if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

When you use the bridge manager you must complete the process right to the final step.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 06:18:03 PM
There is something really screwy going on.

I am in stand alone mode:

All users with a user group of 1 can not login.  They go through the process, but nothing ever happens.
All users with a user group of 2 can login and use all the standard user features.

I commented out the previous field and still get permission denied on running the bridge manager.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 24, 2005, 06:29:26 PM
To re-sync the groups you need to go to groupmgr.php (the file you just modified) in Coppermine with your browser . You seem to have picked up an extra administrators group somehow. Please re-enable the bridge, experimenting with both 'post based groups' settings.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 06:35:14 PM
the group manager showed 2 administrator groups.  Deleted one.  Resolved the user group 1 versus 2 problem.  Will work on some on trying different group settings....
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 07:37:30 PM
I have tried every thing and nothing works.  It appears we have a cookie incompatibility between phpbb 2.0.18 and CPG 1.4.2.  Here are my cookie settings for phBB:

Cookie domain:   .lotuselan.net
Cookie name  lotuforu_phpbb
Cookie path  /forums
Cookie secure  Disabled

Can you tell me what I am supposed to set the bridgemgr setting for it to work?

thank you....
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 24, 2005, 08:38:20 PM
The cookie path must be set to '/' for coppermine to be able to read them.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 24, 2005, 10:16:22 PM
We are getting closer. 

Cookies are working and people are authenticated correctly. 

I still have a problem with a couple of key user accounts.  I do not use groups within phpBB.  So phpBB assigns each user a group id that is unique and incremented.  My admin user id is assigned group 1 and only has user rights in the gallery.  The second registered user has a group id of 2, has user rights in the forum, but has admin rights in the gallery. 

I have the bridgemanager set not to use groups, but appears that it is using the lower numbered groups for security settings.

jeff 
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 24, 2005, 10:37:55 PM
That system may not be compatible with the coppermine bridging system then. Anyone in phpbb's group 2 is given admin rights in coppermine.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 25, 2005, 12:18:22 AM
Then why do you have the option to use group settings or not to use group settings within your Bridge Manager?

To sum this support request:

You can only use phpBB 2.0.18 and CPG 1.4.2  together, if you implement groups. 

If you do not implement groups, phpBB assigns a sequential group number to the registered users: 
This is the default setting in phpBB. 

CPG uses the groups number to assign admin rights from phpBB, even if you tell the bridge manager not to use groups.

This means:

Please verify if I am understanding your previous post correctly.  Can you also provide what the higher number groups will be?

jeff
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 25, 2005, 12:31:52 AM
I don't recognise this groups system that you describe. The user with id 2 is in group 2 which is the default admin account you create during installation of phpbb. That user and any other user you add into group 2 is treated as an admin by cpg. If 'post based groups' is disabled then anyone in any other group is treated as a regular user and you just have 4 simple groups in coppermine's groups page. If you enabled 'post based groups' then all groups you have created yourself in phpbb are imported to coppermine and you can setup different permissions for different groups of registered users. The integration works fine both ways.

If you have a user with id 1 or a user with id 2 that is not the default admin account then you have something wrong with your forum.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 25, 2005, 01:06:23 AM
Quote from: Nibbler on November 25, 2005, 12:31:52 AM
The user with id 2 is in group 2 which is the default admin account you create during installation of phpbb. That user and any other user you add into group 2 is treated as an admin by cpg.

The only problem, is the first user id created is the admin of the phpBB boards.  It gets assigned a user group of 1.  The second register is assigned group 2.  This second register becomes the admin of CPG and the forum administrator is only a user.

With phpBB with group settings turned off, you should be keying off of the user_level field found in the phpbb_users table.  In this table, registered users are "0" and administrators are "1".




Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 25, 2005, 01:08:02 AM
Quote from: jcocking on November 25, 2005, 01:06:23 AM
With phpBB with group settings turned off

Where is this setting ?
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 25, 2005, 04:00:02 AM
The most basic user level within phpBB is user or admin.  This is defined on the user admin section with the permissions option.  You have the option of making every userid ethier an admin or a user.  This choice is stored in the phpbb_users table in the user_level field.  0 = user, 1 = admin

There is a secondary option level within phpBB.  This is the option to create groups.  Groups are used to allow moderation activities to a subsection of users.  Groups are not used from an admin perspective.  Groups are created to allow 5 users to moderate one forum and define special permissions for the moderators.  The key is groups are forum moderators.

Because groups are special moderator functions, they are turned off unless you create a group.  You can create a group by going to Group Admin => management.  Here you can create groups.  Most boards do not use groups, unless you are an advance user or have a fairly large group that requires multiple moderators per forum. 

The bridge program uses the phpBB group feature as the tie-in.  It should be using the user_level field to define admin rights versus a registered user.

jeff
Title: Re: Admin rights not bridging phpBB to CPG
Post by: tripslip38 on November 26, 2005, 09:55:24 AM
I am having a similar problem to Jeff.

Current versions:  Gallery 1.4.2 bridged to phpBB 2.0.18

Bridging authentication and cookies work fine, but my personal user in phpBB, which is an Administrator, and is recognized in CPG, does not get the CPG admin menu. I use login with my admin acct(authenticated by phpBB and successfully bridged to CPG) and then i DO get the admin menu. In my old setup with 2.0.17 and CPG 1.3.2, my personal user which was a phpBB admin, got the admin menu in CPG.

Keep in mind my admin status is granted by User Levels in phpBB and not User Groups.

Coppermine install: http://www.backcountrypilot.org/gallery/
Forum install: http://www.backcountrypilot.org/forum/phpBB2
Coppermine version: cpg1.4.2
Forum version: phpBB 2.0.18
Test user account: test / test

BridgeManager settings:
Forum URL:  http://www.backcountrypilot.org/forum/phpBB2
Relative path to your BBS's config file:  ../forum/phpBB2
Use post-based groups?:  0

Though this info won't get you far since I cannot give you a test user with admin rights in phpBB.

I think the Bridging Manager is a vast improvment over the mod-type bridge installation of previous versions, but for some reason it's just not importing the phpBB user levels as CPG groups properly. It used to.

Also, as an experiment I enabled "post-based groups" in CPG in an attempt to fix the situation. It imported my groups with only the first character of the group name,  ie Test Group became "T".

There's really no way CPG that I see to make a phpBB user group or post based group a true CPG admin, that gets the actual CPG admin menu upon authentication.

Thanks. Good work guys.

Zane
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 26, 2005, 03:52:02 PM
Ah, I understand now. Please test the attached bridge file.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: tripslip38 on November 26, 2005, 07:09:48 PM
That definitely fixed one of the problems, as now my personal user, with User Level = Administrator, gets admin status in CPG.

However, my CPG groups are still the default ones, and my personal user belongs to "Registered." The groups do not correspond at all to either 1) phpBB User Level names, or 2) phpBB User Group names. This is definitely not as big of a deal, but it would be nice to automatically belong to the Administrators group to achieve different quota sizes.

Perhaps I am not doing something right with my groups? Is this not how it should work?

Also, the feature in the bridge re: "post-groups" is described like it uses the user ranks(defined by # of posts) definable by the phpBB admin, but when this is selected, it imports the User Groups, and only the first character of the group name.

Thanks for the quick fix, btw.

Zane
Title: Re: Admin rights not bridging phpBB to CPG
Post by: jcocking on November 27, 2005, 02:00:26 AM
My phpbb admins now have CPG admin rights.  We still have the outstanding issue of the second person ever to register for the phpbb forum having admin rights.  This will need to be fixed, as this is a fairly large security hole.

jeff
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 27, 2005, 02:28:04 AM
I still think that's an issue with your forum, not a general problem. If you find this code in phpbb2018.inc.php

$this->admingroups = array(2);

and change it to

$this->admingroups = array();

Then it should fix your issue.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: XSTence on November 29, 2005, 01:10:53 AM
Just wanted yo let everyone know I also experienced problems with admin user rights being gone after bridging with PHP V2.0.18 (we run an integration between Subdreamer Pro CMS - PHP and Coppermine on www.organportal.com )

The ~inc file posted here as attachment solved the problem.

-Rick
Title: Re: Admin rights not bridging phpBB to CPG
Post by: bigyellowav on November 29, 2005, 06:40:45 AM
I'm also seeing the first letter only problem with the SMF bridge as well, did you come up with a fix for the problem?

Quote from: tripslip38 on November 26, 2005, 09:55:24 AM
Also, as an experiment I enabled "post-based groups" in CPG in an attempt to fix the situation. It imported my groups with only the first character of the group name,  ie Test Group became "T".

There's really no way CPG that I see to make a phpBB user group or post based group a true CPG admin, that gets the actual CPG admin menu upon authentication.

Title: Re: Admin rights not bridging phpBB to CPG
Post by: bigyellowav on November 29, 2005, 06:56:37 AM
Never mind, I found the fix in another post, sorry!
Title: Re: Admin rights not bridging phpBB to CPG
Post by: tripslip38 on November 30, 2005, 03:09:26 AM
BigYellow, what was the fix? Can you link it. I wasn't sure if Nibbler's suggestion above was a response to that or not.
Title: Re: Admin rights not bridging phpBB to CPG
Post by: Nibbler on November 30, 2005, 03:35:52 AM
http://forum.coppermine-gallery.net/index.php?topic=24201.msg111341#msg111341
Title: Re: Admin rights not bridging phpBB to CPG
Post by: subtlecoolness on December 01, 2005, 10:28:00 PM
I had the same problem: a user with admin privileges in phpbb did not have admin privileges in coppermine. Because of users being deleted in the past, there was no user in phpbb with user_id=2; and I don't use groups at all.

The new bridge file attached earlier in the thread seems to have fixed my problem.