authz.cells, to stay in sync with r2590.
(Again, this isn't really a cherry-pick, but whatever)
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2717
return [name]
return []
try:
- return getafsgroups.getAfsGroupMembers(name, config.authz.cells[0].cell)
+ return getafsgroups.getAfsGroupMembers(name, config.authz.afs.cells[0].cell)
except getafsgroups.AfsProcessError:
return []
def getAfsGroupMembers(group, cell):
encrypt = True
- for c in config.authz.cells:
+ for c in config.authz.afs.cells:
if c.cell == cell and hasattr(c, 'auth'):
encrypt = c.auth
if encrypt:
def __getattr__(self, name):
if name in ("admin", "overlord"):
- if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.cells[0].cell):
+ if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.afs.cells[0].cell):
raise InvalidInput('username', cherrypy.request.login,
'Not in admin group %s.' % config.adminacl)
cherrypy.request.state = State(cherrypy.request.login, isadmin=True)
return admin
admin = 'system:' + admin
try:
- if user in getafsgroups.getAfsGroupMembers(admin, config.authz.cells[0].cell):
+ if user in getafsgroups.getAfsGroupMembers(admin, config.authz.afs.cells[0].cell):
return admin
except getafsgroups.AfsProcessError, e:
errmsg = str(e)
#!/bin/sh
cells () {
- for i in $(invirt-getconf -l authz.cells); do
- invirt-getconf authz.cells.$i.cell
+ for i in $(invirt-getconf -l authz.afs.cells); do
+ invirt-getconf authz.afs.cells.$i.cell
done
}
kinit -k -t /etc/invirt/keytab daemon/$(hostname -f)