def __init__(self, params=None, legacy_manager=None, delegate=None): super(ApiLabelsRestrictedCallRouter, self).__init__(params=params) self.params = params = params or self.__class__.params_type() self.labels_whitelist = set(params.labels_whitelist) # "GRR" is a system label. Labels returned by the client during the # interrogate have owner="GRR". self.labels_owners_whitelist = set(params.labels_owners_whitelist or ["GRR"]) if not legacy_manager: legacy_manager = user_managers.FullAccessControlManager() self.legacy_manager = legacy_manager if not delegate: delegate = api_call_router_without_checks.ApiCallRouterWithoutChecks() self.delegate = delegate
def _GetFullAccessControlManager(self): cls = ApiCallRouterWithApprovalChecks if cls.full_access_control_manager is None: cls.full_access_control_manager = user_managers.FullAccessControlManager( ) return cls.full_access_control_manager
def setUp(self): super(FullAccessControlManagerTest, self).setUp() self.access_manager = user_managers.FullAccessControlManager()
def __init__(self): super(LegacyChecker, self).__init__() self.legacy_manager = user_managers.FullAccessControlManager()