On met aussi les invites dans le firewall de komaz
darcs-hash:20050421103248-d1718-56cce07e3cd8d53eb2791f9f13526bbc4fcb2990.gz
This commit is contained in:
parent
adf6f79c05
commit
0c8afb662b
1 changed files with 4 additions and 3 deletions
|
@ -22,7 +22,7 @@ sys.path.append('/usr/scripts/gestion')
|
|||
|
||||
import syslog
|
||||
from lock import *
|
||||
from ldap_crans import crans_ldap, ann_scol, machine, crans
|
||||
from ldap_crans import crans_ldap, ann_scol, machine, crans, invite
|
||||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
from iptools import AddrInNet
|
||||
|
@ -543,9 +543,10 @@ class firewall_komaz :
|
|||
if AddrInNet(ip,self.zone_serveur) :
|
||||
serveur_maj = True
|
||||
else :
|
||||
# Il faut avoir payé ou être une machine du crans
|
||||
# Il faut avoir payé ou être une machine du crans ou un invite
|
||||
if crans_ldap().search('paiement=ok&ip=%s'% ip)['machine'] or \
|
||||
machine[0].proprietaire().__class__ == crans :
|
||||
machine[0].proprietaire().__class__ == crans or \
|
||||
machine[0].proprietaire().__class__ == invite :
|
||||
mac_ip_maj[ip] = machine[0]
|
||||
else :
|
||||
mac_ip_maj[ip] = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue