From 6a1b576bbef500c399489d20f3c75fa5e2f5d952 Mon Sep 17 00:00:00 2001 From: Patrick Mayr Date: Wed, 25 Oct 2023 19:34:50 +0000 Subject: [PATCH] delete finance perm check --- fet2020/authentications/authentications.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/fet2020/authentications/authentications.py b/fet2020/authentications/authentications.py index 031576db..f511436c 100644 --- a/fet2020/authentications/authentications.py +++ b/fet2020/authentications/authentications.py @@ -19,8 +19,6 @@ def authentication(username, password): server = Server(host, port=port) userdn = f"uid={username},ou=user,dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at" - finance_perm = None - firstname = "" surname = "" mail = "" @@ -44,17 +42,6 @@ def authentication(username, password): surname = c.response[0]["attributes"]["sn"][0] mail = c.response[0]["attributes"]["mail"][0] - # check if member has finance permission - c.search( - search_base="CN=finance,OU=Groups,dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at", - search_filter="(objectClass=posixGroup)", - search_scope="SUBTREE", - attributes=["memberUid"], - ) - - if username in c.response[0]["attributes"]["memberUid"]: - finance_perm = True - except LDAPBindError as e: logger.info(f"LDAP Bind error from username '{username}'. Error: {e}") return None