import re
import string
import dns.resolver
+from invirt import authz
from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall, Owner
from invirt.config import structs as config
from invirt.common import InvalidInput, CodeError
def owns(user, machine):
"""Return whether a user owns a machine"""
- return user in expandLocker(machine.owner)
+ return user in authz.expandOwner(machine.owner)
def validMachineName(name):
"""Check that name is valid for a machine name"""
if '@' in owner:
raise InvalidInput('owner', owner, "No cross-realm Hesiod lockers allowed")
try:
- if user not in cache_acls.expandLocker(owner):
+ if user not in authz.expandOwner(owner):
raise InvalidInput('owner', owner, 'You do not have access to the '
+ owner + ' locker')
except getafsgroups.AfsProcessError, e:
invirt-web (0.1.8) lucid; urgency=low
+ [ Andrew M. Farrell ]
* Rename code/ to /var/www/invirt-web/ in binary-fixup
- -- Andrew M. Farrell <afarrell@mit.edu> Thu, 26 Aug 2010 01:48:04 -0400
+ [ Greg Brockman ]
+ * Use expandOwner/expandAdmin rather than removed expandLocker
+
+ -- Greg Brockman <gdb@mit.edu> Thu, 26 Aug 2010 02:24:57 -0400
invirt-web (0.1.7) unstable; urgency=low