Ignore:
Timestamp:
04/13/05 13:24:15 (20 years ago)
Author:
Kris Deugau
Message:

/branches/acl

Basic ACL support - load ACL data from db, do or don't display
"Add Master" link, do or don't display "Admin tools" link.
Added tabledef for users/ACLs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/acl/cgi-bin/main.cgi

    r214 r221  
    2222openlog "IPDB","pid","local2";
    2323
     24# Present HTTP AUTH headers, as well as opening content-type.
     25#print 'WWW-Authenticate: Basic realm="ViaNet IP Database"\n';
    2426# Collect the username from HTTP auth.  If undefined, we're in a test environment.
    2527my $authuser;
     
    171173print qq(<div align=right style="position: absolute; right: 30px;">).
    172174        qq(<a href="/ip/cgi-bin/admin.cgi">Admin tools</a></div><br>\n)
    173         if $authuser =~ /kdeugau|jodyh|jipp/;
     175        if $IPDBacl{$authuser} =~ /A/;
    174176
    175177# We print the footer here, so we don't have to do it elsewhere.
     
    448450  }
    449451  print "</table>\n";
    450   print qq(<a href="/ip/addmaster.shtml">Add new master block</a><br><br>\n);
     452  if ($IPDBacl{$authuser} =~ /a/) {
     453    print qq(<a href="/ip/addmaster.shtml">Add new master block</a><br><br>\n);
     454  }
    451455  print "Note:  Free blocks noted here include both routed and unrouted blocks.\n";
    452456
Note: See TracChangeset for help on using the changeset viewer.