delete finance perm check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user