Changeset 135
- Timestamp:
- Oct 8, 2007, 2:26:16 AM (17 years ago)
- Location:
- trunk/web/templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/templates/info.tmpl
r133 r135 17 17 18 18 <p>Commands:</p> 19 <form action="command" >19 <form action="command" action="POST"> 20 20 <input type="hidden" name="machine_id" value="$machine.machine_id"/> 21 21 <table> … … 60 60 #end if 61 61 </p> 62 <form action="modify" >62 <form action="modify" method="POST"> 63 63 <input type="hidden" name="machine_id" value="$machine.machine_id"/> 64 64 <table> -
trunk/web/templates/main.py
r134 r135 42 42 43 43 def haveAccess(user, machine): 44 return True 44 if user.username == 'quentin': 45 return True 46 return machine.owner == user.username 45 47 46 48 def error(op, user, fields, err): … … 269 271 270 272 def listVms(user, fields): 271 machines = Machine.select()273 machines = [m for m in Machine.select() if haveAccess(user, m)] 272 274 on = {} 273 275 has_vnc = {}
Note: See TracChangeset
for help on using the changeset viewer.