From b5669106c5f75aa2ffff7c75d84573086673bd3a Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 22 Mar 2021 16:56:01 -0400 Subject: [PATCH] Add check to prevent admin accounts from signing in --- webqueue2_api/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webqueue2_api/api.py b/webqueue2_api/api.py index 4bdb0be..7fcefa4 100644 --- a/webqueue2_api/api.py +++ b/webqueue2_api/api.py @@ -65,6 +65,10 @@ def user_is_valid(username: str, password: str) -> bool: if (username == "" or password == ""): return False + # Check for adm account + if username.endswith("adm"): + return False; + # Initialize EasyAD config = { "AD_SERVER": "boilerad.purdue.edu",