def __init__(self, acl_list,
               default_router_cls):
    """Initializes the manager by reading the config file."""
    precondition.AssertIterableType(acl_list, APIAuthorization)

    self.routers = []
    self.auth_manager = auth_manager.AuthorizationManager()

    self.default_router = self._CreateRouter(default_router_cls)

    for index, acl in enumerate(acl_list):
      router = self._CreateRouter(acl.router_cls, params=acl.router_params)
      self.routers.append(router)

      router_id = str(index)
      self.auth_manager.DenyAll(router_id)

      for group in acl.groups:
        self.auth_manager.AuthorizeGroup(group, router_id)

      for user in acl.users:
        self.auth_manager.AuthorizeUser(user, router_id)
def __init__ ( self , acl_list , default_router_cls ) : precondition . AssertIterableType ( acl_list , APIAuthorization ) self . routers = [ ] self . auth_manager = auth_manager . AuthorizationManager ( ) self . default_router = self . _CreateRouter ( default_router_cls ) for index , acl in enumerate ( acl_list ) : router = self . _CreateRouter ( acl . router_cls , params = acl . router_params ) self . routers . append ( router ) router_id = str ( index ) self . auth_manager . DenyAll ( router_id ) for group in acl . groups : self . auth_manager . AuthorizeGroup ( group , router_id ) for user in acl . users : self . auth_manager . AuthorizeUser ( user , router_id )
Initializes the manager by reading the config file.