Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-26 05:50:29 +01:00
Fix the logic in user edditing
Dieser Commit ist enthalten in:
Ursprung
db111ae2a0
Commit
c58682e3fb
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -476,8 +476,8 @@ fn edit_user(org_id: String, org_user_id: String, data: JsonUpcase<EditUserData>
|
||||||
};
|
};
|
||||||
|
|
||||||
if new_type != user_to_edit.type_ as i32 && (
|
if new_type != user_to_edit.type_ as i32 && (
|
||||||
user_to_edit.type_ >= UserOrgType::Admin as i32 ||
|
user_to_edit.type_ <= UserOrgType::Admin as i32 ||
|
||||||
new_type >= UserOrgType::Admin as i32
|
new_type <= UserOrgType::Admin as i32
|
||||||
) &&
|
) &&
|
||||||
headers.org_user_type != UserOrgType::Owner as i32 {
|
headers.org_user_type != UserOrgType::Owner as i32 {
|
||||||
err!("Only Owners can grant and remove Admin or Owner privileges")
|
err!("Only Owners can grant and remove Admin or Owner privileges")
|
||||||
|
|
Laden …
In neuem Issue referenzieren