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

Merge branch '6015-add-support-for-supann-cms-carte-multi-service' into '1.4-dev'

Resolve "Add support for SupAnn CMS (Carte Multi Service)"

See merge request fusiondirectory/fd-plugins!712
parents e9185c7e 067c491f
......@@ -128,6 +128,37 @@ class supannConfig extends simplePlugin
[],
TRUE
),
new OrderedArrayAttribute(
new CharSeparatedCompositeAttribute(
_('Card types and their labels. Please prefix with {ORIGIN} for non standard types.'),
'fdSupannCMSTypes',
[
new StringAttribute(
_('Type'), _('Card type'),
'fdSupannCMSTypes_type', TRUE
),
new StringAttribute(
_('Label'), _('Label shown for this type'),
'fdSupannCMSTypes_label', TRUE
),
],
';',
'',
_('Card types')
),
FALSE,
[
'etudiant;étudiant',
'personnel;professionnelle',
'visiteur;visiteur, anonyme',
'invite;invité, nominative',
'lecteur;lecteur de bibliothèque',
'prestataire;prestataire de services',
'vehicule;véhicule',
'externe;externe',
],
TRUE
),
new SetAttribute(
new StringAttribute(
_('Card sources'), _('Multi service card possible sources, with format system@domain'),
......
# Nomenclature SupAnn
etudiant;étudiant
personnel;professionnelle
visiteur;visiteur, anonyme
invite;invité, nominative
lecteur;lecteur de bibliothèque
prestataire;prestataire de services
vehicule;véhicule
externe;externe
# Ajouter ici les types locaux étiquetés si besoin
# {ORIGINE}type_local;Type de carte défini localement par l'établissement ORIGINE
......@@ -52,6 +52,12 @@ attributetype ( 1.3.6.1.4.1.38414.17.1.8 NAME 'fdSupannCMSFormats'
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributetype ( 1.3.6.1.4.1.38414.17.1.9 NAME 'fdSupannCMSTypes'
DESC 'FusionDirectory - SupAnn possible values for supannCMSType - format type;Label'
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'
......@@ -60,5 +66,5 @@ objectclass ( 1.3.6.1.4.1.38414.17.2.1 NAME 'fdSupannPluginConf'
MAY (
fdSupannStructuresRDN $ fdSupannPasswordRecovery $
fdSupannRessourceSubStates $ fdSupannRessourceSubStatesLabels $ fdSupannRessourceLabels $
fdSupannCMSSources $ fdSupannCMSFormats $ fdSupannCMSAppDomains
fdSupannCMSTypes $ fdSupannCMSSources $ fdSupannCMSFormats $ fdSupannCMSAppDomains
) )
......@@ -25,7 +25,13 @@ class SupannCMSAffectationAttribute extends SupannCompositeAttribute
function __construct ($label, $description, $ldapName, $acl = '')
{
global $config;
list($types, $typeLabels) = supann::get_choices_for('cmstype');
$types = [];
$typeLabels = [];
foreach ($config->get_cfg_value('SupannCMSTypes', []) as $supannCMSType) {
list($type, $label) = explode(';', $supannCMSType);
$types[] = $type;
$typeLabels[] = $label;
}
$formats = [];
$formatLabels = [];
foreach ($config->get_cfg_value('SupannCMSFormats', ['MIFARE:XLSB;Mifare XLSB']) as $supannCMSFormat) {
......
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