mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 14:33:49 +01:00
LSldapObject : fix regression introduced by commit 274ccad0
Handle all attributes in validateAttrsData() method but don't blame on missing required attribute on non-create form and if attibute is not present in form (or freezed).
This commit is contained in:
parent
1dec2cc4f6
commit
98ffc081c9
1 changed files with 4 additions and 2 deletions
|
@ -404,8 +404,6 @@ class LSldapObject {
|
||||||
$LSform=false;
|
$LSform=false;
|
||||||
}
|
}
|
||||||
foreach($this -> attrs as $attr_name => $attr) {
|
foreach($this -> attrs as $attr_name => $attr) {
|
||||||
if ($LSform && (!$LSform -> hasElement($attr_name) || $LSform -> isFreeze($attr_name)))
|
|
||||||
continue;
|
|
||||||
$attr_values = $attr -> getValue();
|
$attr_values = $attr -> getValue();
|
||||||
if (!$attr -> isValidate()) {
|
if (!$attr -> isValidate()) {
|
||||||
if($attr -> isUpdate()) {
|
if($attr -> isUpdate()) {
|
||||||
|
@ -427,6 +425,10 @@ class LSldapObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// Don't blame on non-create form for attributes not-present in form (or freezed)
|
||||||
|
if ($LSform && $idFrom != 'create' && (!$LSform -> hasElement($attr_name) || $LSform -> isFreeze($attr_name)))
|
||||||
|
continue;
|
||||||
|
|
||||||
LSerror :: addErrorCode('LSattribute_06',$attr -> getLabel());
|
LSerror :: addErrorCode('LSattribute_06',$attr -> getLabel());
|
||||||
$retval = false;
|
$retval = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue