News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Invision Board 1.2 login from Coppermine

Started by lmtuxinc, September 22, 2003, 03:27:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jack

So it looks like the standard groups 'Anonymous', 'Registered', 'Administrator' are being misassigned rather than wrogn permissions being applied to those groups?

I'll give that whole section an overhaul tonight & try to fix it all :)
Please do not contact me for support directly - instead: post on this board!

Zerg

So, as I`m gathering this, "Anonymous" and "Registered" members are just messed and group permission are supposed to look approximately like this:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.hot.ee%2Fsotsirh%2Fgroups.jpg&hash=a23853ba7d2c95d439a60c5aec8c1cbd4512087d)

 :?:

Zerg

Quote from: "jack"So it looks like the standard groups 'Anonymous', 'Registered', 'Administrator' are being misassigned rather than wrogn permissions being applied to those groups?

I'll give that whole section an overhaul tonight & try to fix it all :)

Okidoki, waiting passionately for your fix! 8)

Zarsky

SotSirh,

Please do not cross-post...it makes it difficult to keep track of the flow of questions and answers.
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

Zerg

Quote from: "zarsky99"SotSirh,

Please do not cross-post...it makes it difficult to keep track of the flow of questions and answers.
Okay, sorry.

jack

I've had a look, and this actually looks more like a configuration problem than anything else. It is something we could sort out - in future versions (i.e. when the BBS integration ceaces to be 'experimental') with an installer script .
Nasically, the default group configuration for Coppermine doesn't quite match that for IVB (which probably won't match phpbb, yabbse ettc. etc.)

Background
Groups (at a basic level for both forums and coppermine) are stored in the database one record describing each group.
Each record, at a minimum, has a unique identifier (usually a number) for the group, an editable 'friendly' name for the group, and (usually) some extra data such as group permissions etc.

Users are similarly stored in a database, one user per record.
Each user would, again, have a unique identifier, an editable name, and the identifier of the group the user is a member of.

The system can deal with, say, my account via it's identifier, and easily look up what group I am a member of and what I can and cannot 'do'.

The Problem
There is no universal standard for stating what group should have what identifier.
Coppermine ships with a number of pre-defined groups as follows :-

ID    Group
--    -----
 1    Administrators
 2    Registered
 3    Anonymous
 4    Banned


IVB Ships with the following default groups defined :-
ID    Group
--    -----
 1    Validating
 2    Guests
 3    Members
 4    Admin
 5    Banned


When you first run Coppermine, it has no way of knowing that these are incorrect. When you are logged into IVF, your admin account had a group id of 4 associated with it .. this is carried over into Coppermine .. however, Coppermine's default 4 group is the 'Banned' Group. (Admin rights are, thankfully, handled slightly differently)

The Solution

This is quite simple, and should be dealt with as part of the configuration procedure..
* After configuring the bridge, log into IVF as an admin user, then goto the coppermine system.
*Click on the 'Groups' button on the admin menu. (This will trigger a synchronisation of the group names
* Configure the access rights you want your default user groups to have.
* Click on the Apply Modifications button.

In the Future
(I will probably put this as part of my to-do list for the version after 1.2..)
Selection of the board integration will be part of the coppermine installation scripts, as part of this, it will prompt you for your board details and populate the coppermine groups and configuration database tables accordingly.
Please do not contact me for support directly - instead: post on this board!

Zerg

Thanks a lot for detailed explanation, jack!

dale

Yes Jack thanks for the explination but the solution does not work as it should.

After set-up, the administrators group is actually the first banned group, and the Registered group is actually the Anonymous group. All you have to do is swop the group names after setup and you can set their preferences accordingly.

After doing this my gallery is now functioning perfectly.
Im not a complete idiot... Some parts are missing.

jack

Quote from: "dale"After set-up, the administrators group is actually the first banned group, and the Registered group is actually the Anonymous group. All you have to do is swop the group names after setup and you can set their preferences accordingly.

It should set them automatically when you click on the 'Groups' button (but not until you have clicked on it), as one of the first things that does is call the group name synchronisation function which reads the group names from the Invision database - it does not modify any permissions.

Sotsirh & Dale :
AFAIK, the version of the Invision bridge I have heara is basically identical to that released in 1.1.1 - Devel. Where did your copy come from?

If possible, can you get into your database (via phpMyAdmin, command-line, whatever) and run the following two queries please (replace the 'inv_' and 'cpg11d_' with whatever the prefixes are in your database) :-

select g_id, g_title from inv_groups where g_id < 6;

select group_id, group_name from cpg11d_usergroups where group_id < 6;



Also, what version of Invision are you using (I think  you said 1.1, but I can't find the post) and was it a fresh install (of invision) or an upgrade from a previous version?

Thanks.
Please do not contact me for support directly - instead: post on this board!

dale

I installed a fresh ibf 1.2 final, and got the cpg 1.1.1 dev from this website.

I ran the SQL querys with no change. In Coppermine the admin is still #4banned and the members are still #3 Visitors.

Here is what I got back from phpMyAdmin:
SQL-query: SELECT group_id, group_name FROM cpg11d_usergroups WHERE group_id < 6 LIMIT 0, 30;

group_id            
group_name            

1 Admin
2 Members
3 Visitors
4 banned
5 Banned


edit:
In looking at the ibf groups section of my SQL I can see that the list looks like this:
SQL-query: SELECT  *  FROM  `ibf_groups`  LIMIT 0, 30;

g_id - g_tittle
4 - Admin
2 - Guests
3 - Members
1 - Validating
5 - Banned


I noticed that the order of the tittles is the same but the ID #s are not sequenced the same.
Im not a complete idiot... Some parts are missing.

jack

Odd .. is this before ever clicking on the 'Groups' button?

Are your Invision and Coppermine tables in the same database?

Can you put your board into debug mode, and see if you get any errors when you click on 'groups', please?
Please do not contact me for support directly - instead: post on this board!

dale

after clicking on groups

Yes they are in the same database, and my Invision board is now in debug mode. I dont see any problems arising.

I installed my IBF, set it up a bit and then installed cpg 1.1.1d. I followed the directions and thought it was quite clear when it stated the step about going to the groups section to syncronize them. But I guess it didnt happen correctly or I missed a step. Do you think my setup is acting different from others?
Im not a complete idiot... Some parts are missing.

DARKLORD

Does the bridge file work ?

Last time it didn't work because of the redirect thing.. Dont know if someone has fixed that?

 :roll:

xarumanx

THe Bridge itself works but redirecting is still unsolved. I may have a look at this issue next week, i already got some ideas to get this thing finally working

<?php echo signature(); ?>
?>


DARKLORD

request:

delete the coppermine cookies and use for the gallery the invision cookies

:D

Carmine

Since theres really no way to fix the redirect, after loggin in can I still get admin access to coppermine? I've tried using the admin.php right after it brings me back to my forums board page, but it doesn't recongnize me as an admin and I'm still logged out.

Joachim Müller


Mina

For redirection to anything you want, you can try this:


<form action="{$ibforums->base_url}act=Login&amp;CODE=01&amp;return=http://url.to.gallery.com/gallery/" method="post" name='LOGIN' onsubmit='return ValidateForm()'>


You should make a new form on coppermine, a general login screen. Use the URL above for Logging in, but replace "{$ibforums->base_url}" with "http://yoursite.com/index.php?". The "&amp;return=http://url.to.gallery.com/gallery/" at the end of that URL and that should redirect you to any URL you give it once you actually click on submit when the data is sent. Sometimes the cookies might not pick up since this avoids the redirection screen and goes directly to your page after you hit submit. You can always create your own static redirect page that will force the browser to forward to the page and pick up the cookie then.

This is all done in Coppermine, not Invision. The URL should be enough to make the login AND the redirect, I haven't used it on Coppermine yet myself, but it worked for other things I did try it on.

If I took a wild guess, you would put that new form code plus the input fields in an area of Coppermine that would pick up when you are NOT logged in, and make it invisible after you ARE logged in. Also for logging out, the URL should work the same when you add "&amp;return=http://url.to.gallery.com/gallery/", in fact I believe this is all global for InvisionBoard 1.2, not sure, like I said I haven't used it on Coppermine yet, I am at work typing this theory as I did get it to work on something else.

DARKLORD

i have my coppermine gallery in a <iframe> integrated in my invision board. so i think the redirect doesn't work here. i will give it a try..

why is it not possible to have a autologin? delete the coppermine cookiesystem. Coppermine should "look" for IBF cookies..  :roll:  :roll:

effacer

Quote from: "DARKLORD"request:

delete the coppermine cookies and use for the gallery the invision cookies

:D

can this be done actually ?