Ignore:
Timestamp:
Aug 6, 2008, 1:07:22 AM (16 years ago)
Author:
price
Message:

add and respect 'adminable' column to machines

This is for selectively, temporarily, manually enabling admin mode
for a VM. Where it's not set, admin mode now bypasses quotas and does
nothing else.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/validation.py

    r867 r874  
    126126def haveAccess(user, state, machine):
    127127    """Return whether a user has administrative access to a machine"""
    128     return state.isadmin or user in cache_acls.accessList(machine)
     128    return (user in cache_acls.accessList(machine)
     129            or (machine.adminable and state.isadmin))
    129130
    130131def owns(user, machine):
Note: See TracChangeset for help on using the changeset viewer.