[zh2311] Remove auth (#2427)

* remove auth

* Remove all auth code

zh2311

* lint

* remove auth from e2e tests conf
This commit is contained in:
Ben MR
2021-09-17 18:47:52 +00:00
committed by GitHub
parent a239d8636d
commit 69e159916e
27 changed files with 28 additions and 509 deletions
+13
View File
@@ -0,0 +1,13 @@
from uuid import uuid4
from flask.sessions import SessionMixin
CXGUID = "cxguid"
def get_user_id(session: SessionMixin) -> str:
""" Gets a session-persistent user id. Creates one in the Flask session if non-extant """
if CXGUID not in session:
session[CXGUID] = uuid4().hex
session.permanent = True
return session[CXGUID]