kgish has asked for the wisdom of the Perl Monks concerning the following question:
I want to make my website available to all visitors, but restrict its use via logins. By default there would be a login link available at the top of each page.
The user clicks this link in order to login (the first time), and if successful will be known for the rest of the session via a given username and a "~logged-in" variable. This sessions will timeout after 30 minutes idle time.
If the user wishes he can enable automatic login through the use of cookies which is the usual checkbox he can check during the login form.
In addition to being able to access the whole site, the logged-in users will also be able to enter user-specific pages for entering data, e.g. hours of a timesheet.
Other visitors can view these same timesheets, but if not logged in as the owner can only have read-only access, e.g. I can disable or hide certain buttons and make all input text fields readonly.
The logged-in person can logout at anytime, after which he must login again to make changes.
Also, I should have admin access to edit the usernames, passwords, emails etc. And of course, the individual users should be able to change their own settings here.
Is there an example cgi script which accomplishes this, e.g. using CGI::Session or whatever?
Thanks in advance for the time and attention.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Persistent login session with restricted access
by Anneq (Vicar) on Oct 10, 2004 at 14:06 UTC | |
by dragonchild (Archbishop) on Oct 10, 2004 at 21:58 UTC | |
by Anneq (Vicar) on Oct 11, 2004 at 03:11 UTC | |
by kgish (Acolyte) on Oct 11, 2004 at 20:03 UTC | |
|
Re: Persistent login session with restricted access
by Jaap (Curate) on Oct 09, 2004 at 21:36 UTC | |
by kgish (Acolyte) on Oct 10, 2004 at 12:48 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |