aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2023-06-27 23:09:20 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2023-06-27 23:09:20 +0200
commitf661ec7bb44210ab3ac918b3a6d76ec7e659f375 (patch)
tree324d158c58d9eb0a042fdd05b7c4df02730fd0d5
parentchg: [flake8] Adresses some flake8 warnings. (diff)
downloadnewspipe-f661ec7bb44210ab3ac918b3a6d76ec7e659f375.tar.gz
newspipe-f661ec7bb44210ab3ac918b3a6d76ec7e659f375.tar.bz2
newspipe-f661ec7bb44210ab3ac918b3a6d76ec7e659f375.zip
fix: undefined name app
-rw-r--r--newspipe/controllers/user.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/newspipe/controllers/user.py b/newspipe/controllers/user.py
index 2aaded64..00ffb96a 100644
--- a/newspipe/controllers/user.py
+++ b/newspipe/controllers/user.py
@@ -7,6 +7,7 @@ from werkzeug.security import check_password_hash
from werkzeug.security import generate_password_hash
from .abstract import AbstractController
+from newspipe.bootstrap import application
from newspipe.models import User
# from ldap3.core.exceptions import LDAPPasswordIsMandatoryError
@@ -150,7 +151,7 @@ class LdapuserController:
def ldap_login(self, username, password):
# print(f"DEBUG: Trying user {username} with pw '{password}'")
- this_uri = self.get_next_ldap_server(app)
+ this_uri = self.get_next_ldap_server(application.config)
# Perform the ldap interactions
user = self.authenticated_user(
server_uri=this_uri, user_dn=username, password=password
bgstack15