Changeset 135 for trunk


Ignore:
Timestamp:
Oct 8, 2007, 2:26:16 AM (17 years ago)
Author:
ecprice
Message:

More stuff.

Location:
trunk/web/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/info.tmpl

    r133 r135  
    1717
    1818<p>Commands:</p>
    19 <form action="command">
     19<form action="command" action="POST">
    2020  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
    2121  <table>
     
    6060#end if
    6161</p>
    62 <form action="modify">
     62<form action="modify" method="POST">
    6363  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
    6464  <table>
  • trunk/web/templates/main.py

    r134 r135  
    4242
    4343def haveAccess(user, machine):
    44     return True
     44    if user.username == 'quentin':
     45        return True
     46    return machine.owner == user.username
    4547
    4648def error(op, user, fields, err):
     
    269271
    270272def listVms(user, fields):
    271     machines = Machine.select()
     273    machines = [m for m in Machine.select() if haveAccess(user, m)]   
    272274    on = {}
    273275    has_vnc = {}
Note: See TracChangeset for help on using the changeset viewer.