예제 #1
0
 def get_userid(self):
     """ Get current user id. By default it uses
     ``pyramid.security.authenticated_userid``"""
     uri = tldata.get(USER_KEY, _not_set)
     if uri is _not_set:
         self.set_userid(authenticated_userid(get_current_request()))
         return tldata.get(USER_KEY)
     return uri
예제 #2
0
 def get_userid(self):
     """ Get current user id. By default it uses
     ``pyramid.security.authenticated_userid``"""
     uri = tldata.get(USER_KEY, _not_set)
     if uri is _not_set:
         self.set_userid(authenticated_userid(get_current_request()))
         return tldata.get(USER_KEY)
     return uri
예제 #3
0
 def get_userid(self):
     uid = tldata.get(USER_KEY, _not_set)
     if uid is _not_set:
         try:
             self.set_userid(authenticated_userid(get_current_request()))
         except:  # pragma: no cover
             self.set_userid(None)
         return tldata.get(USER_KEY)
     return uid
예제 #4
0
 def get_effective_userid(self):
     """ Return effective user uri, of current user uri. """
     uri = tldata.get(EFFECTIVE_USER_KEY, _not_set)
     if uri is _not_set:
         return self.get_userid()
     return uri
예제 #5
0
 def get_effective_userid(self):
     """ Return effective user uri, of current user uri. """
     uri = tldata.get(EFFECTIVE_USER_KEY, _not_set)
     if uri is _not_set:
         return self.get_userid()
     return uri
예제 #6
0
 def get_effective_userid(self):
     uri = tldata.get(EFFECTIVE_USER_KEY, _not_set)
     if uri is _not_set:
         return self.get_userid()
     return uri
예제 #7
0
 def get_userid(self):
     uri = tldata.get(USER_KEY, _not_set)
     if uri is _not_set:
         self.set_userid(authenticated_userid(get_current_request()))
         return tldata.get(USER_KEY)
     return uri