Use Email header from SSOWat

This commit is contained in:
HugoPoi 2019-08-29 22:52:48 +02:00
parent 765989f499
commit 7e54d9f28c

View file

@ -14,7 +14,7 @@ diff -Naur a/seahub/seahub/auth/middleware.py b/seahub/seahub/auth/middleware.py
" before the RemoteUserMiddleware class.") " before the RemoteUserMiddleware class.")
try: try:
- username = request.META[self.header] - username = request.META[self.header]
+ username = request.META["HTTP_REMOTE_USER"] + '@' + request.META["HTTP_HOST"] + username = request.META["HTTP_EMAIL"]
except KeyError: except KeyError:
# If specified header doesn't exist then return (leaving # If specified header doesn't exist then return (leaving
# request.user set to AnonymousUser by the # request.user set to AnonymousUser by the