Commit 47794f97 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2897 Show hooks output

parent 76f205ac
......@@ -360,6 +360,12 @@ attributetype ( 1.3.6.1.4.1.38414.8.18.4 NAME 'fusionConfigMd5'
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.4.1.38414.8.18.5 NAME 'fdDisplayHookOutput'
DESC 'FusionDirectory - display hook execution output to the user'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
# Plugins
attributetype ( 1.3.6.1.4.1.38414.8.19.1 NAME 'fdOGroupRDN'
......@@ -392,7 +398,7 @@ objectclass ( 1.3.6.1.4.1.38414.8.2.1 NAME 'fusionDirectoryConf'
fdDisplayErrors $ fdLdapMaxQueryTime $ fdLdapStats $ fdDebugLevel $
fdEnableSnapshots $ fdSnapshotBase $ fdSnapshotURI $
fdSnapshotAdminDn $ fdSnapshotAdminPassword $
fdHonourIvbbAttributes $ fdTabHook $ fdShells
fdHonourIvbbAttributes $ fdTabHook $ fdShells $ fdDisplayHookOutput
) )
objectclass ( 1.3.6.1.4.1.38414.8.2.2 NAME 'fusionDirectoryPluginsConf'
......
......@@ -1399,6 +1399,9 @@ class plugin
} elseif (is_array($arr)) {
$str = implode("\n", $arr);
@DEBUG(DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Result: ".$str);
if (!empty($str) && $config->get_cfg_value("displayHookOutput", "FALSE") == "TRUE") {
msg_dialog::display('['.get_class($plugin).' '.strtolower($cmd)."hook] $command", $str, INFO_DIALOG);
}
}
}
}
......
......@@ -289,6 +289,11 @@ class configInLdap extends simplePlugin
array(),
TRUE // edition
),
new BooleanAttribute (
_('Display hook output'),
_('When enabled successful hook execution output is displayed to the user using a dialog.'),
'fdDisplayHookOutput'
),
new SetAttribute(
new StringAttribute (
_('Available shells'), _('Available POSIX shells for FD users.'),
......
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