def getListDict(user):
machines = [m for m in Machine.select()
if validation.haveAccess(user, m)]
- #if user == 'moo':
- # machines = Machine.select()
- #else:
- # machines = Machine.query().join('users').filter_by(user=user).all()
checkpoint.checkpoint('Got my machines')
on = {}
has_vnc = {}
def getUser():
"""Return the current user based on the SSL environment variables"""
- if 'SSL_CLIENT_S_DN_Email' in os.environ:
- username = os.environ['SSL_CLIENT_S_DN_Email'].split("@")[0]
- return username
- else:
- return 'moo'
+ username = os.environ['SSL_CLIENT_S_DN_Email'].split("@")[0]
+ return username
def main(operation, user, fields):
start_time = time.time()