From: Eric Price Date: Mon, 8 Oct 2007 06:26:16 +0000 (-0400) Subject: More stuff. X-Git-Tag: sipb-xen-www/1~86 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/62582dea7be3b64db3e327a69a317b6777bce91d More stuff. svn path=/trunk/web/; revision=135 --- diff --git a/templates/info.tmpl b/templates/info.tmpl index aa81dbe..9f014f2 100644 --- a/templates/info.tmpl +++ b/templates/info.tmpl @@ -16,7 +16,7 @@ Info on $machine.name

Commands:

-
+ @@ -59,7 +59,7 @@ Info on $machine.name (To edit ram and disk size, turn off the machine first.) #end if

- +
diff --git a/templates/main.py b/templates/main.py index 36518d6..9493de4 100755 --- a/templates/main.py +++ b/templates/main.py @@ -41,7 +41,9 @@ def maxDisk(user, machine=None): return 10.0 def haveAccess(user, machine): - return True + if user.username == 'quentin': + return True + return machine.owner == user.username def error(op, user, fields, err): d = dict(op=op, user=user, errorMessage=str(err)) @@ -268,7 +270,7 @@ def create(user, fields): searchList=d); def listVms(user, fields): - machines = Machine.select() + machines = [m for m in Machine.select() if haveAccess(user, m)] on = {} has_vnc = {} uptimes = getUptimes(machines)
Owner: