X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/31a80e557fe527ec94c3a490b4b6bd73a4fd9af5..f79a27b745530799a75d21a66945e9dc8178e772:/main.py diff --git a/main.py b/main.py index e182095..f567c71 100755 --- a/main.py +++ b/main.py @@ -185,10 +185,6 @@ def create(user, fields): 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 = {} @@ -583,11 +579,8 @@ def printHeaders(headers): 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()