Exemple #1
0
 def get_for_user_by_tenant(self, user_id, tenant_id):
     if tenant_id != None:
         token = MEMCACHE_SERVER.get(tenant_id + "::" + user_id)
     else:
         token = MEMCACHE_SERVER.get(user_id)
     if token != None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return token
Exemple #2
0
 def get_for_user_by_tenant(self, user_id, tenant_id):
     if tenant_id is not None:
         token = MEMCACHE_SERVER.get("%s::%s" % (tenant_id, user_id))
     else:
         token = MEMCACHE_SERVER.get("U%s" % user_id)
     if token is not None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return  token
Exemple #3
0
 def get_for_user_by_tenant(self, user_id, tenant_id):
     if tenant_id != None:
         token = MEMCACHE_SERVER.get(tenant_id + "::" + user_id)
     else:
         token = MEMCACHE_SERVER.get(user_id)
     if token != None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return  token
Exemple #4
0
 def get_for_user_by_tenant(self, user_id, tenant_id):
     if tenant_id is not None:
         token = MEMCACHE_SERVER.get("%s::%s" % (tenant_id, user_id))
     else:
         token = MEMCACHE_SERVER.get("U%s" % user_id)
     if token is not None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return token
Exemple #5
0
 def get_for_user(self, user_id):
     token = MEMCACHE_SERVER.get(user_id)
     if token != None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return token
Exemple #6
0
 def get_for_user(self, user_id):
     token = MEMCACHE_SERVER.get("U%s" % user_id)
     if token is not None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return  token
Exemple #7
0
 def get(self, id):
     token = MEMCACHE_SERVER.get(id)
     if token is not None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return token
Exemple #8
0
 def get(self, id):
     token = MEMCACHE_SERVER.get(id)
     if token is not None and not hasattr(token, 'tenant_id'):
         token.tenant_id = None
     return token