From: Greg Brockman Date: Thu, 26 Aug 2010 05:05:00 +0000 (-0400) Subject: Use expandOwner/expandAdmin rather than removed expandLocker X-Git-Tag: 0.1.8^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/refs/heads/gdb-git?hp=bf5b0dc42fae3342d51a6c74c8a61c94189c7bcb Use expandOwner/expandAdmin rather than removed expandLocker --- diff --git a/code/validation.py b/code/validation.py index 9b7a0b0..29cb310 100755 --- a/code/validation.py +++ b/code/validation.py @@ -5,6 +5,7 @@ import getafsgroups 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 @@ -129,7 +130,7 @@ def haveAccess(user, state, machine): 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""" @@ -244,7 +245,7 @@ def testOwner(user, owner, machine=None): 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: diff --git a/debian/changelog b/debian/changelog index c8efb75..e416f92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ invirt-web (0.1.8) lucid; urgency=low + [ Andrew M. Farrell ] * Rename code/ to /var/www/invirt-web/ in binary-fixup - -- Andrew M. Farrell Thu, 26 Aug 2010 01:48:04 -0400 + [ Greg Brockman ] + * Use expandOwner/expandAdmin rather than removed expandLocker + + -- Greg Brockman Thu, 26 Aug 2010 02:24:57 -0400 invirt-web (0.1.7) unstable; urgency=low