Allow changing protected user password when acting as root

This commit is contained in:
Lance Edgar 2021-01-02 18:49:20 -06:00
parent 9c026c1dd9
commit 483a47ed43

View file

@ -177,7 +177,7 @@ class AuthenticationView(View):
if not self.request.user: if not self.request.user:
return self.redirect(self.request.route_url('home')) return self.redirect(self.request.route_url('home'))
if self.user_is_protected(self.request.user): if self.user_is_protected(self.request.user) and not self.request.is_root:
self.request.session.flash("Cannot change password for user: {}".format(self.request.user)) self.request.session.flash("Cannot change password for user: {}".format(self.request.user))
return self.redirect(self.request.get_referrer()) return self.redirect(self.request.get_referrer())