Implemented 'protect selection page'

SVN revision: 863
This commit is contained in:
Stefan Ritt 2004-04-08 14:21:14 +00:00
parent 4ac52b3471
commit 81bf929388
2 changed files with 12 additions and 1 deletions

View File

@ -198,6 +198,12 @@ be allowed as well (maybe with only a subset of the available logbooks). In that
this options can be used, to show a list of logbooks with guest access.
<p>
<LI><b><code>Protect Selection page = 0 | 1</code></b>
<br>
Normally, one can see the logbook selection page without having to log in. If one
wants to require a login for the selection page, this switch can be set to
<b><code>1</code></b>. Default is <b><code>0</code></b>.<p>
<LI><b><code>SMTP host = &lt;host.domain&gt;</code></b>
<br>
This defines the SMTP host needed to send automatic email notifications. The host

View File

@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
Revision 1.318 2004/04/08 14:21:14 midas
Implemented 'protect selection page'
Revision 1.317 2004/04/06 21:19:59 midas
Fixed problem with multiple quick filters on attributes without option lists
@ -15713,7 +15716,9 @@ void show_selection_page()
return;
/* if selection page protected, check password */
if (getcfg("global", "password file", str))
if (getcfg("global", "password file", str) &&
getcfg("global", "protect selection page", str) &&
atoi(str) == 1)
if (!check_user_password(NULL, getparam("unm"), getparam("upwd"), ""))
return;