Skip to content

Commit

Permalink
Fix join view when not logged in but URL correct
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Feb 26, 2025
1 parent 0b4afc3 commit 4f08fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion temba/orgs/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ def pre_process(self, request, *args, **kwargs):

# if user exists and is logged in then they just need to accept
user = User.get_by_email(self.invitation.email)
if user and self.invitation.email.lower() == request.user.email.lower():
if user and request.user.is_authenticated and request.user.email.lower() == self.invitation.email.lower():
return HttpResponseRedirect(reverse("orgs.org_join_accept", args=[secret]))

logout(request)
Expand Down

0 comments on commit 4f08fbc

Please sign in to comment.