Verified Commit 564b5c33 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(systems) Fix deserializing for interfaces

Used by CSV import

issue #6039
parent ea817fb6
......@@ -526,6 +526,21 @@ class interfacesManagement extends management implements SimpleTab
*/
public function deserializeValues (array $values, bool $checkAcl = TRUE)
{
foreach ($values as $name => $value) {
if (isset($this->attributesAccess[$name])) {
if (!$checkAcl || $this->attrIsWriteable($name)) {
$error = $this->attributesAccess[$name]->deserializeValue($value);
if (!empty($error)) {
return $error;
}
} else {
return new FusionDirectoryError(msgPool::permModify($this->dn, $name));
}
} else {
return new FusionDirectoryError(sprintf(_('Unknown field "%s"'), $name));
}
}
return TRUE;
}
public function aclHasPermissions (): bool
......
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