- if getafsgroups.checkAfsGroup(user, admin, 'athena.mit.edu'):
- return admin
- #XXX Should we require that user is in cache_acls.expandName(admin)?
+ try:
+ if user in getafsgroups.getAfsGroupMembers(admin, 'athena.mit.edu'):
+ return admin
+ except getafsgroups.AfsProcessError, e:
+ errmsg = str(e)
+ if errmsg.startswith("pts: User or group doesn't exist"):
+ errmsg = 'The group "%s" does not exist.' % admin
+ raise InvalidInput('administrator', admin, errmsg)
+ #XXX Should we require that user is in the admin group?