From: Mathieu Baudier Date: Fri, 30 Sep 2022 11:55:36 +0000 (+0200) Subject: Address book visibility X-Git-Tag: v2.3.8~23 X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=commitdiff_plain;h=403bb553503cb85b4fc575b66742d3ebaaaf825c Address book visibility --- diff --git a/org.argeo.app.ui/src/org/argeo/app/ui/people/PeopleEntryArea.java b/org.argeo.app.ui/src/org/argeo/app/ui/people/PeopleEntryArea.java index 8ef935c..789698b 100644 --- a/org.argeo.app.ui/src/org/argeo/app/ui/people/PeopleEntryArea.java +++ b/org.argeo.app.ui/src/org/argeo/app/ui/people/PeopleEntryArea.java @@ -84,11 +84,14 @@ public class PeopleEntryArea implements SwtUiProvider, CmsUiProvider { List visible = new ArrayList<>(); if (parent != null) { for (HierarchyUnit hu : parent.getDirectHierarchyUnits(true)) { - if (CurrentUser.implies(CmsRole.userAdmin, hu.getBase()) // - ) // IPA - { - visible.add(hu); - } + // if parent was visible, it is visible + // TODO restrict more? + +// if (CurrentUser.implies(CmsRole.userAdmin, hu.getBase()) // +// ) // IPA +// { + visible.add(hu); +// } } } else { for (UserDirectory directory : cmsUserManager.getUserDirectories()) { @@ -96,8 +99,10 @@ public class PeopleEntryArea implements SwtUiProvider, CmsUiProvider { || CurrentUser.implies(CmsRole.userAdmin, IpaUtils.IPA_ACCOUNTS_RDN + "," + directory.getBase())) // IPA { - // we do not show the base level - for (HierarchyUnit hu : directory.getDirectHierarchyUnits(true)) { + // TODO show base level + } + for (HierarchyUnit hu : directory.getDirectHierarchyUnits(true)) { + if (CurrentUser.implies(CmsRole.userAdmin, hu.getBase())) { visible.add(hu); } }