Skip to content

Commit

Permalink
revert user validation changes (#642)
Browse files Browse the repository at this point in the history
to fix password reset

CPCN-434
  • Loading branch information
petrjasek authored Oct 27, 2023
1 parent c343d44 commit deddcf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions newsroom/users/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ def check_permissions(self, doc, updates=None):
else [field for field in updates.keys() if updates[field] != doc.get(field) and field != "id"]
)

if request.url_rule and request.url_rule.rule:
if request.url_rule.rule in ["/reset_password/<token>", "/token/<token_type>"]:
return

if is_current_user_company_admin():
manager = get_user()
if doc.get("company") and doc["company"] == manager.get("company"):
Expand Down

0 comments on commit deddcf1

Please sign in to comment.