mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bugfix/superuser-password-edit' into 'dev'
Fix bug where su cannot edit general user password See merge request crafty-controller/crafty-4!676
This commit is contained in:
commit
a2fefcf23f
@ -8,6 +8,7 @@
|
||||
### Bug fixes
|
||||
- Remove webhook `custom` option from webook provider list as it's not currently an option ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/664))
|
||||
- Bump cryptography for CVE-2023-49083 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/680))
|
||||
- Fix bug where su cannot edit general user password ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/676))
|
||||
### Tweaks
|
||||
- Homogenize Panel logos/branding ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/666))
|
||||
- Retain previous tab when revisiting server details page (#272)([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/667))
|
||||
|
@ -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