Browse Source

optimize condition check

pull/3754/head
matlink 2 years ago
committed by Matlink
parent
commit
a477a6f242
  1. 13
      src/api/core/organizations.rs

13
src/api/core/organizations.rs

@ -356,12 +356,13 @@ async fn get_org_collections_details(org_id: &str, headers: ManagerHeadersLoose,
})
.collect();
// if current user is in any collection-assigned group or in a group having access to all collections
if group_users.contains(&user_org.uuid) || all_access_group_uuids.contains(&user_org.uuid) {
assigned = true;
}
if user_org.access_all {
// if current user is in any collection-assigned group
// or in a group having access to all collections
// or itself has access to all collections
if group_users.contains(&user_org.uuid)
|| all_access_group_uuids.contains(&user_org.uuid)
|| user_org.access_all
{
assigned = true;
}

Loading…
Cancel
Save