From 7b47e553526bffc9c8b5def9f40f37431d7e961f Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Mon, 14 Mar 2022 17:59:02 +0100 Subject: [PATCH] Fix: Do not mix several configuration styles --- modules/core/docs/authproc_attributealter.md | 8 ++++---- modules/core/lib/Auth/Process/AttributeAlter.php | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/core/docs/authproc_attributealter.md b/modules/core/docs/authproc_attributealter.md index a3c2e0cbe..53fe5744a 100644 --- a/modules/core/docs/authproc_attributealter.md +++ b/modules/core/docs/authproc_attributealter.md @@ -39,10 +39,10 @@ Parameters If no other values exist, the attribute will be removed completely. This parameter is OPTIONAL. -`merge` -: A boolean indicating whether the altered values must be merged with the - target attribute values, or if the target attribute should be overwritten. - Defaults to `false`. +`%merge` +: Indicates whether the altered values must be merged with the target attribute values. The default + behaviour is to overwrite the target attribute completely. + This parameter is OPTIONAL. Examples -------- diff --git a/modules/core/lib/Auth/Process/AttributeAlter.php b/modules/core/lib/Auth/Process/AttributeAlter.php index b4ce883a0..6b851d7a0 100644 --- a/modules/core/lib/Auth/Process/AttributeAlter.php +++ b/modules/core/lib/Auth/Process/AttributeAlter.php @@ -79,6 +79,8 @@ class AttributeAlter extends Auth\ProcessingFilter $this->replace = true; } elseif ($value === '%remove') { $this->remove = true; + } elseif ($value === '%merge') { + $this->merge = true; } else { throw new Error\Exception('Unknown flag : ' . var_export($value, true)); } @@ -95,9 +97,6 @@ class AttributeAlter extends Auth\ProcessingFilter } elseif ($name === 'target') { // Set target $this->target = $value; - } elseif ($name === 'merge') { - // Set the merging strategy - $this->merge = $value; } } } -- GitLab