</table>
<p>Commands:</p>
-<form action="command">
+<form action="command" action="POST">
<input type="hidden" name="machine_id" value="$machine.machine_id"/>
<table>
(To edit ram and disk size, turn off the machine first.)
#end if
</p>
-<form action="modify">
+<form action="modify" method="POST">
<input type="hidden" name="machine_id" value="$machine.machine_id"/>
<table>
<tr><td>Owner:</td><td><input type="text" value="$machine.owner"/></td></tr>
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))
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)