示例#1
0
  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 __init__(self):
     super(LegacyChecker, self).__init__()
     self.legacy_manager = user_managers.FullAccessControlManager()
示例#3
0
 def setUp(self):
     super(FullAccessControlManagerTest, self).setUp()
     self.access_manager = user_managers.FullAccessControlManager()