Skip to content

Commit

Permalink
Check the groups of the user (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawadidone committed Feb 20, 2024
1 parent 6f2ba3c commit 2ceeb13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion timesketch/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def login():
if email:
user = User.get_or_create(username=email, name=email)
group = Group.get_or_create(name="GOOGLE-IAP")
user.groups.append(group)
if group not in user.groups:
user.groups.append(group)

db_session.commit()
login_user(user)

Expand Down

0 comments on commit 2ceeb13

Please sign in to comment.