feat(supannCMS) Add support for sources in config screen

issue #6015
parent 733cb2f0
......@@ -128,6 +128,14 @@ class supannConfig extends simplePlugin
[],
TRUE
),
new SetAttribute(
new StringAttribute(
_('Card sources'), _('Multi service card possible sources, with format system@domain'),
'fdSupannCMSSources', FALSE,
'', '',
'/^.+@.+$/', 'unicampus@univ.example.com'
)
),
]
],
];
......
......@@ -34,6 +34,12 @@ attributetype ( 1.3.6.1.4.1.38414.17.1.5 NAME 'fdSupannRessourceLabels'
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributetype ( 1.3.6.1.4.1.38414.17.1.6 NAME 'fdSupannCMSSources'
DESC 'FusionDirectory - SupAnn possible values for supannCMSSource'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
# Object Class
objectclass ( 1.3.6.1.4.1.38414.17.2.1 NAME 'fdSupannPluginConf'
DESC 'FusionDirectory SupAnn plugin configuration'
......@@ -41,5 +47,6 @@ objectclass ( 1.3.6.1.4.1.38414.17.2.1 NAME 'fdSupannPluginConf'
MUST ( cn )
MAY (
fdSupannStructuresRDN $ fdSupannPasswordRecovery $
fdSupannRessourceSubStates $ fdSupannRessourceSubStatesLabels $ fdSupannRessourceLabels
fdSupannRessourceSubStates $ fdSupannRessourceSubStatesLabels $ fdSupannRessourceLabels $
fdSupannCMSSources
) )
......@@ -24,6 +24,7 @@ class SupannCMSAffectationAttribute extends SupannCompositeAttribute
{
function __construct ($label, $description, $ldapName, $acl = '')
{
global $config;
list($types, $typeLabels) = supann::get_choices_for('cmstype');
list($formats, $formatLabels) = supann::get_choices_for('cmsformat');
$attributes = [
......@@ -48,7 +49,8 @@ class SupannCMSAffectationAttribute extends SupannCompositeAttribute
),
new SelectAttribute(
_('Source'), _('Card managing system and establishment'),
'supannCMSSource_source', FALSE
'supannCMSSource_source', FALSE,
$config->get_cfg_value('supannCMSSources', [])
),
new GeneralizedTimeDateAttribute(
_('End date'), _('End of validity date, if any'),
......
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