From 4e343041d4537233f4e0b4ef9d38f98a895d6c0a Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 14 Jul 2020 11:44:18 +0200 Subject: [PATCH] Implement missing feature --- src/helpers/virtual_directory_helper.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/helpers/virtual_directory_helper.rs b/src/helpers/virtual_directory_helper.rs index 7d00576..370010d 100644 --- a/src/helpers/virtual_directory_helper.rs +++ b/src/helpers/virtual_directory_helper.rs @@ -4,6 +4,7 @@ use crate::data::error::ResultBoxError; use crate::data::group_id::GroupID; +use crate::data::user::UserID; use crate::helpers::{account_helper, groups_helper}; use crate::utils::virtual_directories_utils::check_virtual_directory; @@ -20,8 +21,10 @@ pub fn check_availability(dir: &str, target_id: u64, target_type: VirtualDirType match target_type { VirtualDirType::USER => { - // TODO : implement this check - unimplemented!(); + Ok( + account_helper::check_user_directory_availability(dir, Some(UserID::new(target_id)))? && + groups_helper::check_directory_availability(dir, None)? + ) } VirtualDirType::GROUP => { Ok(