Changeset 2558


Ignore:
Timestamp:
Nov 22, 2009, 9:02:31 PM (15 years ago)
Author:
broder
Message:

"Cherry-pick" r2557 (Re-arrange the authz configuration.) to the
cherrypy branch.

(It's somewhat tenuous to claim this is a cherry-pick, given that all
of the changes would have conflicted had I actually tried to
cherry-pick the change. Oh well)

Location:
package_branches/invirt-web/cherrypy
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/cache_acls.py

    r2226 r2558  
    4040        return []
    4141    try:
    42         return getafsgroups.getAfsGroupMembers(name, config.authz[0].cell)
     42        return getafsgroups.getAfsGroupMembers(name, config.authz.cells[0].cell)
    4343    except getafsgroups.AfsProcessError:
    4444        return []
  • package_branches/invirt-web/cherrypy/code/getafsgroups.py

    r2425 r2558  
    3131def getAfsGroupMembers(group, cell):
    3232    encrypt = True
    33     for c in config.authz:
    34         if c.type == 'afs' and c.cell == cell and hasattr(c, 'auth'):
     33    for c in config.authz.cells:
     34        if c.cell == cell and hasattr(c, 'auth'):
    3535            encrypt = c.auth
    3636    if encrypt:
  • package_branches/invirt-web/cherrypy/code/main.py

    r2534 r2558  
    9292    def __getattr__(self, name):
    9393        if name in ("admin", "overlord"):
    94             if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz[0].cell):
     94            if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.cells[0].cell):
    9595                raise InvalidInput('username', cherrypy.request.login,
    9696                                   'Not in admin group %s.' % config.adminacl)
  • package_branches/invirt-web/cherrypy/code/validation.py

    r2515 r2558  
    223223        admin = 'system:' + admin
    224224    try:
    225         if user in getafsgroups.getAfsGroupMembers(admin, config.authz[0].cell):
     225        if user in getafsgroups.getAfsGroupMembers(admin, config.authz.cells[0].cell):
    226226            return admin
    227227    except getafsgroups.AfsProcessError, e:
  • package_branches/invirt-web/cherrypy/invirt-cache-acls

    r1949 r2558  
    11#!/bin/sh
    22cells () {
    3   for i in $(invirt-getconf -l authz); do
    4     if [ afs = "$(invirt-getconf authz.$i.type)" ]; then
    5       invirt-getconf authz.$i.cell
    6     fi
     3  for i in $(invirt-getconf -l authz.cells); do
     4    invirt-getconf authz.cells.$i.cell
    75  done
    86}
Note: See TracChangeset for help on using the changeset viewer.