Browse Source

[FIX] return 'None' if no user name is found in the request hearder

pull/34/head
Laurent Mignon (aka lmi) 11 years ago
parent
commit
8c7115e2d3
  1. 1
      auth_from_http_remote_user/controllers/main.py

1
auth_from_http_remote_user/controllers/main.py

@ -55,6 +55,7 @@ class Home(main.Home):
if not login:
_logger.error("Required fields '%s' not found in http headers\n %s",
self._REMOTE_USER_ATTRIBUTE, headers)
return None
user_ids = res_users.search(cr, SUPERUSER_ID, [('login', '=', login),
('active', '=', True)])
assert len(user_ids) < 2

Loading…
Cancel
Save