From deddcf10f95fcce20703c9579c213db68f423636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1ek?= Date: Fri, 27 Oct 2023 14:27:47 +0200 Subject: [PATCH] revert user validation changes (#642) to fix password reset CPCN-434 --- newsroom/users/users.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newsroom/users/users.py b/newsroom/users/users.py index 09987e844..00ba906c6 100644 --- a/newsroom/users/users.py +++ b/newsroom/users/users.py @@ -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/"]: + return + if is_current_user_company_admin(): manager = get_user() if doc.get("company") and doc["company"] == manager.get("company"):