Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: automatic group assignment based on encoded URL  (Read 5630 times)

0 Members and 1 Guest are viewing this topic.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
automatic group assignment based on encoded URL
« on: September 15, 2004, 04:07:32 am »

I searched to see if this feature had been discussed but what others had in mind was different from what I would like.

With online photo sites like ofoto, when someone emails an invitation to view a photo album, we click on an encoded URL that grants us permission to view the private album once we register or log in.

The way things are with CPG, we have to have people register, and then have them wait for us to assign them to the pertinent group with access rights. Is it possible to do something where an encoded link and consequent registration/login will automatically place the user in the appropriate user group? I could take a look into doing it myself if no one else will, if it's possible. Any tips would be great.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: automatic group assignment based on encoded URL
« Reply #1 on: September 15, 2004, 10:07:07 am »

This is similar to a feature that is currently being developed in the devel section: the admin (or a user if he/she "owns" an album) is able to set a password (and optionally an password hint like "what was the name of our maths teacher in 1984?" as an example, if you're running a site that is dedicated to a class re-union). You can then send emails to friends, containing a link to that particular album together with the password, so that user will be able to see the album without being registered, while others will only see the password prompt.
You're welcome to check out the devel code from the cvs to take a look for yourself. If you have something else in mind, you're of course welcome to come up with a hack as well.

The idea with special URLs is not bad, although (since they must be unique and are not meant to be password-protected), there has to be some one-way encoding algorhythm involved, since only base64_encoding a special url will make it rather easy for wannabe-hackers to come up with such a URL by just looking at the coppermine code.

Joachim
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: automatic group assignment based on encoded URL
« Reply #2 on: September 15, 2004, 02:34:41 pm »

I think the password hint is a great idea  :D because I don't like email messages containing passwords in cleartext. And it's even better that people don't have to register for yet another thing. :)

I did check out the CVS but it seems as if I have to download the files individually. Is there a way to download a zipped version with the folder structure intact?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: automatic group assignment based on encoded URL
« Reply #3 on: September 15, 2004, 05:16:33 pm »

You can do it all in one go, using cvs software, such as TortoiseCVS. That is what I use to do.

Find instructions for how to use the anonymous logon by clicking on Project, at the top of the page, then CVS.  Some, including myself at first, find it a bit of a pain to get it going, but once set, you just update all files on your box with one single click.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: automatic group assignment based on encoded URL
« Reply #4 on: September 15, 2004, 07:13:02 pm »

OK, so I downloaded the software, and got as far as entering
Quote
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/coppermine login
into CVSROOT in TortoiseCVS

However, I can't log in. It keeps asking for the password. I leave the field blank and hit Enter, but it persistently asks me for the password.

For the modulename, I tried
devel
/devel
/devel/
devel/

 ???
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: automatic group assignment based on encoded URL
« Reply #5 on: September 15, 2004, 07:27:24 pm »

When I tried the Fetch List... button, I got the following output:
Quote
In C:\DOCUME~1\user\LOCALS~1\Temp\: C:\Program Files\TortoiseCVS\cvs.exe -q -Q co -c
CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/coppermine login

cvs checkout: Empty password used - try 'cvs login' with a real password

cvs [checkout aborted]: authorization failed: server cvs.sourceforge.net rejected access to /cvsroot/coppermine login for user anonymous

Error, CVS operation failed

Tortoise Tip:  Sometimes you get this error if you have the repository folder wrong in the Checkout dialog.  Make sure you have a slash at the start of the folder name, and that the case and path are correct.  Watch out for spurious trailing characters.

Examples are:  "/cvsroot", "/usr/local/cvs-repository", "/cvsroot/cvsgui"
In C:\DOCUME~1\user\LOCALS~1\Temp\: C:\Program Files\TortoiseCVS\cvs.exe -q -Q ls -q /
CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/coppermine login

cvs ls: Empty password used - try 'cvs login' with a real password

cvs [ls aborted]: authorization failed: server cvs.sourceforge.net rejected access to /cvsroot/coppermine login for user anonymous

Error, CVS operation failed

Tortoise Tip:  Sometimes you get this error if you have the repository folder wrong in the Checkout dialog.  Make sure you have a slash at the start of the folder name, and that the case and path are correct.  Watch out for spurious trailing characters.

Examples are:  "/cvsroot", "/usr/local/cvs-repository", "/cvsroot/cvsgui"
Scanning for web log URL on server

Trying http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/viewcvs/viewcvs.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/bin/viewcvs.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/viewcvs.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/cgi-bin/viewcvs/coppermine login/...
Trying http://cvs.sourceforge.net/viewcvs/viewcvs/coppermine login/...
Trying http://cvs.sourceforge.net/bin/viewcvs/coppermine login/...
Trying http://cvs.sourceforge.net/viewcvs/coppermine login/...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/bin/cvsweb.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb.cgi/coppermine login/...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb.pl/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb.pl/coppermine login/...
Trying http://cvs.sourceforge.net/bin/cvsweb.pl/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb.pl/coppermine login/...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb/coppermine login/...
Trying http://cvs.sourceforge.net/bin/cvsweb/coppermine login/...
Trying http://cvs.sourceforge.net/cvsweb/coppermine login/...
Trying http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/viewcvs/viewcvs.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/bin/viewcvs.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/viewcvs.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cgi-bin/viewcvs/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/viewcvs/viewcvs/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/bin/viewcvs/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/viewcvs/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/bin/cvsweb.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb.cgi/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb.pl/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb.pl/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/bin/cvsweb.pl/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb.pl/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cgi-bin/cvsweb/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb/cvsweb/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/bin/cvsweb/coppermine login/?cvsroot=cvsroot/coppermine login...
Trying http://cvs.sourceforge.net/cvsweb/coppermine login/?cvsroot=cvsroot/coppermine login...
Logged

Nibbler

  • Guest
Re: automatic group assignment based on encoded URL
« Reply #6 on: September 15, 2004, 08:01:32 pm »

This worked for me  :)
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: automatic group assignment based on encoded URL
« Reply #7 on: September 15, 2004, 08:16:47 pm »

Thanks, Nibbler.  :) It turned out the problem was with the word login. However, that's what I copied from
http://sourceforge.net/cvs/?group_id=89658

Did I misunderstand the instructions there?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: automatic group assignment based on encoded URL
« Reply #8 on: September 15, 2004, 10:29:10 pm »

You are correct, and this is quite possibly why I struggled at first.

@Gaugau, can we remove the word 'login' from the address on the cvs page.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: automatic group assignment based on encoded URL
« Reply #9 on: September 16, 2004, 12:06:12 am »

no, the page http://sourceforge.net/cvs/?group_id=89658 is being maintained by sf.net (it's the same page for all projects hosted on sf.net, with just the project name being replaced on the page). Sorry.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.