def __init__(self, req): self.req = req self.__cache = AuthenticationCache.instance() self.__auth = Authentication() self.parse_user_and_pw() self.options = req.get_options() self._environment_key = None self._user = None
def __init__(self): self.__cache = UserCache.instance() self.__authcache = AuthenticationCache.instance() self.USER_STATUS_LABELS = { User.STATUS_INACTIVE: 'inactive', User.STATUS_ACTIVE: 'active', User.STATUS_BANNED: 'banned', User.STATUS_DISABLED: 'disabled' } # Provide also opposite mapping: {'inactive':User.STATUS_INACTIVE} self.USER_STATUS_KEYS = dict((v, k) for k, v in self.USER_STATUS_LABELS.items())
def setUp(self): self.cache = AuthenticationCache.instance()