- if getafsgroups.checkAfsGroup(user, admin, 'athena.mit.edu'):
- return admin
- if getafsgroups.checkAfsGroup(user, 'system:'+admin,
- 'athena.mit.edu'):
- return 'system:'+admin
+ if ':' not in admin:
+ if cache_acls.isUser(admin):
+ return admin
+ admin = 'system:' + admin
+ try:
+ if user in getafsgroups.getAfsGroupMembers(admin, 'athena.mit.edu'):
+ return admin
+ except getafsgroups.AfsProcessError, e:
+ raise InvalidInput('administrator', admin, str(e))
+ #XXX Should we require that user is in the admin group?