mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix bug where su cannot edit general user password
This commit is contained in:
parent
8bad0fb0a9
commit
74c0e8b23a
@ -215,7 +215,7 @@ class ApiUsersUserIndexHandler(BaseApiHandler):
|
||||
|
||||
user_obj = HelperUsers.get_user_model(user_id)
|
||||
if "password" in data and str(user["user_id"]) != str(user_id):
|
||||
if str(user["user_id"]) != str(user_obj.manager):
|
||||
if str(user["user_id"]) != str(user_obj.manager) and not user["superuser"]:
|
||||
# TODO: edit your own password
|
||||
return self.finish_json(
|
||||
400, {"status": "error", "error": "INVALID_PASSWORD_MODIFY"}
|
||||
|
Loading…
Reference in New Issue
Block a user