Changeset 254 for trunk/web


Ignore:
Timestamp:
Dec 29, 2007, 3:09:59 AM (17 years ago)
Author:
andersk
Message:

Remove backdoor.

Location:
trunk/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/main.py

    r252 r254  
    186186    machines = [m for m in Machine.select()
    187187                if validation.haveAccess(user, m)]
    188     #if user == 'moo':
    189     #    machines = Machine.select()
    190     #else:
    191     #    machines = Machine.query().join('users').filter_by(user=user).all()
    192188    checkpoint.checkpoint('Got my machines')
    193189    on = {}
     
    584580def getUser():
    585581    """Return the current user based on the SSL environment variables"""
    586     if 'SSL_CLIENT_S_DN_Email' in os.environ:
    587         username = os.environ['SSL_CLIENT_S_DN_Email'].split("@")[0]
    588         return username
    589     else:
    590         return 'moo'
     582    username = os.environ['SSL_CLIENT_S_DN_Email'].split("@")[0]
     583    return username
    591584
    592585def main(operation, user, fields):   
  • trunk/web/validation.py

    r253 r254  
    7272def haveAccess(user, machine):
    7373    """Return whether a user has administrative access to a machine"""
    74     if user == 'moo':
    75         return True
    7674    if user in (machine.administrator, machine.owner):
    7775        return True
     
    8583def owns(user, machine):
    8684    """Return whether a user owns a machine"""
    87     if user == 'moo':
    88         return True
    8985    return not getafsgroups.notLockerOwner(user, machine.owner)
    9086
Note: See TracChangeset for help on using the changeset viewer.