Verified Commit 173a0bdb authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: (CORE) - hide required attributes listed in audit backend

hide the value of attrs listed in audit backend.
parent 89c39085
No related merge requests found
Showing with 7 additions and 8 deletions
+7 -8
......@@ -1455,7 +1455,7 @@ class simplePlugin implements SimpleTab
$auditAttributesValuesToBeHidden = $this->getAuditAttributesListFromConf();
if (!empty($auditAttributesValuesToBeHidden)) {
foreach($auditAttributesValuesToBeHidden as $key) {
foreach ($auditAttributesValuesToBeHidden as $key) {
if (key_exists($key, $this->attrs)) {
$this->attrs[$key] = 'Value not stored by policy';
}
......@@ -1481,20 +1481,19 @@ class simplePlugin implements SimpleTab
* Note: This method is required because setAttribute can contain one value STRING or multiple ARRAY but,
* selectAttribute only accepts arrays. Its usage is to get audit attributes listed in backend, allowing to hide values from set attributes.
*/
protected
function getAuditAttributesListFromConf (): array
protected function getAuditAttributesListFromConf (): array
{
global $config;
$result = [];
// If audit plugin is installed only.
if (class_available('auditEvent')) {
if (!empty($config->current['FDAUDITCONFHIDDENATTRVALUES'])) {
if (is_string($config->current['FDAUDITCONFHIDDENATTRVALUES'])) {
$result[] = $config->current['FDAUDITCONFHIDDENATTRVALUES'];
if (class_available('auditConfig')) {
if (!empty($config->current['AUDITCONFHIDDENATTRVALUES'])) {
if (is_string($config->current['AUDITCONFHIDDENATTRVALUES'])) {
$result[] = $config->current['AUDITCONFHIDDENATTRVALUES'];
} else {
$result = $config->current['FDAUDITCONFHIDDENATTRVALUES'];
$result = $config->current['AUDITCONFHIDDENATTRVALUES'];
}
}
}
......
Supports Markdown
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