From db4ee991ef7765ebd5b92c04a873be61a40fd654 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 30 Mar 2005 19:07:00 +0000 Subject: [PATCH] fixed: check if user is allowed to create a new list --- ezmlm-web/trunk/ezmlm-web.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ezmlm-web/trunk/ezmlm-web.cgi b/ezmlm-web/trunk/ezmlm-web.cgi index aeea6b0..5fda9a8 100755 --- a/ezmlm-web/trunk/ezmlm-web.cgi +++ b/ezmlm-web/trunk/ezmlm-web.cgi @@ -294,7 +294,7 @@ sub select_list { print '
', $LANGUAGE{'chooselistinfo'}, '
'; # explanation of options print '
'; - print '', $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), '' if ((&webauth_create_allowed == 0) || (!defined($opt_c))); + print '', $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), '' if (&webauth_create_allowed == 0); print '', $q->submit(-name=>'action', -value=>"[$BUTTON{'edit'}]"), '' if(defined(@lists)); print '', $q->submit(-name=>'action', -value=>"[$BUTTON{'delete'}]"), '' if(defined(@lists)); print '
'; # end of main_buttons @@ -1062,6 +1062,9 @@ sub webauth { sub webauth_create_allowed { + # Check if we were called with the deprecated argument "-c" (allow to create lists) + return 0 if (defined($opt_c)); + # Check if webusers file exists - if not, then access is granted return 0 if (! -e "$WEBUSERS_FILE");