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.
In reply to Persistent login session with restricted access by kgish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |