Skip to content

Commit

Permalink
Merge pull request #3 from als-computing/admins_fix2
Browse files Browse the repository at this point in the history
protect against not being in admin group
  • Loading branch information
dylanmcreynolds authored Apr 25, 2024
2 parents 739a16b + 2f919b4 commit a71df82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alshub/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ async def get_staff_beamlines(ac: AsyncClient, orcid: str, email: str) -> List[s
# ALSHub
beamlines = set()
if ADMINS:
beamlines.update(ADMINS[email])
admin = ADMINS.get(email)
if admin:
beamlines.update(ADMINS.get(email))
if response.is_error:
info(f"error asking ALHub for staff roles {orcid}")
return beamlines
Expand Down

0 comments on commit a71df82

Please sign in to comment.