PDA

View Full Version : Dynamic Password-Protected Content?



ktkeith
11-22-2009, 10:55 AM
I would like to create a password-protected subdirectory that would allow access to different content for different users, without multiple password entries.

For instance, there would be a link from the (non-password-protected) main page to the protected directory; when the link is clicked, it should open the password-entry dialog and then do the following:


UserOne does not have a password - tries an invalid password, gets an error message (with perhaps a short timeout after a certain number of wrong tries).

UserTwo forgot their password - gets directed to a password recovery page (with a safety question for ID verification).

UserThree has a password - is recognized and gets passed through to a protected directory that contains some basic content like files, announcements, a chatroom, useful links, etc.

UserFour has a password - is recognized and gets passed through to the protected directory with the files, chatroom, etc., and also sees a link to another protected directory that is accessible only to UserFour, but without a second password.

UserFive has a password - is recognized and gets passed through to the protected directory with the files, chatroom, etc., and also sees a link to another protected directory that is different from UserFour's and is accessible only by UserFive, but without a second password.

In other words, the password system would recognize each user individually and would not only grant access to the protected directory, but add a link to a protected subdirectory - the link would be specific to each individual user, visible only to them, and provide access to a sub-directory accessible only by them, all of this working off the first password entry.

Is this doable without vastly complicated scripting?

Thanks.

farcaster
11-22-2009, 12:25 PM
Are you using an open source CMS system of some sort, or is this a "homebrew" site that you have written?

ktkeith
11-22-2009, 02:31 PM
It's a homebrew.

I have a regular domain name attached to a directory under /public_html. It has a few simple HTML pages in it that I cobbled together using my utterly lame coding skillz and a text editor.

I want to create another sub-directory under that domain name, linked off the domain homepage, and do the password protection stuff in it.

I know I can password-protect the entire sub-directory. I also know I can create further sub-sub-directories under it and password-protect each of them - but that would require a separate link off the main protected page for each new sub-sub-page, and require the users to enter a second password to access their personal material. That's too clunky.

I wanted a smoother solution, but as you've guessed, I'm not up to coding it myself, or managing anything complex.