Commit 5b1eedef authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(5135) Fix problems with management config saving

Fix schema error, PHP error, and ACL setup.

issue #5135
Showing with 9 additions and 4 deletions
+9 -4
......@@ -576,7 +576,7 @@ objectclass ( 1.3.6.1.4.1.38414.8.2.1 NAME 'fusionDirectoryConf'
fdDisplayErrors $ fdLdapMaxQueryTime $ fdLdapStats $ fdDebugLevel $
fdEnableSnapshots $ fdSnapshotBase $
fdTabHook $ fdShells $ fdDefaultShell $ fdDisplayHookOutput $
fdPluginsMenuBlacklist $
fdPluginsMenuBlacklist $ fdManagementConfig $
fdAclTabOnObjects $ fdDepartmentCategories $
fdSslCaCertPath $ fdSslKeyPath $ fdSslCertPath $
fdCasActivated $ fdCasServerCaCertPath $ fdCasHost $ fdCasPort $ fdCasContext $
......
......@@ -527,7 +527,7 @@ class config
*/
public function updateManagementConfig($managementClass, $managementConfig)
{
$managementConfig = json_encode($managementConfig, JSON_THROW_ON_ERROR);
$managementConfig = json_encode($managementConfig);
$changes = array();
if (isset($this->current['MANAGEMENTCONFIG'][$managementClass])) {
/* If there already was a config for this class, remove it */
......@@ -549,7 +549,7 @@ class config
);
$ldap = $this->get_ldap_link();
$ldap->cd(CONFIGRDN.$this->current['BASE']);
if (!$ldap->modify_batch($modifs)) {
if (!$ldap->modify_batch($changes)) {
return array($ldap->get_error());
}
}
......
......@@ -85,7 +85,9 @@ class ManagementConfigurationDialog extends simplePlugin
),
new BooleanAttribute(
_('Persitent'), _('Should this configuration be saved in the LDAP as the default configuration for this management page'),
'saveInLdap', FALSE
'saveInLdap', FALSE,
FALSE,
'fdManagementConfig'
),
)
),
......@@ -135,8 +137,11 @@ class ManagementConfigurationDialog extends simplePlugin
function execute ()
{
global $config, $ui;
$smarty = get_smarty();
$smarty->assign('ManagementConfigurationACL', 'rw');
$smarty->assign('fdManagementConfigACL', $ui->get_permissions(CONFIGRDN.$config->current['BASE'], 'configuration/configInLdap', 'fdManagementConfig', $this->readOnly()));
$str = parent::execute();
$str .= '<p class="plugbottom">'.
......
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