Describe the bug
When web auth is required an error occurs when g.user.is_authenticated(). This comes from Flask-Login as the function is now an attribute g.user.is_authenticated
To Reproduce
Steps to reproduce the behavior, e.g.:
Configure GHC with GQ_REQUIRE_WEBAPP_AUTH: True
Go to app
Expect login prompt
Seeing Internal Server Error
Expected Behavior
Expect login prompt
Screenshots or Logfiles
Log shows:
File "/GeoHealthCheck/GeoHealthCheck/app.py", line 112, in before_request
g.user.is_authenticated(), # This is from Flask-Login
TypeError: 'bool' object is not callable
Context (please complete the following information):
Describe the bug When web auth is required an error occurs when
g.user.is_authenticated()
. This comes from Flask-Login as the function is now an attributeg.user.is_authenticated
To Reproduce Steps to reproduce the behavior, e.g.:
GQ_REQUIRE_WEBAPP_AUTH: True
Expected Behavior Expect login prompt
Screenshots or Logfiles Log shows:
Context (please complete the following information):
If running with Docker:
Additional context This was already an error when moving from Py2 to Py3. E.g. in all Jinja2 templates we had to change
g.user.is_authenticated()
tog.user.is_authenticated
as the function was changed to an attribute inFlask-Login
. Was introduced in 0.3.0: https://github.com/maxcountryman/flask-login/blob/master/CHANGES#L30 See also: https://stackoverflow.com/questions/33062109/typeerror-bool-object-is-not-callable-g-user-is-authenticated