[FIX]Refixed the issue of oe_sessions_effectiveusername storage in temp, used geteuid which returns effective user id.

bzr revid: msh@openerp.com-20130530090814-6uf0hs5j0223w985
This commit is contained in:
Mohammed Shekha 2013-05-30 14:38:14 +05:30
commit 22ba680c7e
1 changed files with 7 additions and 3 deletions

View File

@ -487,6 +487,10 @@ class DisableCacheMiddleware(object):
return self.app(environ, start_wrapped)
def session_path():
try:
import pwd
username = pwd.getpwuid(os.geteuid()).pw_name
except ImportError:
try:
username = getpass.getuser()
except Exception: