Merge pull request #445 from sartography/fix-login-590
Fix login method so dhf8r isn't always logged in #590
This commit is contained in:
commit
22498d6663
|
@ -25,6 +25,7 @@ CORS_ALLOW_ORIGINS = re.split(r',\s*', environ.get('CORS_ALLOW_ORIGINS', default
|
|||
TESTING = environ.get('TESTING', default="false") == "true"
|
||||
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true")
|
||||
TEST_UID = environ.get('TEST_UID', default="dhf8r")
|
||||
DEFAULT_UID = environ.get('DEFAULT_UID', default="dhf8r")
|
||||
ADMIN_UIDS = re.split(r',\s*', environ.get('ADMIN_UIDS', default="dhf8r,ajl2j,cah3us,cl3wf"))
|
||||
|
||||
# Sentry flag
|
||||
|
|
|
@ -171,6 +171,9 @@ def login(
|
|||
# If we're in production, override any uid with the uid from the SSO request headers
|
||||
if _is_production():
|
||||
uid = _get_request_uid(request)
|
||||
else:
|
||||
if not app.config['TESTING']:
|
||||
uid = app.config['DEFAULT_UID']
|
||||
|
||||
if uid:
|
||||
app.logger.info("SSO_LOGIN: Full URL: " + request.url)
|
||||
|
|
Loading…
Reference in New Issue