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

Fixes #5025 Added support for pwdPolicyChecker/pwdCheckModule

parent 2210c980
......@@ -23,7 +23,7 @@ class ppolicy extends simplePlugin
{
var $mainTab = TRUE;
var $objectclasses = array('device', 'pwdPolicy');
var $objectclasses = array('device', 'pwdPolicy', 'pwdPolicyChecker');
/* Return plugin informations for acl handling */
public static function plInfo()
......@@ -100,13 +100,16 @@ class ppolicy extends simplePlugin
'pwdSafeModify', FALSE,
FALSE // default
),
//~ new SelectAttribute(
//~ _('Check quality'), _('Decides what to do if the function in "Check module" is not available'),
//~ 'pwdCheckQuality', FALSE,
//~ array(0, 1, 2), 0,
//~ array(_('Disabled'), _('Ignore errors'), _('Reject on errors'))
//~ ),
new HiddenAttribute('pwdCheckQuality', FALSE, 0),
new SelectAttribute(
_('Check quality'), _('Decides what to do if the function in "Check module" is not available'),
'pwdCheckQuality', FALSE,
array(0, 1, 2), 0,
array(_('Disabled'), _('Ignore errors'), _('Reject on errors'))
),
new StringAttribute (
_('Check module'), _('Name of a user supplied password quality check module that will be called to perform password quality checks and is only relevant if pwdCheckQuality is either 1 or 2'),
'pwdCheckModule', FALSE
),
)
),
'lockout' => array(
......@@ -176,6 +179,15 @@ class ppolicy extends simplePlugin
)
)
);
$this->attributesAccess['pwdCheckQuality']->attributes[0]->setManagedAttributes(
array (
'disable' => array (
0 => array (
'pwdCheckModule'
)
)
)
);
if (objects::count('ppolicy') == 0) {
$this->attributesAccess['cn']->setDefaultValue($config->get_cfg_value('ppolicyDefaultCn', 'default'));
......
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