Ignore:
Timestamp:
May 28, 2012, 10:31:25 AM (13 years ago)
Author:
rick
Message:

Being able to somehow kick users if they are beeing bad.

Related-To: nodefactory:ticket:191

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/usr/local/www/wlportal/index.cgi

    r10827 r11018  
    8585  'tmpl_autologin': '/usr/local/etc/wlportal/autologin.tmpl',
    8686  'tmpl_login'    : '/usr/local/etc/wlportal/login.tmpl',
     87  'warnlist'      : [],
    8788  'whitelist'     : [],
     89  'blacklist'     : [],
    8890  'config_files'  : ['/usr/local/etc/wlportal/config.yaml','/usr/local/etc/wleiden.yaml'],
    8991  'expire_time'   : None,
     
    294296  qs_post = { 'action' : 'login' }
    295297
     298if remote_mac in cfg['warnlist']:
     299  connect['status_msg'] = "U veroorzaakt overlast op het WL netwerk || You are causing WL network abuse"
     300
    296301try:
    297302  fw = PacketFilterControl()
     
    311316  elif qs_post and qs_post.has_key('action'):
    312317    if 'login' in qs_post['action']:
    313       if fw.add(remote_host):
     318      if remote_mac in cfg['blacklist']:
     319        content['status_msg'] = "Toegang ontzegt ipv misbruik WL netwerk || Access denied due to WL network abuse"
     320      elif fw.add(remote_host):
    314321        content['extra_header'] = "Refresh: %(refresh_delay)s; url=%(portal_url)s\r" % content
    315322        content['status_msg'] = "Sucessfully Logged In! || " +\
Note: See TracChangeset for help on using the changeset viewer.