Verified Commit 18ea0a06 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(supannCMS) Add support for sources in config screen

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