Skip to content

Commit

Permalink
fix: invitation password set (openreplay#1795)
Browse files Browse the repository at this point in the history
(cherry picked from commit f52d5f0)
  • Loading branch information
philippevezina authored and tahayk committed Dec 21, 2023
1 parent 7284818 commit 2cbcdbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions api/chalicelib/core/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ def change_password(tenant_id, user_id, email, old_password, new_password):


def set_password_invitation(user_id, new_password):
changes = {"password": new_password,
"invitationToken": None, "invitedAt": None,
"changePwdExpireAt": None, "changePwdToken": None}
changes = {"password": new_password}
user = update(tenant_id=-1, user_id=user_id, changes=changes)
r = authenticate(user['email'], new_password)

Expand Down
4 changes: 1 addition & 3 deletions ee/api/chalicelib/core/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,7 @@ def change_password(tenant_id, user_id, email, old_password, new_password):


def set_password_invitation(tenant_id, user_id, new_password):
changes = {"password": new_password,
"invitationToken": None, "invitedAt": None,
"changePwdExpireAt": None, "changePwdToken": None}
changes = {"password": new_password}
user = update(tenant_id=tenant_id, user_id=user_id, changes=changes)
r = authenticate(user['email'], new_password)

Expand Down

0 comments on commit 2cbcdbb

Please sign in to comment.