From cf90a369e27f4cac310f3b7615757b0f9c717074 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 5 Mar 2021 08:36:18 +0100 Subject: [PATCH] cleanup: rename token_user into auth_id_filter --- src/api2/access/acl.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/api2/access/acl.rs b/src/api2/access/acl.rs index be9ad380..a78aabcd 100644 --- a/src/api2/access/acl.rs +++ b/src/api2/access/acl.rs @@ -15,19 +15,19 @@ fn extract_acl_node_data( path: &str, list: &mut Vec, exact: bool, - token_user: &Option, + auth_id_filter: &Option, ) { // tokens can't have tokens, so we can early return - if let Some(token_user) = token_user { - if token_user.is_token() { + if let Some(auth_id_filter) = auth_id_filter { + if auth_id_filter.is_token() { return; } } for (user, roles) in &node.users { - if let Some(token_user) = token_user { + if let Some(auth_id_filter) = auth_id_filter { if !user.is_token() - || user.user() != token_user.user() { + || user.user() != auth_id_filter.user() { continue; } } @@ -43,7 +43,7 @@ fn extract_acl_node_data( } } for (group, roles) in &node.groups { - if token_user.is_some() { + if auth_id_filter.is_some() { continue; } @@ -62,7 +62,7 @@ fn extract_acl_node_data( } for (comp, child) in &node.children { let new_path = format!("{}/{}", path, comp); - extract_acl_node_data(child, &new_path, list, exact, token_user); + extract_acl_node_data(child, &new_path, list, exact, auth_id_filter); } }