Commit f5dc27cc authored by Côme Chilliet's avatar Côme Chilliet

feat(management) Add support for whitelist in selectManagement

issue #5965
parent 188814d8
......@@ -246,8 +246,21 @@ class managementFilter
return [$entries, $objectTypeCount];
protected function filterEntries(array $ldapEntries): array
protected function filterEntries (array $ldapEntries): array
if (!empty($this->parent->whiteList)) {
foreach ($ldapEntries as $dn => $entry) {
if (in_array($dn, $this->parent->whiteList['dn'])) {
foreach ($this->parent->whiteList['branches'] as $branch) {
if (preg_match('/'.preg_quote($branch, '/').'$/', $dn)) {
continue 2;
  • Review the data-flow - use of uninitialized value. 📘

Please register or sign in to reply
if (isset($this->parent->blackList)) {
foreach ($this->parent->blackList as $attr_name => $attr_values) {
foreach ($attr_values as $match) {
  • SonarQube analysis reported 2 issues

    • 2 major

    Watch the comments in this conversation to review them.

    1 extra issue

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. Review the data-flow - use of uninitialized value. 📘
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment