mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-07 13:04:57 +00:00
don't infer manage permission for groups (#5190)
the web-vault v2024.6.2 currently cannot deal with manage permission so instead of relying on the org user type this should just default to false
This commit is contained in:
parent
adb21d5c1a
commit
ff33534c07
2 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
use super::{User, UserOrgType, UserOrganization};
|
||||
use super::{User, UserOrganization};
|
||||
use crate::api::EmptyResult;
|
||||
use crate::db::DbConn;
|
||||
use crate::error::MapResult;
|
||||
|
@ -73,7 +73,7 @@ impl Group {
|
|||
})
|
||||
}
|
||||
|
||||
pub async fn to_json_details(&self, user_org_type: &i32, conn: &mut DbConn) -> Value {
|
||||
pub async fn to_json_details(&self, conn: &mut DbConn) -> Value {
|
||||
let collections_groups: Vec<Value> = CollectionGroup::find_by_group(&self.uuid, conn)
|
||||
.await
|
||||
.iter()
|
||||
|
@ -82,7 +82,7 @@ impl Group {
|
|||
"id": entry.collections_uuid,
|
||||
"readOnly": entry.read_only,
|
||||
"hidePasswords": entry.hide_passwords,
|
||||
"manage": *user_org_type >= UserOrgType::Admin || (*user_org_type == UserOrgType::Manager && !entry.read_only && !entry.hide_passwords)
|
||||
"manage": false
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue