Exemple #1
0
    def __init__(self, params: ApiCallRouterWithApprovalCheckParams):
        self._params = params

        self._restricted_flow_group_manager = groups.CreateGroupAccessManager()
        for g in params.restricted_flow_groups:
            self._restricted_flow_group_manager.AuthorizeGroup(
                g, self._AUTH_SUBJECT)

        self.acl_cache = utils.AgeBasedCache(max_size=10000,
                                             max_age=self.APPROVAL_CACHE_TIME)
Exemple #2
0
 def __init__(self, group_access_manager=None):
     self.authorized_users = collections.OrderedDict()
     self.group_access_manager = (group_access_manager
                                  or groups.CreateGroupAccessManager())
     self.Initialize()