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(); .collect();
// if current user is in any collection-assigned group or in a group having access to all collections // if current user is in any collection-assigned group
if group_users.contains(&user_org.uuid) || all_access_group_uuids.contains(&user_org.uuid) { // or in a group having access to all collections
assigned = true; // or itself has access to all collections
} if group_users.contains(&user_org.uuid)
|| all_access_group_uuids.contains(&user_org.uuid)
if user_org.access_all { || user_org.access_all
{
assigned = true; assigned = true;
} }

Loading…
Cancel
Save