nickw444 / flask-ldap3-login

LDAP3 Logins for Flask/Flask-Login
http://flask-ldap3-login.readthedocs.org/en/latest/
MIT License
73 stars 38 forks source link

cast to bool for working version #123

Closed lindesbs closed 2 months ago

lindesbs commented 3 months ago

https://github.com/nickw444/flask-ldap3-login/blob/e9fb8072041dc6ddde7d6dbd5c5d162cbfbcfcc5/flask_ldap3_login/__init__.py#L377

current_app.config.get("LDAP_SEARCH_FOR_GROUPS") return string

    if bool(current_app.config.get("LDAP_SEARCH_FOR_GROUPS")):
                response.user_groups = self.get_user_groups(
                    dn=bind_user, _connection=connection
                )
nickw444 commented 2 months ago

This seems like a configuration issue, rather than a library implementation issue - LDAP_SEARCH_FOR_GROUPS should be provided a bool type value from flask config when config is defined.

image