health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] [bug #45970] authentication does not work with Flask-Login-


From: Emmanuel Duviviers
Subject: [Health-dev] [bug #45970] authentication does not work with Flask-Login-0.3.0
Date: Tue, 15 Sep 2015 13:28:11 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:40.0) Gecko/20100101 Firefox/40.0

URL:
  <http://savannah.gnu.org/bugs/?45970>

                 Summary: authentication does not work with Flask-Login-0.3.0
                 Project: GNU Health
            Submitted by: emmanueld
            Submitted on: mar. 15 sept. 2015 13:28:10 GMT
                Category: Upgrade
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
                  Module: fhir

    _______________________________________________________

Details:

I followed the set-up process to install a new instance of GNU Health with
fhir server and the demo database on an up to date ubuntu 15.04 machine.
Connecting through Trython works, but the Fhir module shows an error when
calling the login page (which means it is unusable).

>From what I have seen the error appears because Flask-Login-0.3.0 was
installed (it is released recently) and not Flask-Login-0.2.x.
As mentioned (for example) in the following link :
https://github.com/GovLab/noi2/issues/7 and in the documentation
(https://flask-login.readthedocs.org/en/latest/#login-example) the
is_authenticated is no more a function but must be called like a property,
this mean that changing le line ~60 in backend/fhir/server/resources/auth.py
by removing the parenthesis solves the problem, the line becomes :
    if current_user.is_authenticated:

As I'm not a python expert I think it would be a good idea to test Flask-Login
version at run-time to call current_user.is_authenticated if version >= 0.3
else current_user.is_authenticated(), but I did not try this and do not know
if it is possible.

Emmanuel



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mar. 15 sept. 2015 13:28:10 GMT  Name: stack-trace.txt  Size: 2 ko   By:
emmanueld
stack trace shown when running run_server.py in backend/fhir/
<http://savannah.gnu.org/bugs/download.php?file_id=34891>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45970>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]