fixed: check if user is allowed to create a new list

This commit is contained in:
lars 2005-03-30 19:07:00 +00:00
parent 54676e9ff8
commit db4ee991ef

View file

@ -294,7 +294,7 @@ sub select_list {
print '<div class="info">', $LANGUAGE{'chooselistinfo'}, '</div>'; # explanation of options
print '<div class="add_remove">';
print '<span class="button">', $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), '</span>' if ((&webauth_create_allowed == 0) || (!defined($opt_c)));
print '<span class="button">', $q->submit(-name=>'action', -value=>"[$BUTTON{'create'}]"), '</span>' if (&webauth_create_allowed == 0);
print '<span class="button">', $q->submit(-name=>'action', -value=>"[$BUTTON{'edit'}]"), '</span>' if(defined(@lists));
print '<span class="button">', $q->submit(-name=>'action', -value=>"[$BUTTON{'delete'}]"), '</span>' if(defined(@lists));
print '</div>'; # 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");