Skip to content

Commit

Permalink
Add check to prevent admin accounts from signing in
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Mar 22, 2021
1 parent e64f8a9 commit b566910
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webqueue2_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b566910

Please sign in to comment.