Skip to content

Commit

Permalink
Continue if we fail to get userinfo.
Browse files Browse the repository at this point in the history
  • Loading branch information
krihal committed Sep 4, 2023
1 parent 41a4bcb commit 1c9e6d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cnaas_nac/api/internal/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ def post(self):
nas_ports = NasPort.get(username)
userinfo = UserInfo.get([username])

if userinfo == {}:
continue

if "access_restricted" in userinfo[username]:
if userinfo[username]["access_restricted"]:
logger.info(f"[{username}] Time based access, rejecting")
Expand Down

0 comments on commit 1c9e6d9

Please sign in to comment.