<?xml version="1.0" encoding="utf-8"?>

<creole>

    <files>
        <file filelist="workstation-manager" name="/etc/salt/master.d/workstation-manager.conf"/>
        <file filelist="workstation-manager" name="/usr/share/eole/saltstack/pillar/eole-workstation.sls" rm='True' />
        <file filelist="workstation-manager" name="/usr/share/eole/saltstack/pillar/ad.sls" rm='True' />
        <file filelist="workstation-manager" name="/usr/share/eole/saltstack/pillar/pam-mount.sls" rm='True' />

        <!-- Extract periodically Veyon AuthorizedUsergroups from LDAP -->
        <file filelist="workstation-manager" name="/etc/salt/master.d/ldap.conf" source="master-ldap.conf" />
        <file filelist="workstation-manager" name="/etc/salt/master.d/schedule-veyon.conf" />
        <file filelist="workstation-manager" name="/usr/share/eole/saltstack/schedule-tasks/veyon-extract-ldap-authorized-user-groups.sls" mkdir="True" rm='True' />

        <service servicelist="workstation-manager">eole-workstation-manager</service>

        <service_access service='eole-workstation-manager'>
            <port>4505</port>
            <port>4506</port>
        </service_access>

    </files>

    <variables>
        <family name="services">
            <variable name="activer_workstation_manager" type="oui/non" description="Activer le service de gestion des postes clients">
                <value>oui</value>
            </variable>
        </family>

        <family name="Workstation" icon='desktop'>
            <variable name="eole_workstation_enable_veyon" type="oui/non" description="Activer l’installation et la configuration de Veyon" mode="expert">
                <value>oui</value>
            </variable>

            <variable name="eole_workstation_veyon_authorized_user_groups" type="string" description="Filtres de groupes d’utilisateurs pouvant visualiser les postes" mode="expert" multi="True">
                <value>cn=Domain Admins</value>
                <value>cn=professeurs*</value>
            </variable>
	    <variable name="veyon_allow_adding_hidden_locations" type="oui/non" description="Pouvoir prendre le contrôle de postes dans la salle et visualiser les postes non listés" mode="expert">
                <value>non</value>
            </variable>
        </family>

        <separators>
        </separators>
    </variables>

    <constraints>
        <condition name='disabled_if_in' source='activer_workstation_manager'>
            <param>non</param>
            <target type='servicelist'>workstation-manager</target>
            <target type='filelist'>workstation-manager</target>
        </condition>
    </constraints>

    <help>
        <variable name="activer_workstation_manager">Le service de gestion des postes clients utilise SaltStack</variable>
        <family name="Workstation">Gestion des postes clients</family>
        <variable name="eole_workstation_enable_veyon">Veyon est un logiciel libre qui permet de surveiller, contrôler et administrer les postes à distance</variable>
        <variable name="eole_workstation_veyon_authorized_user_groups">Les filtres doivent être de la forme "ATTRIBUT"="VALEUR"</variable>
    </help>

</creole>
