Skip to content

Commit

Permalink
Add user to IAP group (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawadidone committed Feb 20, 2024
1 parent 3be98d2 commit 7b6a825
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions timesketch/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ def login():
email = decoded_jwt.get("email")
if email:
user = User.get_or_create(username=email, name=email)
group = Group.get_or_create(name="GOOGLE-IAP")
user.groups.append(group)
db_session.commit()
login_user(user)

except (ImportError, NameError, UnboundLocalError):
Expand Down

0 comments on commit 7b6a825

Please sign in to comment.