first commit

This commit is contained in:
root 2018-12-18 09:44:39 +01:00
commit fdb11077a0
11723 changed files with 1571766 additions and 0 deletions

26
Makefile Normal file
View File

@ -0,0 +1,26 @@
################################
# Makefile pour cadolesuser
################################
SOURCE=cadolesuser
VERSION=1.0
EOLE_VERSION=2.6
EOLE_RELEASE=2.6.2
PKGAPPS=web
################################
# Début de zone à ne pas éditer
################################
include eole.mk
include apps.mk
################################
# Fin de zone à ne pas éditer
################################
# Makefile rules dedicated to application
# if exists
ifneq (, $(strip $(wildcard $(SOURCE).mk)))
include $(SOURCE).mk
endif

5
README.txt Normal file
View File

@ -0,0 +1,5 @@
dep sur
apt-get install composer
apt-get install php-mbstring
apt-get install eole-envole-themes

64
apps.mk Normal file
View File

@ -0,0 +1,64 @@
#
# NE PAS EDITER CE FICHIER
#
# Voir Makefile
##########################
# Application web envole #
##########################
ifneq (, $(filter oui web, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out X.X, $(strip $(VERSION))))
$(error $$(VERSION) variable has incorrect value '$(VERSION)')
endif
# Where to store web application files
WEB_PATH := $(DESTDIR)/var/www/html
# Envole
sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE)
src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)
src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin
src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang
endif
##########################
# Application EOLE flask #
##########################
ifneq (, $(filter flask, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
endif
ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# Everything is related to mount point
APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
src/$(FLASK_MODULE).conf)
ifeq (, $(strip $(APPS_MOUNT_POINT)))
$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# eole-flask configuration
src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available
# Where to store flask application files
FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
# static files
src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static
src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates
src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources
endif

View File

@ -0,0 +1,5 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE DATABASE cadolesuser DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

177
dicos/25_cadolesuser.xml Normal file
View File

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='cadolesuser' name='/etc/eole/eole-db.d/cadolesuser-db.yml' rm='True' mkdir='True'/>
</files>
<containers>
<container name='web'>
<file filelist='cadolesuser' name='/etc/apache2/sites-available/cadolesuser' source='cadolesuser-apache.conf'/>
<file filelist="cadolesuser" name="/var/www/html/cadolesuser/app/config/parameters.yml" source="cadolesuser-parameters.yml" rm="True"/>
<file filelist="cadolesuser" name="/var/www/html/cadolesuser/app/config/template.yml" source="cadolesuser-template.yml" rm="True"/>
<file filelist="cadolesuser" name="/var/www/html/cadolesuser/scripts/cadolesuser-postservice-00.sh" source="cadolesuser-postservice-00.sh" rm="True" mode="700" />
<file filelist="cadolesuser" name="/var/www/html/cadolesuser/src/Cadoles/CoreBundle/Command/core-init-01.sql" source="cadolesuser-init-01.sql" rm="True"/>
<file filelist='cadolesuser' name='/etc/cron.d/cadolesuser' source='cadolesuser.cron' rm='True'/>
<service method='apache' servicelist='cadolesuser'>cadolesuser</service>
</container>
</containers>
<variables>
<family name='Cadoles User'>
<variable type='oui/non' name='activer_cadolesuser' description='Activer CadolesUser'><value>oui</value></variable>
<variable type='oui/non' name='cadolesuser_syncldap' description="Faire de CadolesUser la source de votre annuaire"><value>oui</value></variable>
<variable type='oui/non' name='cadolesuser_synceportail' description="Synchroniser ePortail"><value>oui</value></variable>
<variable type='string' name='cadolesuser_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_niveau01branche' description="Nom de la branche de Niveau 01 (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_niveau02branche' description="Nom de la branche de Niveau 02 (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_niveau01name' description="Nom de la première orgranisation de Niveau 01 (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_niveau01siren' description="SIREN de la première orgranisation de Niveau 01 (idem valeur Cadoles ldap)" mandatory='True'/>
<variable type='string' name='cadolesuser_niveau01label' description="Label singulier du niveau 01 d'organisation" mandatory='True'><value>Département</value></variable>
<variable type='string' name='cadolesuser_niveau01labels' description="Label pluriel du niveau 01 d'organisation" mandatory='True'><value>Départements</value></variable>
<variable type='string' name='cadolesuser_niveau01icon' description="Icon du niveau 01 d'organisation" mandatory='True'><value>fa-building</value></variable>
<variable type='oui/non' name='cadolesuser_niveau02view' description="Gérer un niveau 02 d'organisation"><value>oui</value></variable>
<variable type='string' name='cadolesuser_niveau02label' description="Label pluriel du niveau 02 d'organisation" mandatory='True'><value>Service</value></variable>
<variable type='string' name='cadolesuser_niveau02labels' description="Label pluriel du niveau 02 d'organisation" mandatory='True'><value>Services</value></variable>
<variable type='string' name='cadolesuser_niveau02icon' description="Icon du niveau 02 d'organisation" mandatory='True'><value>fa-sitemap</value></variable>
<variable type='string' name='cadolesuser_colormain' description="Couleur principale" mandatory='True'><value>428BCA</value></variable>
<variable type='string' name='cadolesuser_fontcolorhover' description="Couleur des polices sur fond de couleur principale" mandatory='True'><value>FFFFFF</value></variable>
<variable type='string' name='cadolesuser_moderegistration' description="Mode de registration : none / byuser / byadmin" mandatory='True'><value>none</value></variable>
<variable type='string' name='cadolesuser_keyterm' description="Taille minimun du password" mandatory='True'><value>8</value></variable>
<variable type='string' name='cadolesuser_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type='string' name='cadolesuser_smtphost' description='Host du serveur SMTP' />
<variable type='string' name='cadolesuser_smtpport' description='Port du serveur SMTP' />
<variable type='string' name='cadolesuser_smtpuser' description='Compte du serveur SMTP' />
<variable type='string' name='cadolesuser_smtppwd' description='Fichier contenant le mot de passe associé du compte SMTP' />
<variable type='string' name='cadolesuser_smtpencryption' description='Type Encryptage du serveur SMTP' />
<variable type='string' name='cadolesuser_smtpauthmode' description='Mode Authentification du serveur SMTP' />
<variable type='string' name='cadolesuser_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
<variable type='string' name='cadolesuser_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
<variable type='number' name='cadolesuser_dbport' description="Port d'écoute du serveur de base de données" mode='expert'/>
<variable type='string' name='cadolesuser_allow_hosts' description="Hôtes autorisés à utiliser la base de données" multi='True' mode='expert'/>
<variable type='string' name='cadolesuser_dbuser' description='Utilisateur du serveur de base de données' mode='expert'/>
<variable type='string' name='cadolesuser_dbpass' description='Fichier de mot de passe du serveur' mode='expert'/>
</family>
<separators>
<separator name="cadolesuser_syncldap">Paramètres associés à l'Annuaire</separator>
<separator name="cadolesuser_niveau01label">Paramètres associés aux look de l'application</separator>
<separator name="cadolesuser_noreply">Paramètres associés aux Mails</separator>
<separator name="cadolesuser_db_mode">Paramètres associés à la Base de Données</separator>
</separators>
</variables>
<constraints>
<condition name='disabled_if_in' source='activer_admin_passfile'>
<param>non</param>
<target type='variable'>activer_cadolesuser</target>
</condition>
<condition name='disabled_if_in' source='activer_eportail'>
<param>non</param>
<target type='variable'>cadolesuser_synceportail</target>
</condition>
<condition name='disabled_if_in' source='activer_cadolesuser'>
<param>non</param>
<target type='variable'>cadolesuser_syncldap</target>
<target type='variable'>cadolesuser_synceportail</target>
<target type='variable'>cadolesuser_pwdadmin</target>
<target type='variable'>cadolesuser_organization</target>
<target type='variable'>cadolesuser_niveau01branche</target>
<target type='variable'>cadolesuser_niveau02branche</target>
<target type='variable'>cadolesuser_niveau01name</target>
<target type='variable'>cadolesuser_niveau01siren</target>
<target type='variable'>cadolesuser_niveau01label</target>
<target type='variable'>cadolesuser_niveau01labels</target>
<target type='variable'>cadolesuser_niveau01icon</target>
<target type='variable'>cadolesuser_niveau02view</target>
<target type='variable'>cadolesuser_niveau02label</target>
<target type='variable'>cadolesuser_niveau02labels</target>
<target type='variable'>cadolesuser_niveau02icon</target>
<target type='variable'>cadolesuser_colormain</target>
<target type='variable'>cadolesuser_fontcolorhover</target>
<target type='variable'>cadolesuser_moderegistration</target>
<target type='variable'>cadolesuser_keyterm</target>
<target type='variable'>cadolesuser_noreply</target>
<target type='variable'>cadolesuser_smtphost</target>
<target type='variable'>cadolesuser_smtpport</target>
<target type='variable'>cadolesuser_smtpuser</target>
<target type='variable'>cadolesuser_smtppwd</target>
<target type='variable'>cadolesuser_smtpencryption</target>
<target type='variable'>cadolesuser_smtpauthmode</target>
<target type='variable'>cadolesuser_db_mode</target>
<target type='variable'>cadolesuser_dbserver</target>
<target type='variable'>cadolesuser_dbport</target>
<target type='variable'>cadolesuser_allow_hosts</target>
<target type='variable'>cadolesuser_dbuser</target>
<target type='variable'>cadolesuser_dbpass</target>
</condition>
<condition name='disabled_if_in' source='cadolesuser_syncldap'>
<param>non</param>
<target type='variable'>cadolesuser_pwdadmin</target>
<target type='variable'>cadolesuser_organization</target>
<target type='variable'>cadolesuser_niveau01branche</target>
<target type='variable'>cadolesuser_niveau02branche</target>
<target type='variable'>cadolesuser_niveau01name</target>
<target type='variable'>cadolesuser_niveau01siren</target>
<target type='variable'>cadolesuser_niveau02view</target>
<target type='variable'>cadolesuser_moderegistration</target>
</condition>
<condition name='disabled_if_in' source='cadolesuser_niveau02view'>
<param>non</param>
<target type='variable'>cadolesuser_niveau02label</target>
<target type='variable'>cadolesuser_niveau02labels</target>
<target type='variable'>cadolesuser_niveau02icon</target>
</condition>
<check name='valid_enum' target='cadolesuser_moderegistration'>
<param>['none', 'byuser', 'byadmin']</param>
</check>
<check name='valid_enum' target='cadolesuser_smtpencryption'>
<param>['tls', 'ssl', 'null']</param>
</check>
<check name='valid_enum' target='cadolesuser_smtpauthmode'>
<param>['plain', 'login', 'cram-md5', 'null']</param>
</check>
<check name='valid_enum' target='cadolesuser_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
<condition name='disabled_if_in' source='cadolesuser_db_mode'>
<param>local</param>
<target type='variable'>cadolesuser_dbserver</target>
<target type='variable'>cadolesuser_dbuser</target>
<target type='variable'>cadolesuser_dbport</target>
<target type='variable'>cadolesuser_dbpass</target>
</condition>
<condition name='disabled_if_in' source='cadolesuser_db_mode'>
<param>default</param>
<target type='variable'>cadolesuser_dbserver</target>
<target type='variable'>cadolesuser_dbuser</target>
<target type='variable'>cadolesuser_dbport</target>
<target type='variable'>cadolesuser_dbpass</target>
<target type='variable'>cadolesuser_allow_hosts</target>
</condition>
</constraints>
<help>
</help>
</creole>

231
eole.mk Normal file
View File

@ -0,0 +1,231 @@
#
# NE PAS EDITER CE FICHIER
#
# Utiliser <appli>.mk à inclure à la fin de Makefile
#################
# Sanity checks #
#################
ifeq (, $(DESTDIR))
$(warning $$(DESTDIR) is empty, installation will be done in /)
endif
ifeq (, $(filter-out XXX-XXX, $(strip $(SOURCE))))
$(error $$(SOURCE) variable has incorrect value '$(SOURCE)')
endif
ifeq (, $(filter-out 2.X, $(strip $(EOLE_VERSION))))
$(error $$(EOLE_VERSION) variable has incorrect value '$(EOLE_VERSION)')
endif
ifeq (, $(filter-out 2.X.Y, $(strip $(EOLE_RELEASE))))
$(error $$(EOLE_RELEASE) variable has incorrect value '$(EOLE_RELEASE)')
endif
#########################
# Variables definitions #
#########################
INSTALL := install
INSTALL_DATA := install -m 644
INSTALL_PROGRAM := install -m 755
INSTALL_DIRECTORY := install -m 755 -d
INSTALL_RECURSIVE := cp -dr --no-preserve=ownership
# Standard path
bin_PROG_DIR := $(DESTDIR)/usr/bin
sbin_PROG_DIR := $(DESTDIR)/usr/sbin
man8_DATA_DIR := $(DESTDIR)/usr/share/man/fr.UTF-8/man8
# Base
eole_DIR := $(DESTDIR)/usr/share/eole
ifeq ($(strip $(EOLE_VERSION)), 2.3)
diagnose_PROG_DIR := $(eole_DIR)/diagnose/module
else
diagnose_PROG_DIR := $(eole_DIR)/diagnose/
endif
# Creole
creole_DIR := $(eole_DIR)/creole
dicos_DATA_DIR := $(creole_DIR)/dicos
tmpl_DATA_DIR := $(creole_DIR)/distrib
preservice_PROG_DIR := $(eole_DIR)/preservice
pretemplate_PROG_DIR := $(eole_DIR)/pretemplate
posttemplate_PROG_DIR := $(eole_DIR)/posttemplate
postservice_PROG_DIR := $(eole_DIR)/postservice
ifeq ($(strip $(EOLE_VERSION)), 2.3)
firewall_DATA_DIR := $(eole_DIR)/firewall
endif
bacula_restore_DATA_DIR := $(eole_DIR)/bacula/restore
bareos_restore_DATA_DIR := $(eole_DIR)/bareos/restore
bacula_fichier_DATA_DIR := $(DESTDIR)/etc/bacula/baculafichiers.d
bareos_fichier_DATA_DIR := $(DESTDIR)/etc/bareos/bareosfichiers.d
ifeq ($(strip $(EOLE_VERSION)), 2.3)
schedule_pre_PROG_DIR := $(eole_DIR)/schedule/pre
schedule_post_PROG_DIR := $(eole_DIR)/schedule/post
else
schedule_scripts_PROG_DIR := $(eole_DIR)/schedule/scripts
endif
extra_REC_DIR := $(creole_DIR)/extra
# Zéphir
zephir_DATA_DIR := $(DESTDIR)/usr/share/zephir
zephir_configs_DATA_DIR := $(zephir_DATA_DIR)/monitor/configs
zephir_srv_DATA_DIR := $(zephir_configs_DATA_DIR)/services
zephir_scripts_PROG_DIR := $(zephir_DATA_DIR)/scripts
# SSO
sso_DATA_DIR := $(DESTDIR)/usr/share/sso
sso_filtres_DATA_DIR := $(sso_DATA_DIR)/app_filters
sso_user-info_DATA_DIR := $(sso_DATA_DIR)/user_infos
# EAD
ead_DATA_DIR := $(DESTDIR)/usr/share/ead2/backend/config
ead_actions_DATA_DIR := $(ead_DATA_DIR)/actions
ead_perms_DATA_DIR := $(ead_DATA_DIR)/perms
ead_roles_DATA_DIR := $(ead_DATA_DIR)/roles
# Program libraries goes under /usr/lib/<PROGRAM>/
lib_$(SOURCE)_DATA_DIR := $(DESTDIR)/usr/lib/$(SOURCE)
# Scripts Eole
scripts_PROG_DIR := $(eole_DIR)/sbin
lib_eole_DATA_DIR := $(DESTDIR)/usr/lib/eole
# LDAP
ldap_passwords_DATA_DIR := $(eole_DIR)/annuaire/password_files
# LXC
lxc_DATA_DIR := $(eole_DIR)/lxc
lxc_fstab_DATA_DIR := $(lxc_DATA_DIR)/fstab
lxc_hosts_DATA_DIR := $(lxc_DATA_DIR)/hosts
# SQL
sql_DATA_DIR := $(eole_DIR)/mysql/$(SOURCE)
sql_gen_DATA_DIR := $(sql_DATA_DIR)/gen
sql_updates_DATA_DIR := $(sql_DATA_DIR)/updates
sql_conf_gen_DATA_DIR := $(eole_DIR)/applications/gen
sql_conf_passwords_DATA_DIR := $(eole_DIR)/applications/passwords
sql_conf_updates_DATA_DIR := $(eole_DIR)/applications/updates/$(SOURCE)
# EoleDB sql directory
db_DIR := $(eole_DIR)/db
db_gen_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/gen
db_updates_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/updates
# Certifs
certs_DATA_DIR := $(eole_DIR)/certs
# Logrotate
logrotate_DATA_DIR := $(DESTDIR)/etc/logrotate.d
# Cron
cron_PROG_DIR := $(DESTDIR)/etc/cron.daily
# Python modules
ifneq ($(DESTDIR),)
PYTHON_OPTS := --root $(DESTDIR)
endif
# Translation
TRANSLATION_SRC := translation
TRANSLATION_DEST := $(DESTDIR)/usr/share/locale
PO_FILES = $(wildcard $(TRANSLATION_SRC)/*/*.po)
MO_FOLDERS = $(addprefix $(TRANSLATION_DEST), $(addsuffix LC_MESSAGES,$(subst $(TRANSLATION_SRC),,$(dir $(PO_FILES)))))
#############################################
# Common directories and files installation #
#############################################
all:
$(MO_FOLDERS):
$(INSTALL_DIRECTORY) $@
$(PO_FILES): $(MO_FOLDERS)
msgfmt -o $(TRANSLATION_DEST)$(subst $(TRANSLATION_SRC),,$(addsuffix LC_MESSAGES,$(dir $@)))/$(notdir $(@:.po=.mo)) $@
install-lang: $(PO_FILES)
install:: install-dirs install-files install-lang
# $1 = command to run
# $2 = source directory
# $3 = destination directory
define fc_install_file
if [ -d $2 ]; then \
for file in `ls -1 $2/`; do \
$1 $2/$$file $3 || true; \
done; \
fi
endef
##
## Directory creation
##
# use % to catch local name in $*
# data, program and recursive directory require a corresponding
# directory in local sources
%_DATA_DIR %_PROG_DIR %REC_DIR:
test ! -d $(subst _,/,$*) || $(INSTALL_DIRECTORY) $($@)
# Create the directory referenced by the variable without a local one.
%_DIR:
@: # do nothing
##
## Install files present directly under data, program and recursive directories
##
# $* : name of variable
# $($*): value of variable
%-instdata:
$(call fc_install_file, $(INSTALL_DATA), $(subst _,/,$(subst _DATA_DIR,,$*)), $($*))
%-instprog:
$(call fc_install_file, $(INSTALL_PROGRAM), $(subst _,/,$(subst _PROG_DIR,,$*)), $($*))
%-instrec:
$(call fc_install_file, $(INSTALL_RECURSIVE), $(subst _,/,$(subst _REC_DIR,,$*)), $($*))
# Use second expansion as variables may be created in included
# Makefiles
.SECONDEXPANSION:
# List of all directories
installdirs_LIST = $(foreach V, $(filter %_DIR, $(.VARIABLES)), \
$(if $(filter file, $(origin $(V))), \
$(V)))
# List of data directories
installdata_LIST = $(filter %_DATA_DIR, $(installdirs_LIST))
# List of program directories
installprog_LIST = $(filter %_PROG_DIR, $(installdirs_LIST))
# List of recursive directories
installrec_LIST = $(filter %_REC_DIR, $(installdirs_LIST))
# Expand directories to create as dependency
# Use double-colon to permit user to define additionnal install-dirs
install-dirs:: $$(installdirs_LIST)
# Expand files to install as dependency
# Use double-colon to permit user to define additionnal install-files
install-files:: install-data-files install-prog-files install-rec-dirs
install-data-files: $$(patsubst %,%-instdata,$$(installdata_LIST))
install-prog-files: $$(patsubst %,%-instprog,$$(installprog_LIST))
install-rec-dirs: $$(patsubst %,%-instrec,$$(installrec_LIST))
# Installation of python modules
ifeq ($(shell test -f setup.py && echo 0), 0)
install-files::
python setup.py install --no-compile --install-layout=deb $(PYTHON_OPTS)
endif
.PHONY: install install-dirs install-files install-data-files install-prog-files install-rec-dirs

2
postservice/90-cadolesuser Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
CreoleRun "/var/www/html/cadolesuser/scripts/cadolesuser-postservice-00.sh" web

25
src/cadolesuser-1.0/.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
/.web-server-pid
/app/config/parameters.yml
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/spoolmail
/var/spoolmail/*
!var/spoolmail/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/web/bundles/
!/web/uploads/avatar
/web/uploads/avatar/*
!/web/uploads/avatar/.gitkeep
!/web/uploads/avatar/noavatar.png
!/web/uploads/avatar/admin.jpg
!/web/uploads/avatar/system.jpg

View File

@ -0,0 +1,19 @@
Copyright (c) 2004-2017 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,77 @@
Symfony Standard Edition
========================
**WARNING**: This distribution does not support Symfony 4. See the
[Installing & Setting up the Symfony Framework][15] page to find a replacement
that fits you best.
Welcome to the Symfony Standard Edition - a fully-functional Symfony
application that you can use as the skeleton for your new applications.
For details on how to download and get started with Symfony, see the
[Installation][1] chapter of the Symfony Documentation.
What's inside?
--------------
The Symfony Standard Edition is configured with the following defaults:
* An AppBundle you can use to start coding;
* Twig as the only configured template engine;
* Doctrine ORM/DBAL;
* Swiftmailer;
* Annotations enabled for everything.
It comes pre-configured with the following bundles:
* **FrameworkBundle** - The core Symfony framework bundle
* [**SensioFrameworkExtraBundle**][6] - Adds several enhancements, including
template and routing annotation capability
* [**DoctrineBundle**][7] - Adds support for the Doctrine ORM
* [**TwigBundle**][8] - Adds support for the Twig templating engine
* [**SecurityBundle**][9] - Adds security by integrating Symfony's security
component
* [**SwiftmailerBundle**][10] - Adds support for Swiftmailer, a library for
sending emails
* [**MonologBundle**][11] - Adds support for Monolog, a logging library
* **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and
the web debug toolbar
* **SensioDistributionBundle** (in dev/test env) - Adds functionality for
configuring and working with Symfony distributions
* [**SensioGeneratorBundle**][13] (in dev env) - Adds code generation
capabilities
* [**WebServerBundle**][14] (in dev env) - Adds commands for running applications
using the PHP built-in web server
* **DebugBundle** (in dev/test env) - Adds Debug and VarDumper component
integration
All libraries and bundles included in the Symfony Standard Edition are
released under the MIT or BSD license.
Enjoy!
[1]: https://symfony.com/doc/3.4/setup.html
[6]: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html
[7]: https://symfony.com/doc/3.4/doctrine.html
[8]: https://symfony.com/doc/3.4/templating.html
[9]: https://symfony.com/doc/3.4/security.html
[10]: https://symfony.com/doc/3.4/email.html
[11]: https://symfony.com/doc/3.4/logging.html
[13]: https://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html
[14]: https://symfony.com/doc/current/setup/built_in_web_server.html
[15]: https://symfony.com/doc/current/setup.html

View File

@ -0,0 +1,7 @@
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

View File

@ -0,0 +1,7 @@
<?php
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
class AppCache extends HttpCache
{
}

View File

@ -0,0 +1,71 @@
<?php
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new \Symfony\Bundle\MakerBundle\MakerBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Gregwar\CaptchaBundle\GregwarCaptchaBundle(),
new Oneup\UploaderBundle\OneupUploaderBundle(),
new Tetranz\Select2EntityBundle\TetranzSelect2EntityBundle(),
new AppBundle\AppBundle(),
new Cadoles\CoreBundle\CadolesCoreBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
if ('dev' === $this->getEnvironment()) {
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
}
}
return $bundles;
}
public function getRootDir()
{
return __DIR__;
}
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(function (ContainerBuilder $container) {
$container->setParameter('container.autowiring.strict_mode', true);
$container->setParameter('container.dumper.inline_class_loader', true);
$container->addObjectResource($this);
});
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body>
{% block body %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>

View File

@ -0,0 +1,76 @@
{% extends 'base.html.twig' %}
{% block body %}
<div id="wrapper">
<div id="container">
<div id="welcome">
<h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1>
</div>
<div id="status">
<p>
<svg id="icon-status" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z" fill="#759E1A"/></svg>
Your application is now ready. You can start working on it at:
<code>{{ base_dir }}</code>
</p>
</div>
<div id="next">
<h2>What's next?</h2>
<p>
<svg id="icon-book" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="-12.5 9 64 64" enable-background="new -12.5 9 64 64" xml:space="preserve">
<path fill="#AAA" d="M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9
c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5
c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3
c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1
c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3
c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1
c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3
c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1
c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8
C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4
L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6
c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4
c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/>
</svg>
Read the documentation to learn
<a href="https://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/page_creation.html">
How to create your first page in Symfony
</a>
</p>
</div>
</div>
</div>
{% endblock %}
{% block stylesheets %}
<style>
body { background: #F5F5F5; font: 18px/1.5 sans-serif; }
h1, h2 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 36px; }
h2 { font-size: 21px; margin-bottom: 1em; }
p { margin: 0 0 1em 0; }
a { color: #0000F0; }
a:hover { text-decoration: none; }
code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; }
#wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; }
#container { padding: 2em; }
#welcome, #status { margin-bottom: 2em; }
#welcome h1 span { display: block; font-size: 75%; }
#icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; }
#icon-book { display: none; }
@media (min-width: 768px) {
#wrapper { width: 80%; margin: 2em auto; }
#icon-book { display: inline-block; }
#status a, #next a { display: block; }
@-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
.sf-toolbar { opacity: 0; -webkit-animation: fade-in 1s .2s forwards; animation: fade-in 1s .2s forwards;}
}
</style>
{% endblock %}

View File

@ -0,0 +1,112 @@
imports:
- { resource: parameters.yml }
- { resource: template.yml }
- { resource: local.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@CadolesCoreBundle/Resources/config/services.yml" }
- { resource: twig.yml }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: fr
framework:
#esi: ~
#translator: { fallbacks: ['%locale%'] }
secret: '%secret%'
router:
resource: '%kernel.project_dir%/app/config/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enabled: true, enable_annotations: true }
#serializer: { enable_annotations: true }
default_locale: '%locale%'
trusted_hosts: ~
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
fragments: ~
http_method_override: true
templating:
engines: ['twig']
assets: ~
php_errors:
log: true
# Twig Configuration
twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
form_themes:
- 'TetranzSelect2EntityBundle:Form:fields.html.twig'
# Swiftmailer Configuration
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
port: '%mailer_port%'
username: '%mailer_user%'
password: '%mailer_password%'
auth_mode: '%mailer_authmode%'
encryption: '%mailer_encryption%'
stream-options:
ssl:
allow_self_signed : true
verify_peer: false
spool:
type: file
path: '%kernel.project_dir%/var/spoolmail'
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
assets:
font-awesome-otf:
inputs: '@CadolesCoreBundle/Resources/public/fonts/FontAwesome.otf'
output: 'fonts/FontAwesome.otf'
font-awesome-eot:
inputs: '@CadolesCoreBundle/Resources/public/fonts/fontawesome-webfont.eot'
output: 'fonts/fontawesome-webfont.eot'
font-awesome-svg:
inputs: '@CadolesCoreBundle/Resources/public/fonts/fontawesome-webfont.svg'
output: 'fonts/fontawesome-webfont.svg'
font-awesome-ttf:
inputs: '@CadolesCoreBundle/Resources/public/fonts/fontawesome-webfont.ttf'
output: 'fonts/fontawesome-webfont.ttf'
font-awesome-woff:
inputs: '@CadolesCoreBundle/Resources/public/fonts/fontawesome-webfont.woff'
output: 'fonts/fontawesome-webfont.woff'
font-awesome-woff2:
inputs: '@CadolesCoreBundle/Resources/public/fonts/fontawesome-webfont.woff2'
output: 'fonts/fontawesome-webfont.woff2'
glyphicons-halflings-regular-eot:
inputs: '@CadolesCoreBundle/Resources/public/fonts/glyphicons-halflings-regular.eot'
output: 'fonts/glyphicons-halflings-regular.eot'
glyphicons-halflings-regular-svg:
inputs: '@CadolesCoreBundle/Resources/public/fonts/glyphicons-halflings-regular.svg'
output: 'fonts/glyphicons-halflings-regular.svg'
glyphicons-halflings-regular-ttf:
inputs: '@CadolesCoreBundle/Resources/public/fonts/glyphicons-halflings-regular.ttf'
output: 'fonts/glyphicons-halflings-regular.ttf'
glyphicons-halflings-regular-woff:
inputs: '@CadolesCoreBundle/Resources/public/fonts/glyphicons-halflings-regular.woff'
output: 'fonts/glyphicons-halflings-regular.woff'
glyphicons-halflings-regular-woff2:
inputs: '@CadolesCoreBundle/Resources/public/fonts/glyphicons-halflings-regular.woff2'
output: 'fonts/glyphicons-halflings-regular.woff2'
filters:
cssrewrite: ~
# onupload configuration
oneup_uploader:
mappings:
avatar:
frontend: dropzone # or any uploader you use in the frontend
# gregwar captcha configuration
gregwar_captcha: ~

View File

@ -0,0 +1,41 @@
imports:
- { resource: config.yml }
framework:
router:
resource: '%kernel.project_dir%/app/config/routing_dev.yml'
strict_requirements: true
profiler: { only_exceptions: false }
web_profiler:
toolbar: true
intercept_redirects: false
monolog:
handlers:
main:
type: stream
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
channels: ['!event']
console:
type: console
process_psr_3_messages: false
channels: ['!event', '!doctrine', '!console']
# To follow logs in real time, execute the following command:
# `bin/console server:log -vv`
server_log:
type: server_log
process_psr_3_messages: false
host: 127.0.0.1:9911
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
#swiftmailer:
# delivery_addresses: ['me@example.com']

View File

@ -0,0 +1,22 @@
imports:
- { resource: config.yml }
#doctrine:
# orm:
# metadata_cache_driver: apc
# result_cache_driver: apc
# query_cache_driver: apc
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
console:
type: console
process_psr_3_messages: false

View File

@ -0,0 +1,16 @@
imports:
- { resource: config_dev.yml }
framework:
test: ~
session:
storage_id: session.storage.mock_file
profiler:
collect: false
web_profiler:
toolbar: false
intercept_redirects: false
swiftmailer:
disable_delivery: true

View File

@ -0,0 +1,5 @@
# Parametres spécifiques local (ne sera pas écrasé par un reconfigure)
parameters:
alias: cadolesuser # Alias apache de l'application
appname: CADOLES USER # Nom de l'application
logo: uploads/logo/logo.png # Localisation du logo

View File

@ -0,0 +1,19 @@
# This file is a "template" of what your parameters.yml file should look like
# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
parameters:
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
# You should uncomment this if you want to use pdo_sqlite
#database_path: '%kernel.project_dir%/var/data/data.sqlite'
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt

View File

@ -0,0 +1,7 @@
core:
resource: "@CadolesCoreBundle/Resources/config/routing.yml"
prefix: /
oneup_uploader:
resource: .
type: uploader

View File

@ -0,0 +1,14 @@
_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
_errors:
resource: '@TwigBundle/Resources/config/routing/errors.xml'
prefix: /_error
_main:
resource: routing.yml

View File

@ -0,0 +1,57 @@
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/security.html
security:
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
cadoles_core_db_provider:
entity:
class: CadolesCoreBundle:User
property: username
encoders:
Cadoles\CoreBundle\Entity\User:
id: cadoles.core.password.encoder
Cadoles\CoreBundle\Entity\Registration:
id: cadoles.core.password.encoder
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
provider: cadoles_core_db_provider
anonymous: ~
# activate different ways to authenticate
# http_basic: ~
# http://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
form_login:
login_path: cadoles_core_login
check_path: cadoles_core_login
use_referer: true
target_path_parameter: cadoles_core_home
csrf_parameter: _csrf_security_token
csrf_token_id: a_private_string
logout:
invalidate_session: true
path: cadoles_core_logout
target: cadoles_core_kill
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
access_control:
# Config route
- { path: ^/profil, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_USER] }
- { path: ^/config/home, roles: [ROLE_ADMIN, ROLE_MODO] }
- { path: ^/config/niveau02, roles: [ROLE_ADMIN, ROLE_MODO] }
- { path: ^/config/group, roles: [ROLE_ADMIN, ROLE_MODO] }
- { path: ^/config/registration, roles: [ROLE_ADMIN, ROLE_MODO] }
- { path: ^/config/user, roles: [ROLE_ADMIN, ROLE_MODO] }
- { path: ^/config, roles: [ROLE_ADMIN] }

View File

@ -0,0 +1,35 @@
# Learn more about services, parameters and containers at
# https://symfony.com/doc/current/service_container.html
parameters:
#parameter_name: value
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false
# makes classes in src/AppBundle available to be used as services
# this creates a service per class whose id is the fully-qualified class name
AppBundle\:
resource: '../../src/AppBundle/*'
# you can exclude directories or files
# but if a service is unused, it's removed anyway
exclude: '../../src/AppBundle/{Entity,Repository,Tests}'
# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
AppBundle\Controller\:
resource: '../../src/AppBundle/Controller'
public: true
tags: ['controller.service_arguments']
# add more services, or override services that need manual wiring
# AppBundle\Service\ExampleService:
# arguments:
# $someArgument: 'some_value'

View File

@ -0,0 +1,64 @@
# This file is auto-generated during the composer install
parameters:
mode_auth: CAS # SQL / LDAP / CAS
ldap_sync: true
ldap_host: 127.0.0.1
ldap_port: 389
ldap_user: cn=admin,o=gouv,c=fr
ldap_password: eole
ldap_basedn: o=gouv,c=fr
ldap_baseuser: ou=users,ou=cadoles,o=gouv,c=fr
ldap_baseniveau01: ou=departement,ou=cadoles,o=gouv,c=fr
ldap_baseniveau02: ou=service,ou=cadoles,o=gouv,c=fr
ldap_basegroup: ou=groups,ou=cadoles,o=gouv,c=fr
colormain: 428BCA # Couleur principale
fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale
keyterm: 8 # Taille mini du password
moderegistration: byadmin # Mode de registration : none / byuser / byadmin
labelniveau01: Département # Label singulier du niveau 01 d'organisation
labelsniveau01: Départements # Label pluriel du niveau 01 d'organisation
iconniveau01: fa-building # Icon du niveau 01 d'organisation
labelniveau02: Service # Label singulier du niveau 02 d'organisation
labelsniveau02: Services # Label pluriel du niveau 02 d'organisation
iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation
eportail_sync: false
eportail_url: # /eportail
eportail_login: # /eportail/login.php
eportail_database_host: # 172.27.7.64
eportail_database_port: # 3306
eportail_database_name: # eportail
eportail_database_user: # eportail
eportail_database_password: # "changme"
mailer_port: '2525'
mailer_encryption: null
mailer_authmode: null
noreply: noreply@ldapbundle.ac-arno.fr
# Doctrine Configuration for eportail
#doctrine:
# dbal:
# connections:
# eportail:
# driver: pdo_mysql
# host: '%eportail_database_host%'
# port: '%eportail_database_port%'
# dbname: '%eportail_database_name%'
# user: '%eportail_database_user%'
# password: '%eportail_database_password%'
# charset: UTF8
# orm:
# default_entity_manager: default
# entity_managers:
# default:
# connection: default
# mappings:
# CadolesCoreBundle: ~
# eportail:
# connection: eportail
# mappings:
# CadolesCoreBundle: ~

View File

@ -0,0 +1,17 @@
# Parametres spécifiques à eportail
twig:
globals:
alias: %alias%
appname: %appname%
logo: %logo%
eportail_sync: %eportail_sync%
moderegistration: %moderegistration%
labelniveau01: %labelniveau01%
labelsniveau01: %labelsniveau01%
iconniveau01: %iconniveau01%
viewniveau02: %viewniveau02%
labelniveau02: %labelniveau02%
labelsniveau02: %labelsniveau02%
iconniveau02: %iconniveau02%
keyterm: %keyterm%

27
src/cadolesuser-1.0/bin/console Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
require __DIR__.'/../vendor/autoload.php';
$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);

View File

@ -0,0 +1,146 @@
#!/usr/bin/env php
<?php
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
$lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
echo_title('Symfony Requirements Checker');
echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) {
echo_style('green', ' '.$iniPath);
} else {
echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!');
}
echo PHP_EOL.PHP_EOL;
echo '> Checking Symfony requirements:'.PHP_EOL.' ';
$messages = array();
foreach ($symfonyRequirements->getRequirements() as $req) {
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('red', 'E');
$messages['error'][] = $helpText;
} else {
echo_style('green', '.');
}
}
$checkPassed = empty($messages['error']);
foreach ($symfonyRequirements->getRecommendations() as $req) {
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('yellow', 'W');
$messages['warning'][] = $helpText;
} else {
echo_style('green', '.');
}
}
if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
echo_title('Fix the following mandatory requirements', 'red');
foreach ($messages['error'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
if (!empty($messages['warning'])) {
echo_title('Optional recommendations to improve your setup', 'yellow');
foreach ($messages['warning'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
echo PHP_EOL;
echo_style('title', 'Note');
echo ' The command console could use a different php.ini file'.PHP_EOL;
echo_style('title', '~~~~');
echo ' than the one used with your web server. To be on the'.PHP_EOL;
echo ' safe side, please check the requirements from your web'.PHP_EOL;
echo ' server using the ';
echo_style('yellow', 'web/config.php');
echo ' script.'.PHP_EOL;
echo PHP_EOL;
exit($checkPassed ? 0 : 1);
function get_error_message(Requirement $requirement, $lineSize)
{
if ($requirement->isFulfilled()) {
return;
}
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
return $errorMessage;
}
function echo_title($title, $style = null)
{
$style = $style ?: 'title';
echo PHP_EOL;
echo_style($style, $title.PHP_EOL);
echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
echo PHP_EOL;
}
function echo_style($style, $message)
{
// ANSI color codes
$styles = array(
'reset' => "\033[0m",
'red' => "\033[31m",
'green' => "\033[32m",
'yellow' => "\033[33m",
'error' => "\033[37;41m",
'success' => "\033[37;42m",
'title' => "\033[34m",
);
$supports = has_color_support();
echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
}
function echo_block($style, $title, $message)
{
$message = ' '.trim($message).' ';
$width = strlen($message);
echo PHP_EOL.PHP_EOL;
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
echo PHP_EOL;
echo_style($style, $message);
echo PHP_EOL;
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
}
function has_color_support()
{
static $support;
if (null === $support) {
if (DIRECTORY_SEPARATOR == '\\') {
$support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
} else {
$support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
}
}
return $support;
}

View File

@ -0,0 +1,85 @@
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle",
"Cadoles\\CoreBundle\\": "src/Cadoles/CoreBundle"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ],
"files" : [
"/usr/share/php/CAS/eoleCAS.php",
"/usr/share/php/configCAS/cas.inc.php"
]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" },
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=7",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/doctrine-fixtures-bundle": "^2.3",
"doctrine/doctrine-migrations-bundle": "^1.2",
"doctrine/orm": "^2.5",
"gregwar/captcha-bundle": "^2.0",
"incenteev/composer-parameter-handler": "^2.0",
"oneup/uploader-bundle": "^1.7",
"ramsey/uuid": "^3.7",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/assetic-bundle": "^2.8",
"symfony/ldap": "^3.4",
"symfony/monolog-bundle": "^3.1.0",
"symfony/orm-pack": "^1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"tetranz/select2entity-bundle": "2.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/maker-bundle": "^1.5",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"platform": {
"php": "7.0.30"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.4-dev"
}
}
}

3538
src/cadolesuser-1.0/composer.lock generated Normal file
View File

@ -0,0 +1,3538 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "4bf005722be0be2b0b9a7646e1089952",
"content-hash": "515644ac69e746b61bcd9f326e75c78f",
"packages": [
{
"name": "composer/ca-bundle",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8afa52cd417f4ec417b4bfe86b68106538a87660",
"reference": "8afa52cd417f4ec417b4bfe86b68106538a87660",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0 || ^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"time": "2018-10-18 06:09:13"
},
{
"name": "doctrine/annotations",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97",
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"php": "^5.6 || ^7.0"
},
"require-dev": {
"doctrine/cache": "1.*",
"phpunit/phpunit": "^5.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Docblock Annotations Parser",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"docblock",
"parser"
],
"time": "2017-02-24 16:22:25"
},
{
"name": "doctrine/cache",
"version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b",
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b",
"shasum": ""
},
"require": {
"php": "~5.5|~7.0"
},
"conflict": {
"doctrine/common": ">2.2,<2.4"
},
"require-dev": {
"phpunit/phpunit": "~4.8|~5.0",
"predis/predis": "~1.0",
"satooshi/php-coveralls": "~0.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Caching library offering an object-oriented API for many cache backends",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"cache",
"caching"
],
"time": "2017-07-22 12:49:21"
},
{
"name": "doctrine/collections",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/collections.git",
"reference": "1a4fb7e902202c33cce8c55989b945612943c2ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba",
"reference": "1a4fb7e902202c33cce8c55989b945612943c2ba",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"doctrine/coding-standard": "~0.1@dev",
"phpunit/phpunit": "^5.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Collections\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Collections Abstraction library",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"array",
"collections",
"iterator"
],
"time": "2017-01-03 10:49:41"
},
{
"name": "doctrine/common",
"version": "v2.7.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
"reference": "4acb8f89626baafede6ee5475bc5844096eba8a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9",
"reference": "4acb8f89626baafede6ee5475bc5844096eba8a9",
"shasum": ""
},
"require": {
"doctrine/annotations": "1.*",
"doctrine/cache": "1.*",
"doctrine/collections": "1.*",
"doctrine/inflector": "1.*",
"doctrine/lexer": "1.*",
"php": "~5.6|~7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.4.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\": "lib/Doctrine/Common"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Common Library for Doctrine projects",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"collections",
"eventmanager",
"persistence",
"spl"
],
"time": "2017-07-22 08:35:12"
},
{
"name": "doctrine/data-fixtures",
"version": "v1.2.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/data-fixtures.git",
"reference": "17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e",
"reference": "17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e",
"shasum": ""
},
"require": {
"doctrine/common": "~2.2",
"php": "^5.6 || ^7.0"
},
"conflict": {
"doctrine/orm": "< 2.4"
},
"require-dev": {
"doctrine/dbal": "^2.5.4",
"doctrine/orm": "^2.5.4",
"phpunit/phpunit": "^5.4.6"
},
"suggest": {
"doctrine/mongodb-odm": "For loading MongoDB ODM fixtures",
"doctrine/orm": "For loading ORM fixtures",
"doctrine/phpcr-odm": "For loading PHPCR ODM fixtures"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\DataFixtures": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
}
],
"description": "Data Fixtures for all Doctrine Object Managers",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database"
],
"time": "2016-09-20 10:07:57"
},
{
"name": "doctrine/dbal",
"version": "v2.5.13",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "729340d8d1eec8f01bff708e12e449a3415af873"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873",
"reference": "729340d8d1eec8f01bff708e12e449a3415af873",
"shasum": ""
},
"require": {
"doctrine/common": ">=2.4,<2.8-dev",
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"symfony/console": "2.*||^3.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
"bin": [
"bin/doctrine-dbal"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\DBAL\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
}
],
"description": "Database Abstraction Layer",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database",
"dbal",
"persistence",
"queryobject"
],
"time": "2017-07-22 20:44:48"
},
{
"name": "doctrine/doctrine-bundle",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineBundle.git",
"reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/703fad32e4c8cbe609caf45a71a1d4266c830f0f",
"reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f",
"shasum": ""
},
"require": {
"doctrine/dbal": "^2.5.12",
"doctrine/doctrine-cache-bundle": "~1.2",
"jdorn/sql-formatter": "^1.2.16",
"php": "^5.5.9|^7.0",
"symfony/console": "~2.7|~3.0|~4.0",
"symfony/dependency-injection": "~2.7|~3.0|~4.0",
"symfony/doctrine-bridge": "~2.7|~3.0|~4.0",
"symfony/framework-bundle": "^2.7.22|~3.0|~4.0"
},
"conflict": {
"symfony/http-foundation": "<2.6"
},
"require-dev": {
"doctrine/orm": "~2.4",
"phpunit/phpunit": "^4.8.36|^5.7|^6.4",
"satooshi/php-coveralls": "^1.0",
"symfony/phpunit-bridge": "~2.7|~3.0|~4.0",
"symfony/property-info": "~2.8|~3.0|~4.0",
"symfony/validator": "~2.7|~3.0|~4.0",
"symfony/web-profiler-bundle": "~2.7|~3.0|~4.0",
"symfony/yaml": "~2.7|~3.0|~4.0",
"twig/twig": "~1.26|~2.0"
},
"suggest": {
"doctrine/orm": "The Doctrine ORM integration is optional in the bundle.",
"symfony/web-profiler-bundle": "To use the data collector."
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.8.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Bundle\\DoctrineBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Doctrine Project",
"homepage": "http://www.doctrine-project.org/"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony DoctrineBundle",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database",
"dbal",
"orm",
"persistence"
],
"time": "2018-04-19 14:07:39"
},
{
"name": "doctrine/doctrine-cache-bundle",
"version": "1.3.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineCacheBundle.git",
"reference": "5514c90d9fb595e1095e6d66ebb98ce9ef049927"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/5514c90d9fb595e1095e6d66ebb98ce9ef049927",
"reference": "5514c90d9fb595e1095e6d66ebb98ce9ef049927",
"shasum": ""
},
"require": {
"doctrine/cache": "^1.4.2",
"doctrine/inflector": "~1.0",
"php": ">=5.3.2",
"symfony/doctrine-bridge": "~2.7|~3.3|~4.0"
},
"require-dev": {
"instaclick/coding-standard": "~1.1",
"instaclick/object-calisthenics-sniffs": "dev-master",
"instaclick/symfony2-coding-standard": "dev-remaster",
"phpunit/phpunit": "~4.8.36|~5.6|~6.5|~7.0",
"predis/predis": "~0.8",
"satooshi/php-coveralls": "^1.0",
"squizlabs/php_codesniffer": "~1.5",
"symfony/console": "~2.7|~3.3|~4.0",
"symfony/finder": "~2.7|~3.3|~4.0",
"symfony/framework-bundle": "~2.7|~3.3|~4.0",
"symfony/phpunit-bridge": "~2.7|~3.3|~4.0",
"symfony/security-acl": "~2.7|~3.3",
"symfony/validator": "~2.7|~3.3|~4.0",
"symfony/yaml": "~2.7|~3.3|~4.0"
},
"suggest": {
"symfony/security-acl": "For using this bundle to cache ACLs"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Bundle\\DoctrineCacheBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Fabio B. Silva",
"email": "fabio.bat.silva@gmail.com"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@hotmail.com"
},
{
"name": "Doctrine Project",
"homepage": "http://www.doctrine-project.org/"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony Bundle for Doctrine Cache",
"homepage": "https://www.doctrine-project.org",
"keywords": [
"cache",
"caching"
],
"time": "2018-11-09 06:25:35"
},
{
"name": "doctrine/doctrine-fixtures-bundle",
"version": "v2.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineFixturesBundle.git",
"reference": "74b8cc70a4a25b774628ee59f4cdf3623a146273"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/74b8cc70a4a25b774628ee59f4cdf3623a146273",
"reference": "74b8cc70a4a25b774628ee59f4cdf3623a146273",
"shasum": ""
},
"require": {
"doctrine/data-fixtures": "~1.0",
"doctrine/doctrine-bundle": "~1.0",
"php": ">=5.3.2",
"symfony/doctrine-bridge": "~2.7|~3.0|~4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.4.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Bundle\\FixturesBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Doctrine Project",
"homepage": "http://www.doctrine-project.org"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony DoctrineFixturesBundle",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"Fixture",
"persistence"
],
"time": "2017-10-30 19:26:42"
},
{
"name": "doctrine/doctrine-migrations-bundle",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineMigrationsBundle.git",
"reference": "a9e506369f931351a2a6dd2aef588a822802b1b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/a9e506369f931351a2a6dd2aef588a822802b1b7",
"reference": "a9e506369f931351a2a6dd2aef588a822802b1b7",
"shasum": ""
},
"require": {
"doctrine/doctrine-bundle": "~1.0",
"doctrine/migrations": "^1.1",
"php": ">=5.4.0",
"symfony/framework-bundle": "~2.7|~3.3|~4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Bundle\\MigrationsBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Doctrine Project",
"homepage": "http://www.doctrine-project.org"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony DoctrineMigrationsBundle",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"dbal",
"migrations",
"schema"
],
"time": "2017-11-01 09:13:26"
},
{
"name": "doctrine/inflector",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "e11d84c6e018beedd929cff5220969a3c6d1d462"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462",
"reference": "e11d84c6e018beedd929cff5220969a3c6d1d462",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Common String Manipulations with regard to casing and singular/plural rules.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"inflection",
"pluralize",
"singularize",
"string"
],
"time": "2017-07-22 12:18:28"
},
{
"name": "doctrine/instantiator",
"version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"shasum": ""
},
"require": {
"php": ">=5.3,<8.0-DEV"
},
"require-dev": {
"athletic/athletic": "~0.1.8",
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "http://ocramius.github.com/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://github.com/doctrine/instantiator",
"keywords": [
"constructor",
"instantiate"
],
"time": "2015-06-14 21:17:01"
},
{
"name": "doctrine/lexer",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Lexer\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"lexer",
"parser"
],
"time": "2014-09-09 13:34:57"
},
{
"name": "doctrine/migrations",
"version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/migrations.git",
"reference": "c81147c0f2938a6566594455367e095150547f72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/migrations/zipball/c81147c0f2938a6566594455367e095150547f72",
"reference": "c81147c0f2938a6566594455367e095150547f72",
"shasum": ""
},
"require": {
"doctrine/dbal": "~2.2",
"ocramius/proxy-manager": "^1.0|^2.0",
"php": "^5.5|^7.0",
"symfony/console": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0"
},
"require-dev": {
"doctrine/coding-standard": "dev-master",
"doctrine/orm": "2.*",
"jdorn/sql-formatter": "~1.1",
"johnkary/phpunit-speedtrap": "~1.0@dev",
"mikey179/vfsstream": "^1.6",
"mockery/mockery": "^0.9.4",
"phpunit/phpunit": "~4.7",
"satooshi/php-coveralls": "^1.0"
},
"suggest": {
"jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command."
},
"bin": [
"bin/doctrine-migrations"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "v1.6.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Michael Simonson",
"email": "contact@mikesimonson.com"
}
],
"description": "Database Schema migrations using Doctrine DBAL",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database",
"migrations"
],
"time": "2016-12-25 22:54:00"
},
{
"name": "doctrine/orm",
"version": "v2.5.14",
"source": {
"type": "git",
"url": "https://github.com/doctrine/doctrine2.git",
"reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754",
"reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754",
"shasum": ""
},
"require": {
"doctrine/cache": "~1.4",
"doctrine/collections": "~1.2",
"doctrine/common": ">=2.5-dev,<2.9-dev",
"doctrine/dbal": ">=2.5-dev,<2.7-dev",
"doctrine/instantiator": "^1.0.1",
"ext-pdo": "*",
"php": ">=5.4",
"symfony/console": "~2.5|~3.0|~4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"symfony/yaml": "~2.3|~3.0|~4.0"
},
"suggest": {
"symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
},
"bin": [
"bin/doctrine",
"bin/doctrine.php"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\ORM\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
}
],
"description": "Object-Relational-Mapper for PHP",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database",
"orm"
],
"time": "2017-12-17 02:57:51"
},
{
"name": "fig/link-util",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/link-util.git",
"reference": "1a07821801a148be4add11ab0603e4af55a72fac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/link-util/zipball/1a07821801a148be4add11ab0603e4af55a72fac",
"reference": "1a07821801a148be4add11ab0603e4af55a72fac",
"shasum": ""
},
"require": {
"php": ">=5.5.0",
"psr/link": "~1.0@dev"
},
"require-dev": {
"phpunit/phpunit": "^5.1",
"squizlabs/php_codesniffer": "^2.3.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Fig\\Link\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common utility implementations for HTTP links",
"keywords": [
"http",
"http-link",
"link",
"psr",
"psr-13",
"rest"
],
"time": "2016-10-17 18:31:11"
},
{
"name": "gregwar/captcha",
"version": "v1.1.7",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/Captcha.git",
"reference": "cf953dd79748406e0292cea8c565399681e4d345"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/Captcha/zipball/cf953dd79748406e0292cea8c565399681e4d345",
"reference": "cf953dd79748406e0292cea8c565399681e4d345",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-mbstring": "*",
"php": ">=5.3.0",
"symfony/finder": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "captcha",
"autoload": {
"psr-4": {
"Gregwar\\": "src/Gregwar"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Passault",
"email": "g.passault@gmail.com",
"homepage": "http://www.gregwar.com/"
},
{
"name": "Jeremy Livingston",
"email": "jeremy.j.livingston@gmail.com"
}
],
"description": "Captcha generator",
"homepage": "https://github.com/Gregwar/Captcha",
"keywords": [
"bot",
"captcha",
"spam"
],
"time": "2018-08-17 22:57:28"
},
{
"name": "gregwar/captcha-bundle",
"version": "v2.0.6",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/CaptchaBundle.git",
"reference": "c2d5468556890dd25e0b53bd345fc205562c86f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/CaptchaBundle/zipball/c2d5468556890dd25e0b53bd345fc205562c86f7",
"reference": "c2d5468556890dd25e0b53bd345fc205562c86f7",
"shasum": ""
},
"require": {
"gregwar/captcha": "~1.1",
"php": ">=5.3.9",
"symfony/form": "~2.8|~3.0|~4.0",
"symfony/framework-bundle": "~2.8|~3.0|~4.0"
},
"type": "captcha-bundle",
"autoload": {
"psr-4": {
"Gregwar\\CaptchaBundle\\": "/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Passault",
"email": "g.passault@gmail.com",
"homepage": "http://www.gregwar.com/"
},
{
"name": "Jeremy Livingston",
"email": "jeremy.j.livingston@gmail.com"
}
],
"description": "Captcha bundle",
"homepage": "https://github.com/Gregwar/CaptchaBundle",
"keywords": [
"Symfony2",
"bot",
"captcha",
"code",
"security",
"spam",
"visual"
],
"time": "2018-11-20 10:41:34"
},
{
"name": "incenteev/composer-parameter-handler",
"version": "v2.1.3",
"source": {
"type": "git",
"url": "https://github.com/Incenteev/ParameterHandler.git",
"reference": "933c45a34814f27f2345c11c37d46b3ca7303550"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/933c45a34814f27f2345c11c37d46b3ca7303550",
"reference": "933c45a34814f27f2345c11c37d46b3ca7303550",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/yaml": "^2.3 || ^3.0 || ^4.0"
},
"require-dev": {
"composer/composer": "^1.0@dev",
"symfony/filesystem": "^2.3 || ^3 || ^4",
"symfony/phpunit-bridge": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Incenteev\\ParameterHandler\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christophe Coevoet",
"email": "stof@notk.org"
}
],
"description": "Composer script handling your ignored parameter file",
"homepage": "https://github.com/Incenteev/ParameterHandler",
"keywords": [
"parameters management"
],
"time": "2018-02-13 18:05:56"
},
{
"name": "jdorn/sql-formatter",
"version": "v1.2.17",
"source": {
"type": "git",
"url": "https://github.com/jdorn/sql-formatter.git",
"reference": "64990d96e0959dff8e059dfcdc1af130728d92bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc",
"reference": "64990d96e0959dff8e059dfcdc1af130728d92bc",
"shasum": ""
},
"require": {
"php": ">=5.2.4"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"classmap": [
"lib"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeremy Dorn",
"email": "jeremy@jeremydorn.com",
"homepage": "http://jeremydorn.com/"
}
],
"description": "a PHP SQL highlighting library",
"homepage": "https://github.com/jdorn/sql-formatter/",
"keywords": [
"highlight",
"sql"
],
"time": "2014-01-12 16:20:24"
},
{
"name": "kriswallsmith/assetic",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/kriswallsmith/assetic.git",
"reference": "e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1",
"reference": "e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1",
"shasum": ""
},
"require": {
"php": ">=5.3.1",
"symfony/process": "~2.1|~3.0"
},
"conflict": {
"twig/twig": "<1.27"
},
"require-dev": {
"leafo/lessphp": "^0.3.7",
"leafo/scssphp": "~0.1",
"meenie/javascript-packer": "^1.1",
"mrclay/minify": "<2.3",
"natxet/cssmin": "3.0.4",
"patchwork/jsqueeze": "~1.0|~2.0",
"phpunit/phpunit": "~4.8 || ^5.6",
"psr/log": "~1.0",
"ptachoire/cssembed": "~1.0",
"symfony/phpunit-bridge": "~2.7|~3.0",
"twig/twig": "~1.23|~2.0",
"yfix/packager": "dev-master"
},
"suggest": {
"leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
"leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
"leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin",
"patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor",
"ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris",
"twig/twig": "Assetic provides the integration with the Twig templating engine"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-0": {
"Assetic": "src/"
},
"files": [
"src/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kris Wallsmith",
"email": "kris.wallsmith@gmail.com",
"homepage": "http://kriswallsmith.net/"
}
],
"description": "Asset Management for PHP",
"homepage": "https://github.com/kriswallsmith/assetic",
"keywords": [
"assets",
"compression",
"minification"
],
"time": "2016-11-11 18:43:20"
},
{
"name": "monolog/monolog",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"jakub-onderka/php-parallel-lint": "0.9",
"php-amqplib/php-amqplib": "~2.4",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"sentry/sentry": "Allow sending log messages to a Sentry server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2018-11-05 09:00:11"
},
{
"name": "ocramius/package-versions",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/Ocramius/PackageVersions.git",
"reference": "ad8a245decad4897cc6b432743913dad0d69753c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/ad8a245decad4897cc6b432743913dad0d69753c",
"reference": "ad8a245decad4897cc6b432743913dad0d69753c",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0",
"php": "~7.0"
},
"require-dev": {
"composer/composer": "^1.3",
"ext-zip": "*",
"humbug/humbug": "dev-master",
"phpunit/phpunit": "^6.4"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2017-11-24 11:07:03"
},
{
"name": "ocramius/proxy-manager",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/Ocramius/ProxyManager.git",
"reference": "a55d08229f4f614bf335759ed0cf63378feeb2e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/a55d08229f4f614bf335759ed0cf63378feeb2e6",
"reference": "a55d08229f4f614bf335759ed0cf63378feeb2e6",
"shasum": ""
},
"require": {
"ocramius/package-versions": "^1.0",
"php": "7.0.0 - 7.0.5 || ^7.0.7",
"zendframework/zend-code": "3.0.0 - 3.0.2 || ^3.0.4"
},
"require-dev": {
"couscous/couscous": "^1.4.0",
"ext-phar": "*",
"phpbench/phpbench": "^0.11.2",
"phpunit/phpunit": "^5.4.6",
"squizlabs/php_codesniffer": "^2.6.0"
},
"suggest": {
"ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects",
"zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)",
"zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)",
"zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"autoload": {
"psr-0": {
"ProxyManager\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "http://ocramius.github.io/"
}
],
"description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies",
"homepage": "https://github.com/Ocramius/ProxyManager",
"keywords": [
"aop",
"lazy loading",
"proxy",
"proxy pattern",
"service proxies"
],
"time": "2016-11-04 15:53:15"
},
{
"name": "oneup/uploader-bundle",
"version": "1.9.2",
"target-dir": "Oneup/UploaderBundle",
"source": {
"type": "git",
"url": "https://github.com/1up-lab/OneupUploaderBundle.git",
"reference": "a32bc98019abfd51531d08cc79be19f849d87b84"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/1up-lab/OneupUploaderBundle/zipball/a32bc98019abfd51531d08cc79be19f849d87b84",
"reference": "a32bc98019abfd51531d08cc79be19f849d87b84",
"shasum": ""
},
"require": {
"paragonie/random_compat": "^1.1|^2.0",
"php": ">=5.4",
"symfony/asset": "^2.4|^3.0",
"symfony/finder": "^2.4|^3.0",
"symfony/framework-bundle": "^2.4|^3.0",
"symfony/templating": "^2.4|^3.0",
"symfony/translation": "^2.4|^3.0"
},
"require-dev": {
"amazonwebservices/aws-sdk-for-php": "1.5.*",
"knplabs/gaufrette": "0.2.*@dev",
"oneup/flysystem-bundle": "^1.2",
"phpunit/phpunit": "^4.4",
"sensio/framework-extra-bundle": "2.*|^3.0",
"symfony/browser-kit": "2.*|^3.0",
"symfony/class-loader": "2.*|^3.0",
"symfony/security-bundle": "2.*|^3.0",
"twistor/flysystem-stream-wrapper": "^1.0"
},
"suggest": {
"knplabs/knp-gaufrette-bundle": "0.1.*",
"oneup/flysystem-bundle": "^1.2",
"twistor/flysystem-stream-wrapper": "^1.0 (Required when using Flysystem)"
},
"type": "symfony-bundle",
"autoload": {
"psr-0": {
"Oneup\\UploaderBundle": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jim Schmid",
"email": "js@1up.io",
"homepage": "http://1up.io",
"role": "Developer"
}
],
"description": "Handles multi file uploads in Symfony2. Features included: Chunked upload, Orphans management, Gaufrette support.",
"homepage": "http://1up.io",
"keywords": [
"FancyUpload",
"FineUploader",
"MooUpload",
"Uploadify",
"YUI3 Uploader",
"blueimp",
"dropzone",
"fileupload",
"jQuery File Uploader",
"plupload",
"upload"
],
"time": "2017-12-18 12:41:59"
},
{
"name": "paragonie/random_compat",
"version": "v2.0.17",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d",
"reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
"autoload": {
"files": [
"lib/random.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
],
"time": "2018-07-04 16:31:37"
},
{
"name": "psr/cache",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Cache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
"keywords": [
"cache",
"psr",
"psr-6"
],
"time": "2016-08-06 20:24:11"
},
{
"name": "psr/container",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
"homepage": "https://github.com/php-fig/container",
"keywords": [
"PSR-11",
"container",
"container-interface",
"container-interop",
"psr"
],
"time": "2017-02-14 16:28:37"
},
{
"name": "psr/link",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/link.git",
"reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562",
"reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Link\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for HTTP links",
"keywords": [
"http",
"http-link",
"link",
"psr",
"psr-13",
"rest"
],
"time": "2016-10-28 16:06:13"
},
{
"name": "psr/log",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2018-11-20 15:27:04"
},
{
"name": "psr/simple-cache",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"time": "2017-10-23 01:57:42"
},
{
"name": "ramsey/uuid",
"version": "3.8.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3",
"reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3",
"shasum": ""
},
"require": {
"paragonie/random_compat": "^1.0|^2.0|9.99.99",
"php": "^5.4 || ^7.0",
"symfony/polyfill-ctype": "^1.8"
},
"replace": {
"rhumsaa/uuid": "self.version"
},
"require-dev": {
"codeception/aspect-mock": "^1.0 | ~2.0.0",
"doctrine/annotations": "~1.2.0",
"goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0",
"ircmaxell/random-lib": "^1.1",
"jakub-onderka/php-parallel-lint": "^0.9.0",
"mockery/mockery": "^0.9.9",
"moontoast/math": "^1.1",
"php-mock/php-mock-phpunit": "^0.3|^1.1",
"phpunit/phpunit": "^4.7|^5.0|^6.5",
"squizlabs/php_codesniffer": "^2.3"
},
"suggest": {
"ext-ctype": "Provides support for PHP Ctype functions",
"ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator",
"ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator",
"ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
"moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).",
"ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid",
"ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Ramsey\\Uuid\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marijn Huizendveld",
"email": "marijn.huizendveld@gmail.com"
},
{
"name": "Thibaud Fabre",
"email": "thibaud@aztech.io"
},
{
"name": "Ben Ramsey",
"email": "ben@benramsey.com",
"homepage": "https://benramsey.com"
}
],
"description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
"homepage": "https://github.com/ramsey/uuid",
"keywords": [
"guid",
"identifier",
"uuid"
],
"time": "2018-07-19 23:38:55"
},
{
"name": "sensio/distribution-bundle",
"version": "v5.0.23",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioDistributionBundle.git",
"reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6",
"reference": "088b116a0e27faa0e1a7384dd4f3f6a9d5a8a3b6",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
"sensiolabs/security-checker": "~5.0",
"symfony/class-loader": "~2.3|~3.0",
"symfony/config": "~2.3|~3.0",
"symfony/dependency-injection": "~2.3|~3.0",
"symfony/filesystem": "~2.3|~3.0",
"symfony/http-kernel": "~2.3|~3.0",
"symfony/process": "~2.3|~3.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Sensio\\Bundle\\DistributionBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Base bundle for Symfony Distributions",
"keywords": [
"configuration",
"distribution"
],
"time": "2018-10-25 15:26:23"
},
{
"name": "sensio/framework-extra-bundle",
"version": "v5.2.2",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
"reference": "9ef408febe2f12e70118ef61c6515035a06c5830"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9ef408febe2f12e70118ef61c6515035a06c5830",
"reference": "9ef408febe2f12e70118ef61c6515035a06c5830",
"shasum": ""
},
"require": {
"doctrine/common": "^2.2",
"symfony/config": "^3.3|^4.0",
"symfony/dependency-injection": "^3.3|^4.0",
"symfony/framework-bundle": "^3.4|^4.0",
"symfony/http-kernel": "^3.3|^4.0"
},
"require-dev": {
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"symfony/browser-kit": "^3.3|^4.0",
"symfony/dom-crawler": "^3.3|^4.0",
"symfony/expression-language": "^3.3|^4.0",
"symfony/finder": "^3.3|^4.0",
"symfony/monolog-bridge": "^3.0|^4.0",
"symfony/monolog-bundle": "^3.2",
"symfony/phpunit-bridge": "^3.3|^4.0",
"symfony/psr-http-message-bridge": "^0.3",
"symfony/security-bundle": "^3.3|^4.0",
"symfony/twig-bundle": "^3.3|^4.0",
"symfony/yaml": "^3.3|^4.0",
"twig/twig": "~1.12|~2.0",
"zendframework/zend-diactoros": "^1.3"
},
"suggest": {
"symfony/expression-language": "",
"symfony/psr-http-message-bridge": "To use the PSR-7 converters",
"symfony/security-bundle": ""
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "5.2.x-dev"
}
},
"autoload": {
"psr-4": {
"Sensio\\Bundle\\FrameworkExtraBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "This bundle provides a way to configure your controllers with annotations",
"keywords": [
"annotations",
"controllers"
],
"time": "2018-10-26 14:09:02"
},
{
"name": "sensiolabs/security-checker",
"version": "v5.0.1",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/security-checker.git",
"reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/9ea927417c949039a9cfb0d92af76fd1c538d9e9",
"reference": "9ea927417c949039a9cfb0d92af76fd1c538d9e9",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"php": ">=5.5.9",
"symfony/console": "~2.7|~3.0|~4.0"
},
"bin": [
"security-checker"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"SensioLabs\\Security\\": "SensioLabs/Security"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien.potencier@gmail.com"
}
],
"description": "A security checker for your composer.lock",
"time": "2018-10-16 10:30:44"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v5.4.12",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "181b89f18a90f8925ef805f950d47a7190e9b950"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/181b89f18a90f8925ef805f950d47a7190e9b950",
"reference": "181b89f18a90f8925ef805f950d47a7190e9b950",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"mockery/mockery": "~0.9.1",
"symfony/phpunit-bridge": "~3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.4-dev"
}
},
"autoload": {
"files": [
"lib/swift_required.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chris Corbyn"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Swiftmailer, free feature-rich PHP mailer",
"homepage": "https://swiftmailer.symfony.com",
"keywords": [
"email",
"mail",
"mailer"
],
"time": "2018-07-31 09:26:32"
},
{
"name": "symfony/assetic-bundle",
"version": "v2.8.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/assetic-bundle.git",
"reference": "2e0a23a4874838e26de6f025e02fc63328921a4c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/assetic-bundle/zipball/2e0a23a4874838e26de6f025e02fc63328921a4c",
"reference": "2e0a23a4874838e26de6f025e02fc63328921a4c",
"shasum": ""
},
"require": {
"kriswallsmith/assetic": "~1.4",
"php": ">=5.3.0",
"symfony/console": "~2.3|~3.0",
"symfony/dependency-injection": "~2.3|~3.0",
"symfony/framework-bundle": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0"
},
"conflict": {
"kriswallsmith/spork": "<=0.2",
"twig/twig": "<1.27"
},
"require-dev": {
"kriswallsmith/spork": "~0.3",
"patchwork/jsqueeze": "~1.0",
"symfony/class-loader": "~2.3|~3.0",
"symfony/css-selector": "~2.3|~3.0",
"symfony/dom-crawler": "~2.3|~3.0",
"symfony/phpunit-bridge": "~2.7|~3.0",
"symfony/twig-bundle": "~2.3|~3.0"
},
"suggest": {
"kriswallsmith/spork": "to be able to dump assets in parallel",
"symfony/twig-bundle": "to use the Twig integration"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\AsseticBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kris Wallsmith",
"email": "kris.wallsmith@gmail.com",
"homepage": "http://kriswallsmith.net/"
}
],
"description": "Integrates Assetic into Symfony2",
"homepage": "https://github.com/symfony/AsseticBundle",
"keywords": [
"assets",
"compression",
"minification"
],
"time": "2017-07-14 07:26:46"
},
{
"name": "symfony/monolog-bundle",
"version": "v3.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bundle.git",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff",
"reference": "572e143afc03419a75ab002c80a2fd99299195ff",
"shasum": ""
},
"require": {
"monolog/monolog": "~1.22",
"php": ">=5.6",
"symfony/config": "~2.7|~3.3|~4.0",
"symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10",
"symfony/http-kernel": "~2.7|~3.3|~4.0",
"symfony/monolog-bridge": "~2.7|~3.3|~4.0"
},
"require-dev": {
"symfony/console": "~2.7|~3.3|~4.0",
"symfony/phpunit-bridge": "^3.3|^4.0",
"symfony/yaml": "~2.7|~3.3|~4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\MonologBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony MonologBundle",
"homepage": "http://symfony.com",
"keywords": [
"log",
"logging"
],
"time": "2018-11-04 09:58:13"
},
{
"name": "symfony/orm-pack",
"version": "v1.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/orm-pack.git",
"reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/orm-pack/zipball/1b58f752cd917a08c9c8df020781d9c46a2275b1",
"reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1",
"shasum": ""
},
"require": {
"doctrine/doctrine-bundle": "^1.6.10",
"doctrine/doctrine-migrations-bundle": "^1.3",
"doctrine/orm": "^2.5.11",
"php": "^7.0"
},
"type": "symfony-pack",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A pack for the Doctrine ORM",
"time": "2017-12-12 01:47:50"
},
{
"name": "symfony/polyfill-apcu",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-apcu.git",
"reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/19e1b73bf255265ad0b568f81766ae2a3266d8d2",
"reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Apcu\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting apcu_* functions to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"apcu",
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2018-08-06 14:22:27"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"time": "2018-08-06 14:22:27"
},
{
"name": "symfony/polyfill-intl-icu",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-icu.git",
"reference": "f22a90256d577c7ef7efad8df1f0201663d57644"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/f22a90256d577c7ef7efad8df1f0201663d57644",
"reference": "f22a90256d577c7ef7efad8df1f0201663d57644",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/intl": "~2.3|~3.0|~4.0"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's ICU-related data and classes",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"icu",
"intl",
"polyfill",
"portable",
"shim"
],
"time": "2018-08-06 14:22:27"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2018-09-21 13:07:52"
},
{
"name": "symfony/polyfill-php56",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php56.git",
"reference": "ff208829fe1aa48ab9af356992bb7199fed551af"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ff208829fe1aa48ab9af356992bb7199fed551af",
"reference": "ff208829fe1aa48ab9af356992bb7199fed551af",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/polyfill-util": "~1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php56\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2018-09-21 06:26:08"
},
{
"name": "symfony/polyfill-php70",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "6b88000cdd431cd2e940caa2cb569201f3f84224"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224",
"reference": "6b88000cdd431cd2e940caa2cb569201f3f84224",
"shasum": ""
},
"require": {
"paragonie/random_compat": "~1.0|~2.0|~9.99",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2018-09-21 06:26:08"
},
{
"name": "symfony/polyfill-util",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-util.git",
"reference": "3b58903eae668d348a7126f999b0da0f2f93611c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/3b58903eae668d348a7126f999b0da0f2f93611c",
"reference": "3b58903eae668d348a7126f999b0da0f2f93611c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Util\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony utilities for portability of PHP codes",
"homepage": "https://symfony.com",
"keywords": [
"compat",
"compatibility",
"polyfill",
"shim"
],
"time": "2018-09-30 16:36:12"
},
{
"name": "symfony/swiftmailer-bundle",
"version": "v2.6.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/swiftmailer-bundle.git",
"reference": "c4808f5169efc05567be983909d00f00521c53ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/c4808f5169efc05567be983909d00f00521c53ec",
"reference": "c4808f5169efc05567be983909d00f00521c53ec",
"shasum": ""
},
"require": {
"php": ">=5.3.2",
"swiftmailer/swiftmailer": "~4.2|~5.0",
"symfony/config": "~2.7|~3.0",
"symfony/dependency-injection": "~2.7|~3.0",
"symfony/http-kernel": "~2.7|~3.0"
},
"require-dev": {
"symfony/console": "~2.7|~3.0",
"symfony/framework-bundle": "~2.7|~3.0",
"symfony/phpunit-bridge": "~3.3@dev",
"symfony/yaml": "~2.7|~3.0"
},
"suggest": {
"psr/log": "Allows logging"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\SwiftmailerBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony SwiftmailerBundle",
"homepage": "http://symfony.com",
"time": "2017-10-19 01:06:41"
},
{
"name": "symfony/symfony",
"version": "v3.4.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/symfony.git",
"reference": "a8ff5a534372763544031ae68c981d396ffeb43f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/symfony/zipball/a8ff5a534372763544031ae68c981d396ffeb43f",
"reference": "a8ff5a534372763544031ae68c981d396ffeb43f",
"shasum": ""
},
"require": {
"doctrine/common": "~2.4",
"ext-xml": "*",
"fig/link-util": "^1.0",
"php": "^5.5.9|>=7.0.8",
"psr/cache": "~1.0",
"psr/container": "^1.0",
"psr/link": "^1.0",
"psr/log": "~1.0",
"psr/simple-cache": "^1.0",
"symfony/polyfill-apcu": "~1.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php56": "~1.0",
"symfony/polyfill-php70": "~1.6",
"twig/twig": "^1.35|^2.4.4"
},
"conflict": {
"phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2",
"phpdocumentor/type-resolver": "<0.3.0",
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
"provide": {
"psr/cache-implementation": "1.0",
"psr/container-implementation": "1.0",
"psr/log-implementation": "1.0",
"psr/simple-cache-implementation": "1.0"
},
"replace": {
"symfony/asset": "self.version",
"symfony/browser-kit": "self.version",
"symfony/cache": "self.version",
"symfony/class-loader": "self.version",
"symfony/config": "self.version",
"symfony/console": "self.version",
"symfony/css-selector": "self.version",
"symfony/debug": "self.version",
"symfony/debug-bundle": "self.version",
"symfony/dependency-injection": "self.version",
"symfony/doctrine-bridge": "self.version",
"symfony/dom-crawler": "self.version",
"symfony/dotenv": "self.version",
"symfony/event-dispatcher": "self.version",
"symfony/expression-language": "self.version",
"symfony/filesystem": "self.version",
"symfony/finder": "self.version",
"symfony/form": "self.version",
"symfony/framework-bundle": "self.version",
"symfony/http-foundation": "self.version",
"symfony/http-kernel": "self.version",
"symfony/inflector": "self.version",
"symfony/intl": "self.version",
"symfony/ldap": "self.version",
"symfony/lock": "self.version",
"symfony/monolog-bridge": "self.version",
"symfony/options-resolver": "self.version",
"symfony/process": "self.version",
"symfony/property-access": "self.version",
"symfony/property-info": "self.version",
"symfony/proxy-manager-bridge": "self.version",
"symfony/routing": "self.version",
"symfony/security": "self.version",
"symfony/security-bundle": "self.version",
"symfony/security-core": "self.version",
"symfony/security-csrf": "self.version",
"symfony/security-guard": "self.version",
"symfony/security-http": "self.version",
"symfony/serializer": "self.version",
"symfony/stopwatch": "self.version",
"symfony/templating": "self.version",
"symfony/translation": "self.version",
"symfony/twig-bridge": "self.version",
"symfony/twig-bundle": "self.version",
"symfony/validator": "self.version",
"symfony/var-dumper": "self.version",
"symfony/web-link": "self.version",
"symfony/web-profiler-bundle": "self.version",
"symfony/web-server-bundle": "self.version",
"symfony/workflow": "self.version",
"symfony/yaml": "self.version"
},
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.6",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.4",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "~2.4,>=2.4.5",
"egulias/email-validator": "~1.2,>=1.2.8|~2.0",
"monolog/monolog": "~1.11",
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
"predis/predis": "~1.0",
"symfony/phpunit-bridge": "~3.4|~4.0",
"symfony/security-acl": "~2.8|~3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
"Symfony\\Bundle\\": "src/Symfony/Bundle/",
"Symfony\\Component\\": "src/Symfony/Component/"
},
"classmap": [
"src/Symfony/Component/Intl/Resources/stubs"
],
"exclude-from-classmap": [
"**/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "The Symfony PHP framework",
"homepage": "https://symfony.com",
"keywords": [
"framework"
],
"time": "2018-11-26 14:07:44"
},
{
"name": "tetranz/select2entity-bundle",
"version": "v2.9.5",
"target-dir": "Tetranz/Select2EntityBundle",
"source": {
"type": "git",
"url": "https://github.com/tetranz/select2entity-bundle.git",
"reference": "c57281f4af06ca0c7e74c27fcc4bf8c95a1beaad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tetranz/select2entity-bundle/zipball/c57281f4af06ca0c7e74c27fcc4bf8c95a1beaad",
"reference": "c57281f4af06ca0c7e74c27fcc4bf8c95a1beaad",
"shasum": ""
},
"require": {
"doctrine/orm": ">=2.4",
"php": ">=5.4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": []
},
"autoload": {
"psr-0": {
"Tetranz\\Select2EntityBundle": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ross Keatinge",
"email": "tetranz@gmail.com"
}
],
"description": "A Symfony2 bundle that integrates Select2 as a drop-in replacement for a standard entity field on a Symfony form.",
"keywords": [
"autocomplete",
"select2",
"symfony",
"typeahead"
],
"time": "2018-03-05 02:52:46"
},
{
"name": "twig/twig",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "6a5f676b77a90823c2d4eaf76137b771adf31323"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323",
"reference": "6a5f676b77a90823c2d4eaf76137b771adf31323",
"shasum": ""
},
"require": {
"php": "^7.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"psr/container": "^1.0",
"symfony/debug": "^2.7",
"symfony/phpunit-bridge": "^3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Twig_": "lib/"
},
"psr-4": {
"Twig\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
},
{
"name": "Twig Team",
"homepage": "https://twig.symfony.com/contributors",
"role": "Contributors"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
"homepage": "https://twig.symfony.com",
"keywords": [
"templating"
],
"time": "2018-07-13 07:18:09"
},
{
"name": "zendframework/zend-code",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-code.git",
"reference": "2899c17f83a7207f2d7f53ec2f421204d3beea27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-code/zipball/2899c17f83a7207f2d7f53ec2f421204d3beea27",
"reference": "2899c17f83a7207f2d7f53ec2f421204d3beea27",
"shasum": ""
},
"require": {
"php": "^5.6 || 7.0.0 - 7.0.4 || ^7.0.6",
"zendframework/zend-eventmanager": "^2.6 || ^3.0"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"ext-phar": "*",
"phpunit/phpunit": "^4.8.21",
"squizlabs/php_codesniffer": "^2.5",
"zendframework/zend-stdlib": "^2.7 || ^3.0"
},
"suggest": {
"doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
"zendframework/zend-stdlib": "Zend\\Stdlib component"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev",
"dev-develop": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Code\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "provides facilities to generate arbitrary code using an object oriented interface",
"homepage": "https://github.com/zendframework/zend-code",
"keywords": [
"code",
"zf2"
],
"time": "2016-10-24 13:23:32"
},
{
"name": "zendframework/zend-eventmanager",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-eventmanager.git",
"reference": "a5e2583a211f73604691586b8406ff7296a946dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd",
"reference": "a5e2583a211f73604691586b8406ff7296a946dd",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"athletic/athletic": "^0.1",
"container-interop/container-interop": "^1.1.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-stdlib": "^2.7.3 || ^3.0"
},
"suggest": {
"container-interop/container-interop": "^1.1.0, to use the lazy listeners feature",
"zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev",
"dev-develop": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\EventManager\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Trigger and listen to events within a PHP application",
"homepage": "https://github.com/zendframework/zend-eventmanager",
"keywords": [
"event",
"eventmanager",
"events",
"zf2"
],
"time": "2018-04-25 15:33:34"
}
],
"packages-dev": [
{
"name": "nikic/php-parser",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "d0230c5c77a7e3cfa69446febf340978540958c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0",
"reference": "d0230c5c77a7e3cfa69446febf340978540958c0",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5 || ^7.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"time": "2018-10-10 09:24:14"
},
{
"name": "sensio/generator-bundle",
"version": "v3.1.7",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioGeneratorBundle.git",
"reference": "28cbaa244bd0816fd8908b93f90380bcd7b67a65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/28cbaa244bd0816fd8908b93f90380bcd7b67a65",
"reference": "28cbaa244bd0816fd8908b93f90380bcd7b67a65",
"shasum": ""
},
"require": {
"symfony/console": "~2.7|~3.0",
"symfony/framework-bundle": "~2.7|~3.0",
"symfony/process": "~2.7|~3.0",
"symfony/yaml": "~2.7|~3.0",
"twig/twig": "^1.28.2|^2.0"
},
"require-dev": {
"doctrine/orm": "~2.4",
"symfony/doctrine-bridge": "~2.7|~3.0",
"symfony/filesystem": "~2.7|~3.0",
"symfony/phpunit-bridge": "^3.3"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Sensio\\Bundle\\GeneratorBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "This bundle generates code for you",
"time": "2017-12-07 15:36:41"
},
{
"name": "symfony/maker-bundle",
"version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/maker-bundle.git",
"reference": "e873047b6022a0343c9354f65d5d47b9e351dd53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/maker-bundle/zipball/e873047b6022a0343c9354f65d5d47b9e351dd53",
"reference": "e873047b6022a0343c9354f65d5d47b9e351dd53",
"shasum": ""
},
"require": {
"doctrine/inflector": "^1.2",
"nikic/php-parser": "^4.0",
"php": "^7.0.8",
"symfony/config": "^3.4|^4.0",
"symfony/console": "^3.4|^4.0",
"symfony/dependency-injection": "^3.4|^4.0",
"symfony/filesystem": "^3.4|^4.0",
"symfony/finder": "^3.4|^4.0",
"symfony/framework-bundle": "^3.4|^4.0",
"symfony/http-kernel": "^3.4|^4.0"
},
"require-dev": {
"allocine/twigcs": "^3.0",
"doctrine/doctrine-bundle": "^1.8",
"doctrine/orm": "^2.3",
"friendsofphp/php-cs-fixer": "^2.8",
"symfony/phpunit-bridge": "^3.4|^4.0",
"symfony/process": "^3.4|^4.0",
"symfony/yaml": "^3.4|^4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\MakerBundle\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.",
"homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html",
"keywords": [
"code generator",
"generator",
"scaffold",
"scaffolding"
],
"time": "2018-11-03 18:25:11"
},
{
"name": "symfony/phpunit-bridge",
"version": "v3.4.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git",
"reference": "2155067dfc73e0e77dbc26f236af17e4df552de5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2155067dfc73e0e77dbc26f236af17e4df552de5",
"reference": "2155067dfc73e0e77dbc26f236af17e4df552de5",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
"suggest": {
"ext-zip": "Zip support is required when using bin/simple-phpunit",
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"bin": [
"bin/simple-phpunit"
],
"type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
},
"thanks": {
"name": "phpunit/phpunit",
"url": "https://github.com/sebastianbergmann/phpunit"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Bridge\\PhpUnit\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony PHPUnit Bridge",
"homepage": "https://symfony.com",
"time": "2018-11-20 16:47:12"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7"
},
"platform-dev": [],
"platform-overrides": {
"php": "7.0.30"
}
}

12
src/cadolesuser-1.0/perm.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
group=$2
if [ -z $group ]
then
group=$1
fi
sudo chown $1:$group /var/www/html/cadolesuser -R
sudo chmod +w /var/www/html/cadolesuser -R
sudo chmod g+rw /var/www/html/cadolesuser -R

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_CLASS" value="AppKernel" />
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src</directory>
<exclude>
<directory>src/*Bundle/Resources</directory>
<directory>src/*/*Bundle/Resources</directory>
<directory>src/*/Bundle/*Bundle/Resources</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

View File

View File

@ -0,0 +1,4 @@
#!/bin/bash
cd /var/www/html/cadolesuser
php bin/console Core:Cron

View File

@ -0,0 +1,4 @@
#!/bin/bash
cd /var/www/html/cadolesuser
php bin/console swiftmailer:spool:send --message-limit=100 --env=prod

View File

@ -0,0 +1,8 @@
#!/bin/bash
export HTTP_PROXY="192.168.57.160:8080"
export HTTPS_PROXY="192.168.57.160:8080"
cd /var/www/html/cadolesuser
scripts/cadolesuser-postservice-01.sh

View File

@ -0,0 +1,69 @@
#!/bin/bash
activer_eportail=$(CreoleGet activer_eportail non)
moderegistration=$(CreoleGet cadolesuser_moderegistration none)
labelsniveau01=$(CreoleGet cadolesuser_niveau01labels non)
iconniveau01=$(CreoleGet cadolesuser_niveau01icon non)
affniveau02=$(CreoleGet cadolesuser_niveau02view non)
labelsniveau02=$(CreoleGet cadolesuser_niveau02labels non)
iconniveau02=$(CreoleGet cadolesuser_niveau02icon non)
www_dir="$container_path_web/var/www/html"
eportail_dir="$www_dir/eportail"
# Installation des dépendances composer
composer install
# Permissions
./perm.sh www-data
# Nettoyage du cache
php bin/console cache:clear --env=prod --no-debug
# Migration si nécessaire du schéma de la base
php bin/console doctrine:schema:update --force --env=prod --no-debug
# Insertion data de base
php bin/console Core:InitData
# Generation des assets
bin/console --env=dev assetic:dump
# Pointer le repertoire des avatar d'eportail sur celui de draaf
# Paramétrage eportail
if [[ "$activer_eportail" = 'oui' ]]
then
if [[ ! -L /var/www/html/eportail/local/images/avatar ]]
then
rm -rf /var/www/html/eportail/local/images/avatar
ln -s /var/www/html/cadolesuser/web/uploads/avatar /var/www/html/eportail/local/images/avatar
fi
fi
# Permissions
./perm.sh www-data
# Paramétrage eportail
if [[ "$activer_eportail" = 'oui' ]]
then
echo "<?" > $eportail_dir/local/config/externe.php
echo "\$config['modeUserExterne'] = 'true';" >> $eportail_dir/local/config/externe.php
echo "\$config['affResgistrationExterne'] = '$moderegistration';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlRegistrationExterne'] = '/cadolesuser/registration';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlConfigRegistrationExterne'] = '/cadolesuser/config/registration';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlWhitelistExterne'] = '/cadolesuser/config/whitelist';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlNiveau01Externe'] = '/cadolesuser/config/niveau01';" >> $eportail_dir/local/config/externe.php
echo "\$config['labNiveau01Externe'] = '$labelsniveau01';" >> $eportail_dir/local/config/externe.php
echo "\$config['icoNiveau01Externe'] = '$iconniveau01';" >> $eportail_dir/local/config/externe.php
echo "\$config['affNiveau02Externe'] = '$affniveau02';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlNiveau02Externe'] = '/cadolesuser/config/niveau02';" >> $eportail_dir/local/config/externe.php
echo "\$config['labNiveau02Externe'] = '$labelsniveau02';" >> $eportail_dir/local/config/externe.php
echo "\$config['icoNiveau02Externe'] = '$iconniveau02';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlGroupeExterne'] = '/cadolesuser/config/group';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlProfilExterne'] = '/cadolesuser/profil';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlAnnuaireExterne'] = '/cadolesuser/profil/users';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlUserExterne'] = '/cadolesuser/config/user';" >> $eportail_dir/local/config/externe.php
echo "\$config['urlLogoutExterne'] = '/cadolesuser/kill?redirect=/eportail/logout.php';" >> $eportail_dir/local/config/externe.php
echo "?>" >> $eportail_dir/local/config/externe.php
fi

View File

@ -0,0 +1,7 @@
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

View File

@ -0,0 +1,9 @@
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}

View File

@ -0,0 +1,21 @@
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller
{
/**
* @Route("/", name="homepage")
*/
public function indexAction(Request $request)
{
// replace this example code with whatever you need
return $this->render('default/index.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
]);
}
}

View File

@ -0,0 +1,9 @@
<?php
namespace Cadoles\CoreBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class CadolesCoreBundle extends Bundle
{
}

View File

@ -0,0 +1,72 @@
<?php
namespace Cadoles\CoreBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\KernelInterface;
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Validator\Constraints\DateTime;
use Cadoles\CoreBundle\Entity\Registration;
class CronCommand extends Command
{
protected function configure()
{
$this
// the name of the command (the part after "bin/console")
->setName('Core:Cron')
// the short description shown while running "php bin/console list"
->setDescription('Tâches Cron')
// the full command description shown when running the command with
// the "--help" option
->setHelp('This command CRON for Core')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$kernel = new \AppKernel('dev', true);
$kernel->boot();
$kernel->loadClassCache();
$em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager');
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== CRON =============================================');
$output->writeln('=====================================================');
$now=new \DateTime('now');
$output->writeln('');
$output->writeln('== PURGE OBSOLETE REGISTRATION ======================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Registration','table')
->where('table.keyexpire<:now')
->setParameter("now",$now->format("Y-m-d H:i:s"))
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Inscription supprimée = '.$data->getkeyexpire()->format("Y-m-d H:i:s")." >> ".$data->getUsername());
$em->remove($data);
$em->flush();
}
$output->writeln('');
$output->writeln('');
}
protected static function determineKernelRootDir(Event $event) {
$extra = $event->getComposer()->getPackage()->getExtra();
$rootdir = rtrim(getcwd(), '/');
return $rootdir . '/' . trim($extra['symfony-app-dir'], '/');
}
}

View File

@ -0,0 +1,503 @@
<?php
namespace Cadoles\CoreBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\KernelInterface;
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\User;
use Cadoles\CoreBundle\Entity\Niveau01;
use Cadoles\CoreBundle\Entity\Niveau02;
global $bdd01;
global $config;
class ImportCommand extends Command
{
protected function configure()
{
$this
// the name of the command (the part after "bin/console")
->setName('Core:Import')
// the short description shown while running "php bin/console list"
->setDescription("Importation Utilisateur à partir d'un fichier CSV Annuaire")
// the full command description shown when running the command with
// the "--help" option
->setHelp('This command Import for Core')
->addArgument('simulate', InputArgument::OPTIONAL, 'true to simulate / false to run')
;
}
protected function convert($filename, $delimiter = ',', $enclosure = '"')
{
if(!file_exists($filename) || !is_readable($filename)) {
return FALSE;
}
$header = NULL;
$data = array();
if (($handle = fopen($filename, 'r')) !== FALSE) {
while (($row = fgetcsv($handle, 1000, $delimiter, $enclosure)) !== FALSE) {
if(!$header) {
$header = $row;
} else {
$data[] = array_combine($header, $row);
}
}
fclose($handle);
}
return $data;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$kernel = new \AppKernel('dev', true);
$kernel->boot();
$kernel->loadClassCache();
$em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager');
$simulate = $input->getArgument('simulate');
if($simulate=="") $simulate="true";
if($simulate!="true"&&$simulate!="false") {
$output->writeln('Paramétre incorrect');
return;
}
$simulate=($simulate=="true");
$output->writeln('');
if($simulate) $output->writeln('** SIMULATION');
else $output->writeln('** REEL');
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== IMPORT USERS =====================================');
$output->writeln('=====================================================');
// Read CSV
$fileName = 'src/Cadoles/CoreBundle/Command/import.csv';
// Convert
$datas = $this->convert($fileName);
foreach($datas as $row) {
if($row["uid"]!="") {
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('username' => $row["uid"]));
if($data) {
$output->writeln(' - Existe déjà >> '.$row["uid"]);
}
else {
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('email' => $row["mail"]));
if($data) {
$output->writeln(' - Existe déjà >> '.$row["uid"]);
}
else {
$output->writeln(' - Création Utilisateur >> '.$row["uid"]);
if(!$simulate) {
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->findOneBy(array("id"=>-100));
$user = new User();
$user->setUsername($row["uid"]);
$user->setPasswordDirect($row["userpassword"]);
$user->setSalt("IMPORT-".$row["uid"]);
$user->setNiveau01($niveau01);
$user->setSiren($user->getNiveau01()->getSiren());
$user->setSiret($user->getNiveau02()!==null?$user->getNiveau02()->getSiret():"");
$user->setAvatar("noavatar.png");
$user->setVisible(true);
$user->setAuthlevel("simple");
$user->setRole("ROLE_USER");
$user->setFirstname($row["givenname"]);
$user->setLastname($row["sn"]);
$user->setEmail($row["mail"]);
$em->persist($user);
$em->flush();
}
}
}
}
}
return;
$ldap = $kernel->getContainer()->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION BUNDLE TO LDAP ====================');
$output->writeln('=====================================================');
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$baseNiveau01 = $kernel->getContainer()->getParameter('ldap_baseniveau01');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau01','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseNiveau01;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyNiveau01($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addNiveau01($data);
}
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$baseNiveau02 = $kernel->getContainer()->getParameter('ldap_baseniveau02');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau02','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyNiveau02($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addNiveau02($data);
}
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyGroup($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addGroup($data);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$baseUser = $kernel->getContainer()->getParameter('ldap_baseuser');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:User','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(uid='.$data->getUsername().')';
$subbranch=$baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
// S'assurer que SIREN correspond au Niveau01
if($data->getNiveau01()->getSiren()!=$data->getSiren()) {
$data->SetSiren($data->getNiveau01()->getSiren());
$data->flush();
}
// S'assurer que SIRET correspond au Niveau02
if($data->getNiveau02()!==null&&$data->getNiveau01()->getSiren()!=$data->getSiren()) {
$data->SetSiret($data->getNiveau02()->getSiret());
$data->flush();
}
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getUsername());
if(!$simulate) $ldap->modifyUser($data);
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getUsername());
if(!$simulate) $ldap->addUser($data);
}
// Rattachement à Niveau01 et Niveau02
if(!$simulate) $ldap->addGroupUser($data);
}
$output->writeln('');
$output->writeln('== USER GROUP =======================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour des membres du groupes
if(count($results) > 0) {
$output->writeln(' - '.$data->getLabel());
$dn=$ldap->getGroupDN($data->getLabel());
$attrs["memberuid"]=array();
$attrs["cadolesMember"]=array();
foreach($data->getUsers() as $usergroupe) {
array_push($attrs["memberuid"],$usergroupe->getUser()->getUsername());
array_push($attrs["cadolesMember"],$ldap->getUserDN($usergroupe->getUser()));
$output->writeln(' > '.$usergroupe->getUser()->getUsername());
}
if(!$simulate) $ldap->ldapModify($dn, $attrs);
}
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION LDAP TO BUNDLE ====================');
$output->writeln('=====================================================');
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$baseNiveau01 = $kernel->getContainer()->getParameter('ldap_baseniveau01');
$criteria = '(cn=*)';
$subbranch=$baseNiveau01;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Niveau01')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getNiveau01DN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$baseNiveau02 = $kernel->getContainer()->getParameter('ldap_baseniveau02');
$criteria = '(cn=*)';
$subbranch=$baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Niveau02')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getNiveau02DN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$criteria = '(cn=*)';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Group')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getGroupDN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$baseUser = $kernel->getContainer()->getParameter('ldap_baseuser');
$criteria = '(uid=*)';
$subbranch=$baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('username' => $result["uid"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["uid"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["uid"]);
$dn='uid='.$result["uid"].','.$baseUser;
if(!$simulate) $ldap->deleteByDN($dn);
}
}
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION BUNDLE TO EPORTAIL ================');
$output->writeln('=====================================================');
$eportail = $kernel->getContainer()->get('cadoles.core.service.eportail');
if(!$eportail->isEnabled()) {
$output->writeln('');
$output->writeln(' Synchronisation ePortail désactivée');
}
else {
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau01','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncNiveau01($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau02','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncNiveau02($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncGroup($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== USER =============================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:User','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getUsername());
if(!$simulate) $eportail->syncUser($data);
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION EPORTAIL TO BUNDLE ================');
$output->writeln('=====================================================');
$dbeportail= $kernel->getContainer()->get('service_container')->get('doctrine.orm.eportail_entity_manager')->getConnection();
$output->writeln('');
$output->writeln('== GROUP ============================================');
$sql = "SELECT * FROM env_group WHERE group_id>0";
$query = $dbeportail->prepare($sql);
$query->execute();
while($row=$query->fetch()){
$fgOK=false;
if (strpos($row["group_name"], $labelniveau01.' = ') === 0) {
$tmp=str_replace("$labelniveau01 = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Niveau01')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if (strpos($row["group_name"], $labelniveau02.' = ') === 0) {
$tmp=str_replace("$labelniveau01 = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Niveau02')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if (strpos($row["group_name"], 'GROUPE = ') === 0) {
$tmp=str_replace("GROUPE = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Group')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if(!$fgOK) {
$output->writeln(' - A supprimer dans eportail >> '.$row["group_name"]);
if(!$simulate) delGroup($row["group_id"]);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$sql = "SELECT * FROM env_user WHERE user_id>0";
$query = $dbeportail->prepare($sql);
$query->execute();
while($row=$query->fetch()){
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('username' =>$row["user_login"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$row["user_login"]);
else {
$output->writeln(' - A supprimer dans eportail >> '.$row["user_login"]);
if(!$simulate) delUser($row["user_id"]);
}
}
}
$output->writeln('');
$output->writeln('');
}
protected static function determineKernelRootDir(Event $event) {
$extra = $event->getComposer()->getPackage()->getExtra();
$rootdir = rtrim(getcwd(), '/');
return $rootdir . '/' . trim($extra['symfony-app-dir'], '/');
}
}

View File

@ -0,0 +1,122 @@
<?php
namespace Cadoles\CoreBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\KernelInterface;
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Group;
use Cadoles\CoreBundle\Entity\UserGroup;
class InitDataCommand extends Command
{
protected function configure()
{
$this
// the name of the command (the part after "bin/console")
->setName('Core:InitData')
// the short description shown while running "php bin/console list"
->setDescription('Init Data for Core')
// the full command description shown when running the command with
// the "--help" option
->setHelp('This command Init Data for Core')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$kernel = new \AppKernel('dev', true);
$kernel->boot();
$kernel->loadClassCache();
$em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager');
$finder = new Finder();
$finder->in('src/Cadoles/CoreBundle/Command');
$output->writeln('Init Data for Core !');
// Init 01 = ce qui templetisé
$finder->name('core-init-01.sql');
foreach( $finder as $file ){
$content = $file->getContents();
$stmt = $em->getConnection()->prepare($content);
$stmt->execute();
}
// Init 02 = ce qui est toujours le cas
$finder->name('core-init-02.sql');
foreach( $finder as $file ){
$content = $file->getContents();
$stmt = $em->getConnection()->prepare($content);
$stmt->execute();
}
// Init country
$finder->name('country.sql');
foreach( $finder as $file ){
$content = $file->getContents();
$stmt = $em->getConnection()->prepare($content);
$stmt->execute();
}
// Init city
$finder->name('city.sql');
foreach( $finder as $file ){
$content = $file->getContents();
$stmt = $em->getConnection()->prepare($content);
$stmt->execute();
}
$stmt->closeCursor();
// On s'assure que le groupe 'Tout le Monde' existe
$group=$em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgall'=>true));
if (!$group) {
$output->writeln('Création du groupe Tout le Monde');
$group = new Group();
$group->setLabel("Tout le Monde");
$group->setFgopen(false);
$group->setFgall(true);
$em->persist($group);
$em->flush();
}
$sub = $em->createQueryBuilder();
$sub->select("usergroup");
$sub->from("CadolesCoreBundle:UserGroup","usergroup");
$sub->andWhere('usergroup.user = user.id');
$sub->andWhere('usergroup.group = :groupid');
$qb = $em->createQueryBuilder();
$qb->select('user')
->from('CadolesCoreBundle:User','user')
->where($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->setParameter("groupid",$group->getId());
$datas=$qb->getQuery()->getResult();
foreach($datas as $data) {
$output->writeln("Ratachement ".$data->getId()." ".$data->getUsername());
$usergroup=new UserGroup();
$usergroup->setUser($data);
$usergroup->setGroup($group);
$em->persist($usergroup);
$em->flush();
}
}
protected static function determineKernelRootDir(Event $event) {
$extra = $event->getComposer()->getPackage()->getExtra();
$rootdir = rtrim(getcwd(), '/');
return $rootdir . '/' . trim($extra['symfony-app-dir'], '/');
}
}

View File

@ -0,0 +1,432 @@
<?php
namespace Cadoles\CoreBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\KernelInterface;
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Niveau01;
use Cadoles\CoreBundle\Entity\Niveau02;
global $bdd01;
global $config;
class SynchroCommand extends Command
{
protected function configure()
{
$this
// the name of the command (the part after "bin/console")
->setName('Core:Synchro')
// the short description shown while running "php bin/console list"
->setDescription('Synchronisation Annuaire')
// the full command description shown when running the command with
// the "--help" option
->setHelp('This command Synchro for Core')
->addArgument('simulate', InputArgument::OPTIONAL, 'true to simulate / false to run')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$kernel = new \AppKernel('dev', true);
$kernel->boot();
$kernel->loadClassCache();
$em = $kernel->getContainer()->get('service_container')->get('doctrine.orm.default_entity_manager');
setlocale( LC_CTYPE, 'fr_FR' );
$labelniveau01=mb_strtoupper($kernel->getContainer()->getParameter('labelniveau01'));
$labelniveau02=mb_strtoupper($kernel->getContainer()->getParameter('labelniveau02'));
$simulate = $input->getArgument('simulate');
if($simulate=="") $simulate="true";
if($simulate!="true"&&$simulate!="false") {
$output->writeln('Paramétre incorrect');
return;
}
$simulate=($simulate=="true");
$output->writeln('');
if($simulate) $output->writeln('** SIMULATION');
else $output->writeln('** REEL');
$ldap = $kernel->getContainer()->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION BUNDLE TO LDAP ====================');
$output->writeln('=====================================================');
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$baseNiveau01 = $kernel->getContainer()->getParameter('ldap_baseniveau01');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau01','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseNiveau01;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyNiveau01($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addNiveau01($data);
}
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$baseNiveau02 = $kernel->getContainer()->getParameter('ldap_baseniveau02');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau02','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyNiveau02($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addNiveau02($data);
}
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->modifyGroup($data,$data->getLabel());
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getLabel());
if(!$simulate) $ldap->addGroup($data);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$baseUser = $kernel->getContainer()->getParameter('ldap_baseuser');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:User','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(uid='.$data->getUsername().')';
$subbranch=$baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
// S'assurer que SIREN correspond au Niveau01
if($data->getNiveau01()->getSiren()!=$data->getSiren()) {
$data->SetSiren($data->getNiveau01()->getSiren());
$data->flush();
}
// S'assurer que SIRET correspond au Niveau02
if($data->getNiveau02()!==null&&$data->getNiveau01()->getSiren()!=$data->getSiren()) {
$data->SetSiret($data->getNiveau02()->getSiret());
$data->flush();
}
// Mise à jour si elle existe
if(count($results) > 0) {
$output->writeln(' - Modification dans annuaire >> '.$data->getUsername());
if(!$simulate) $ldap->modifyUser($data);
}
// Sinon création de la fiche
else {
$output->writeln(' - Création dans annuaire >> '.$data->getUsername());
if(!$simulate) $ldap->addUser($data);
}
// Rattachement à Niveau01 et Niveau02
if(!$simulate) $ldap->addGroupUser($data);
}
$output->writeln('');
$output->writeln('== USER GROUP =======================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$criteria = '(cn='.$data->getLabel().')';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour des membres du groupes
if(count($results) > 0) {
$output->writeln(' - '.$data->getLabel());
$dn=$ldap->getGroupDN($data->getLabel());
$attrs["memberuid"]=array();
$attrs["cadolesMember"]=array();
foreach($data->getUsers() as $usergroupe) {
array_push($attrs["memberuid"],$usergroupe->getUser()->getUsername());
array_push($attrs["cadolesMember"],$ldap->getUserDN($usergroupe->getUser()));
$output->writeln(' > '.$usergroupe->getUser()->getUsername());
}
if(!$simulate) $ldap->ldapModify($dn, $attrs);
}
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION LDAP TO BUNDLE ====================');
$output->writeln('=====================================================');
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$baseNiveau01 = $kernel->getContainer()->getParameter('ldap_baseniveau01');
$criteria = '(cn=*)';
$subbranch=$baseNiveau01;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Niveau01')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getNiveau01DN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$baseNiveau02 = $kernel->getContainer()->getParameter('ldap_baseniveau02');
$criteria = '(cn=*)';
$subbranch=$baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Niveau02')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getNiveau02DN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$baseGroup = $kernel->getContainer()->getParameter('ldap_basegroup');
$criteria = '(cn=*)';
$subbranch=$baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:Group')->findBy(array('label' => $result["cn"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["cn"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["cn"]);
$dn=$ldap->getGroupDN($result["cn"]);
if(!$simulate) $ldap->deleteByDN($dn);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$baseUser = $kernel->getContainer()->getParameter('ldap_baseuser');
$criteria = '(uid=*)';
$subbranch=$baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
foreach($results as $result) {
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('username' => $result["uid"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$result["uid"]);
else {
$output->writeln(' - A supprimer dans annuaire >> '.$result["uid"]);
$dn='uid='.$result["uid"].','.$baseUser;
if(!$simulate) $ldap->deleteByDN($dn);
}
}
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION BUNDLE TO EPORTAIL ================');
$output->writeln('=====================================================');
$eportail = $kernel->getContainer()->get('cadoles.core.service.eportail');
if(!$eportail->isEnabled()) {
$output->writeln('');
$output->writeln(' Synchronisation ePortail désactivée');
}
else {
$output->writeln('');
$output->writeln('== NIVEAU01 =========================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau01','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncNiveau01($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== NIVEAU02 =========================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Niveau02','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncNiveau02($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== GROUP ============================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:Group','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getLabel());
if(!$simulate) $eportail->syncGroup($data,$data->getLabel());
}
$output->writeln('');
$output->writeln('== USER =============================================');
$datas = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:User','table')
->getQuery()
->getResult();
foreach($datas as $data) {
$output->writeln(' - Synchronisation eportail >> '.$data->getUsername());
if(!$simulate) $eportail->syncUser($data);
}
$output->writeln('');
$output->writeln('=====================================================');
$output->writeln('== SYNCHONISATION EPORTAIL TO BUNDLE ================');
$output->writeln('=====================================================');
$dbeportail= $kernel->getContainer()->get('service_container')->get('doctrine.orm.eportail_entity_manager')->getConnection();
$output->writeln('');
$output->writeln('== GROUP ============================================');
$sql = "SELECT * FROM env_group WHERE group_id>0";
$query = $dbeportail->prepare($sql);
$query->execute();
while($row=$query->fetch()){
$fgOK=false;
if (strpos($row["group_name"], $labelniveau01.' = ') === 0) {
$tmp=str_replace("$labelniveau01 = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Niveau01')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if (strpos($row["group_name"], $labelniveau02.' = ') === 0) {
$tmp=str_replace("$labelniveau01 = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Niveau02')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if (strpos($row["group_name"], 'GROUPE = ') === 0) {
$tmp=str_replace("GROUPE = ","",$row["group_name"]);
$data = $em->getRepository('CadolesCoreBundle:Group')->findBy(array('label' =>$tmp));
if($data) {
$fgOK=true;
$output->writeln(' - Existe dans bundle >> '.$row["group_name"]);
}
}
if(!$fgOK) {
$output->writeln(' - A supprimer dans eportail >> '.$row["group_name"]);
if(!$simulate) delGroup($row["group_id"]);
}
}
$output->writeln('');
$output->writeln('== USER =============================================');
$sql = "SELECT * FROM env_user WHERE user_id>0";
$query = $dbeportail->prepare($sql);
$query->execute();
while($row=$query->fetch()){
$data = $em->getRepository('CadolesCoreBundle:User')->findBy(array('username' =>$row["user_login"]));
if($data) $output->writeln(' - Existe dans bundle >> '.$row["user_login"]);
else {
$output->writeln(' - A supprimer dans eportail >> '.$row["user_login"]);
if(!$simulate) delUser($row["user_id"]);
}
}
}
$output->writeln('');
$output->writeln('');
}
protected static function determineKernelRootDir(Event $event) {
$extra = $event->getComposer()->getPackage()->getExtra();
$rootdir = rtrim(getcwd(), '/');
return $rootdir . '/' . trim($extra['symfony-app-dir'], '/');
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'ac-dijon', '21000');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'envole', '{SSHA}rQFMx40DYL1RTC6sXgFEfygLHAXa69wI
', 'tina-boot@ac-dijon.fr', 'admin.jpg', 'ROLE_ADMIN', '21000', 'simple');
TRUNCATE TABLE sidebar;
INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `fonticon`, `permission`) VALUES
(1000, NULL, 1000, 'CONFIGIRATION', '', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO'),
(1200, 1000, 1200, 'Organisations', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO'),
(1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN'),
(1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN'),
(1240, 1200, 1240, 'Groupes', 'cadoles_core_config_group', 'fa-users', 'ROLE_ADMIN,ROLE_MODO'),
(1250, 1200, 1250, 'Inscriptions', 'cadoles_core_config_registration', 'fa-pencil-square-o', 'ROLE_ADMIN,ROLE_MODO'),
(1260, 1200, 1260, 'Utilisateurs', 'cadoles_core_config_user', 'fa-child', 'ROLE_ADMIN,ROLE_MODO');

View File

@ -0,0 +1,11 @@
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
INSERT IGNORE INTO `statut` (`id`, `label`) VALUES
(1, 'En attente validation Administration'),
(2, 'En attente validation Utilisateur'),
(3, 'Inscription expirée');

View File

@ -0,0 +1,269 @@
id:code:pays
id:99125:ALBANIE
:99109:ALLEMAGNE
:99130:ANDORRE
:99135:ARUBA
:99110:AUTRICHE
:99131:BELGIQUE
:99148:BIELORUSSIE
:99118:BOSNIE-HERZEGOVINE
:99103:BOUVET (ILE)
:99111:BULGARIE
:99119:CROATIE
:99101:DANEMARK
:99134:ESPAGNE
:99106:ESTONIE
:99156:EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE
:99101:FEROE (ILES)
:99105:FINLANDE
:99133:GIBRALTAR
:99126:GRECE
:99132:GUERNESEY
:99112:HONGRIE
:99136:IRLANDE, ou EIRE
:99102:ISLANDE
:99127:ITALIE
:99132:JERSEY
:99157:KOSOVO
:99107:LETTONIE
:99113:LIECHTENSTEIN
:99108:LITUANIE
:99137:LUXEMBOURG
:99144:MALTE
:99132:MAN (ILE)
:99151:MOLDAVIE
:99138:MONACO
:99120:MONTENEGRO
:99103:NORVEGE
:99135:PAYS-BAS
:99122:POLOGNE
:99139:PORTUGAL
:99141:REPUBLIQUE DEMOCRATIQUE ALLEMANDE
:99142:REPUBLIQUE FEDERALE D'ALLEMAGNE
:99114:ROUMANIE
:99132:ROYAUME-UNI
:99123:RUSSIE
:99128:SAINT-MARIN
:99121:SERBIE
:99117:SLOVAQUIE
:99145:SLOVENIE
:99104:SUEDE
:99140:SUISSE
:99103:SVALBARD et ILE JAN MAYEN
:99115:TCHECOSLOVAQUIE
:99116:TCHEQUE (REPUBLIQUE)
:99124:TURQUIE D'EUROPE
:99155:UKRAINE
:99129:VATICAN, ou SAINT-SIEGE
:99212:AFGHANISTAN
:99201:ARABIE SAOUDITE
:99252:ARMENIE
:99253:AZERBAIDJAN
:99249:BAHREIN
:99246:BANGLADESH
:99214:BHOUTAN
:99224:BIRMANIE
:99225:BRUNEI
:99234:CAMBODGE
:99216:CHINE
:99254:CHYPRE
:99237:COREE
:99239:COREE (REPUBLIQUE DE)
:99238:COREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE)
:99247:EMIRATS ARABES UNIS
:99228:ETATS MALAIS NON FEDERES
:99255:GEORGIE
:99223:GOA
:99230:HONG-KONG
:99223:INDE
:99231:INDONESIE
:99204:IRAN
:99203:IRAQ
:99207:ISRAEL
:99217:JAPON
:99222:JORDANIE
:99211:KAMTCHATKA
:99256:KAZAKHSTAN
:99257:KIRGHIZISTAN
:99240:KOWEIT
:99241:LAOS
:99205:LIBAN
:99232:MACAO
:99227:MALAISIE
:99229:MALDIVES
:99218:MANDCHOURIE
:99242:MONGOLIE
:99215:NEPAL
:99250:OMAN
:99258:OUZBEKISTAN
:99213:PAKISTAN
:99261:PALESTINE (Etat de)
:99220:PHILIPPINES
:99221:POSSESSIONS BRITANNIQUES AU PROCHE-ORIENT
:99248:QATAR
:99209:SIBERIE
:99226:SINGAPOUR
:99235:SRI LANKA
:99206:SYRIE
:99259:TADJIKISTAN
:99236:TAIWAN
:99219:THAILANDE
:99262:TIMOR ORIENTAL
:99210:TURKESTAN RUSSE
:99260:TURKMENISTAN
:99208:TURQUIE
:99243:VIET NAM
:99244:VIET NAM DU NORD
:99245:VIET NAM DU SUD
:99251:YEMEN
:99233:YEMEN DEMOCRATIQUE
:99202:YEMEN (REPUBLIQUE ARABE DU)
:99319:ACORES, MADERE
:99303:AFRIQUE DU SUD
:99352:ALGERIE
:99395:ANGOLA
:99327:BENIN
:99347:BOTSWANA
:99331:BURKINA
:99321:BURUNDI
:99322:CAMEROUN
:99305:CAMEROUN ET TOGO
:99313:CANARIES (ILES)
:99396:CAP-VERT
:99323:CENTRAFRICAINE (REPUBLIQUE)
:99397:COMORES
:99324:CONGO
:99312:CONGO (REPUBLIQUE DEMOCRATIQUE)
:99326:COTE D'IVOIRE
:99399:DJIBOUTI
:99301:EGYPTE
:99317:ERYTHREE
:99315:ETHIOPIE
:99328:GABON
:99304:GAMBIE
:99329:GHANA
:99330:GUINEE
:99314:GUINEE EQUATORIALE
:99392:GUINEE-BISSAU
:99320:ILES PORTUGAISES DE L'OCEAN INDIEN
:99332:KENYA
:99348:LESOTHO
:99302:LIBERIA
:99316:LIBYE
:99333:MADAGASCAR
:99334:MALAWI
:99335:MALI
:99350:MAROC
:99390:MAURICE
:99336:MAURITANIE
:99393:MOZAMBIQUE
:99311:NAMIBIE
:99337:NIGER
:99338:NIGERIA
:99308:OCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L')
:99339:OUGANDA
:99313:PRESIDES
:99313:PROVINCES ESPAGNOLES D'AFRIQUE
:99340:RWANDA
:99389:SAHARA OCCIDENTAL
:99306:SAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA
:99394:SAO TOME-ET-PRINCIPE
:99341:SENEGAL
:99398:SEYCHELLES
:99342:SIERRA LEONE
:99318:SOMALIE
:99343:SOUDAN
:99307:SOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA
:99349:SOUDAN DU SUD
:99391:SWAZILAND
:99325:TANGER
:99309:TANZANIE
:99344:TCHAD
:99345:TOGO
:99351:TUNISIE
:99346:ZAMBIE
:99308:ZANZIBAR
:99310:ZIMBABWE
:99404:ALASKA
:99425:ANGUILLA
:99441:ANTIGUA-ET-BARBUDA
:99431:ANTILLES NEERLANDAISES
:99415:ARGENTINE
:99436:BAHAMAS
:99434:BARBADE
:99429:BELIZE
:99425:BERMUDES
:99418:BOLIVIE
:99443:BONAIRE, SAINT EUSTACHE ET SABA
:99416:BRESIL
:99425:CAIMANES (ILES)
:99401:CANADA
:99417:CHILI
:99419:COLOMBIE
:99406:COSTA RICA
:99407:CUBA
:99444:CURAÇAO
:99408:DOMINICAINE (REPUBLIQUE)
:99438:DOMINIQUE
:99414:EL SALVADOR
:99420:EQUATEUR
:99404:ETATS-UNIS
:99427:GEORGIE DU SUD ET LES ILES SANDWICH DU SUD
:99435:GRENADE
:99430:GROENLAND
:99409:GUATEMALA
:99428:GUYANA
:99410:HAITI
:99411:HONDURAS
:99426:JAMAIQUE
:99403:LABRADOR
:99427:MALOUINES, OU FALKLAND (ILES)
:99405:MEXIQUE
:99425:MONTSERRAT
:99412:NICARAGUA
:99413:PANAMA
:99421:PARAGUAY
:99422:PEROU
:99432:PORTO RICO
:99442:SAINT-CHRISTOPHE-ET-NIEVES
:99439:SAINTE-LUCIE
:99445:SAINT-MARTIN (PARTIE NEERLANDAISE)
:99440:SAINT-VINCENT-ET-LES GRENADINES
:99437:SURINAME
:99432:TERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE
:99427:TERR. DU ROYAUME-UNI DANS L'ATLANTIQUE SUD
:99402:TERRE-NEUVE
:99425:TERRITOIRES DU ROYAUME-UNI AUX ANTILLES
:99433:TRINITE-ET-TOBAGO
:99425:TURKS ET CAIQUES (ILES)
:99423:URUGUAY
:99424:VENEZUELA
:99425:VIERGES BRITANNIQUES (ILES)
:99432:VIERGES DES ETATS-UNIS (ILES)
:99501:AUSTRALIE
:99501:CHRISTMAS (ILE)
:99501:COCOS ou KEELING (ILES)
:99502:COOK (ILES)
:99508:FIDJI
:99505:GUAM
:99504:HAWAII (ILES)
:99501:HEARD ET MACDONALD (ILES)
:99513:KIRIBATI
:99505:MARIANNES DU NORD (ILES)
:99515:MARSHALL (ILES)
:99516:MICRONESIE (ETATS FEDERES DE)
:99507:NAURU
:99502:NIUE
:99501:NORFOLK (ILE)
:99502:NOUVELLE-ZELANDE
:99517:PALAOS (ILES)
:99510:PAPOUASIE-NOUVELLE-GUINEE
:99503:PITCAIRN (ILE)
:99512:SALOMON (ILES)
:99505:SAMOA AMERICAINES
:99506:SAMOA OCCIDENTALES
:99505:TERR. DES ETATS-UNIS D'AMERIQUE EN OCEANIE
:99502:TOKELAU
:99509:TONGA
:99511:TUVALU
:99514:VANUATU
Can't render this file because it has a wrong number of fields in line 23.

View File

@ -0,0 +1,270 @@
INSERT IGNORE INTO `country` (`id`, `code`, `label`) VALUES
(1, '99125', 'ALBANIE'),
(2, '99109', 'ALLEMAGNE'),
(3, '99130', 'ANDORRE'),
(4, '99135', 'ARUBA'),
(5, '99110', 'AUTRICHE'),
(6, '99131', 'BELGIQUE'),
(7, '99148', 'BIELORUSSIE'),
(8, '99118', 'BOSNIE-HERZEGOVINE'),
(9, '99103', 'BOUVET (ILE)'),
(10, '99111', 'BULGARIE'),
(11, '99119', 'CROATIE'),
(12, '99101', 'DANEMARK'),
(13, '99134', 'ESPAGNE'),
(14, '99106', 'ESTONIE'),
(15, '99156', 'EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE'),
(16, '99101', 'FEROE (ILES)'),
(17, '99105', 'FINLANDE'),
(18, '99133', 'GIBRALTAR'),
(19, '99126', 'GRECE'),
(20, '99132', 'GUERNESEY'),
(21, '99112', 'HONGRIE'),
(22, '99136', 'IRLANDE, ou EIRE'),
(23, '99102', 'ISLANDE'),
(24, '99127', 'ITALIE'),
(25, '99132', 'JERSEY'),
(26, '99157', 'KOSOVO'),
(27, '99107', 'LETTONIE'),
(28, '99113', 'LIECHTENSTEIN'),
(29, '99108', 'LITUANIE'),
(30, '99137', 'LUXEMBOURG'),
(31, '99144', 'MALTE'),
(32, '99132', 'MAN (ILE)'),
(33, '99151', 'MOLDAVIE'),
(34, '99138', 'MONACO'),
(35, '99120', 'MONTENEGRO'),
(36, '99103', 'NORVEGE'),
(37, '99135', 'PAYS-BAS'),
(38, '99122', 'POLOGNE'),
(39, '99139', 'PORTUGAL'),
(40, '99141', 'REPUBLIQUE DEMOCRATIQUE ALLEMANDE'),
(41, '99142', 'REPUBLIQUE FEDERALE D\'ALLEMAGNE'),
(42, '99114', 'ROUMANIE'),
(43, '99132', 'ROYAUME-UNI'),
(44, '99123', 'RUSSIE'),
(45, '99128', 'SAINT-MARIN'),
(46, '99121', 'SERBIE'),
(47, '99117', 'SLOVAQUIE'),
(48, '99145', 'SLOVENIE'),
(49, '99104', 'SUEDE'),
(50, '99140', 'SUISSE'),
(51, '99103', 'SVALBARD et ILE JAN MAYEN'),
(52, '99115', 'TCHECOSLOVAQUIE'),
(53, '99116', 'TCHEQUE (REPUBLIQUE)'),
(54, '99124', 'TURQUIE D\'EUROPE'),
(55, '99155', 'UKRAINE'),
(56, '99129', 'VATICAN, ou SAINT-SIEGE'),
(57, '99212', 'AFGHANISTAN'),
(58, '99201', 'ARABIE SAOUDITE'),
(59, '99252', 'ARMENIE'),
(60, '99253', 'AZERBAIDJAN'),
(61, '99249', 'BAHREIN'),
(62, '99246', 'BANGLADESH'),
(63, '99214', 'BHOUTAN'),
(64, '99224', 'BIRMANIE'),
(65, '99225', 'BRUNEI'),
(66, '99234', 'CAMBODGE'),
(67, '99216', 'CHINE'),
(68, '99254', 'CHYPRE'),
(69, '99237', 'COREE'),
(70, '99239', 'COREE (REPUBLIQUE DE)'),
(71, '99238', 'COREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE)'),
(72, '99247', 'EMIRATS ARABES UNIS'),
(73, '99228', 'ETATS MALAIS NON FEDERES'),
(74, '99255', 'GEORGIE'),
(75, '99223', 'GOA'),
(76, '99230', 'HONG-KONG'),
(77, '99223', 'INDE'),
(78, '99231', 'INDONESIE'),
(79, '99204', 'IRAN'),
(80, '99203', 'IRAQ'),
(81, '99207', 'ISRAEL'),
(82, '99217', 'JAPON'),
(83, '99222', 'JORDANIE'),
(84, '99211', 'KAMTCHATKA'),
(85, '99256', 'KAZAKHSTAN'),
(86, '99257', 'KIRGHIZISTAN'),
(87, '99240', 'KOWEIT'),
(88, '99241', 'LAOS'),
(89, '99205', 'LIBAN'),
(90, '99232', 'MACAO'),
(91, '99227', 'MALAISIE'),
(92, '99229', 'MALDIVES'),
(93, '99218', 'MANDCHOURIE'),
(94, '99242', 'MONGOLIE'),
(95, '99215', 'NEPAL'),
(96, '99250', 'OMAN'),
(97, '99258', 'OUZBEKISTAN'),
(98, '99213', 'PAKISTAN'),
(99, '99261', 'PALESTINE (Etat de)'),
(100, '99220', 'PHILIPPINES'),
(101, '99221', 'POSSESSIONS BRITANNIQUES AU PROCHE-ORIENT'),
(102, '99248', 'QATAR'),
(103, '99209', 'SIBERIE'),
(104, '99226', 'SINGAPOUR'),
(105, '99235', 'SRI LANKA'),
(106, '99206', 'SYRIE'),
(107, '99259', 'TADJIKISTAN'),
(108, '99236', 'TAIWAN'),
(109, '99219', 'THAILANDE'),
(110, '99262', 'TIMOR ORIENTAL'),
(111, '99210', 'TURKESTAN RUSSE'),
(112, '99260', 'TURKMENISTAN'),
(113, '99208', 'TURQUIE'),
(114, '99243', 'VIET NAM'),
(115, '99244', 'VIET NAM DU NORD'),
(116, '99245', 'VIET NAM DU SUD'),
(117, '99251', 'YEMEN'),
(118, '99233', 'YEMEN DEMOCRATIQUE'),
(119, '99202', 'YEMEN (REPUBLIQUE ARABE DU)'),
(120, '99319', 'ACORES, MADERE'),
(121, '99303', 'AFRIQUE DU SUD'),
(122, '99352', 'ALGERIE'),
(123, '99395', 'ANGOLA'),
(124, '99327', 'BENIN'),
(125, '99347', 'BOTSWANA'),
(126, '99331', 'BURKINA'),
(127, '99321', 'BURUNDI'),
(128, '99322', 'CAMEROUN'),
(129, '99305', 'CAMEROUN ET TOGO'),
(130, '99313', 'CANARIES (ILES)'),
(131, '99396', 'CAP-VERT'),
(132, '99323', 'CENTRAFRICAINE (REPUBLIQUE)'),
(133, '99397', 'COMORES'),
(134, '99324', 'CONGO'),
(135, '99312', 'CONGO (REPUBLIQUE DEMOCRATIQUE)'),
(136, '99326', 'COTE D\'IVOIRE'),
(137, '99399', 'DJIBOUTI'),
(138, '99301', 'EGYPTE'),
(139, '99317', 'ERYTHREE'),
(140, '99315', 'ETHIOPIE'),
(141, '99328', 'GABON'),
(142, '99304', 'GAMBIE'),
(143, '99329', 'GHANA'),
(144, '99330', 'GUINEE'),
(145, '99314', 'GUINEE EQUATORIALE'),
(146, '99392', 'GUINEE-BISSAU'),
(147, '99320', 'ILES PORTUGAISES DE L\'OCEAN INDIEN'),
(148, '99332', 'KENYA'),
(149, '99348', 'LESOTHO'),
(150, '99302', 'LIBERIA'),
(151, '99316', 'LIBYE'),
(152, '99333', 'MADAGASCAR'),
(153, '99334', 'MALAWI'),
(154, '99335', 'MALI'),
(155, '99350', 'MAROC'),
(156, '99390', 'MAURICE'),
(157, '99336', 'MAURITANIE'),
(158, '99393', 'MOZAMBIQUE'),
(159, '99311', 'NAMIBIE'),
(160, '99337', 'NIGER'),
(161, '99338', 'NIGERIA'),
(162, '99308', 'OCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L\')'),
(163, '99339', 'OUGANDA'),
(164, '99313', 'PRESIDES'),
(165, '99313', 'PROVINCES ESPAGNOLES D\'AFRIQUE'),
(166, '99340', 'RWANDA'),
(167, '99389', 'SAHARA OCCIDENTAL'),
(168, '99306', 'SAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA'),
(169, '99394', 'SAO TOME-ET-PRINCIPE'),
(170, '99341', 'SENEGAL'),
(171, '99398', 'SEYCHELLES'),
(172, '99342', 'SIERRA LEONE'),
(173, '99318', 'SOMALIE'),
(174, '99343', 'SOUDAN'),
(175, '99307', 'SOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA'),
(176, '99349', 'SOUDAN DU SUD'),
(177, '99391', 'SWAZILAND'),
(178, '99325', 'TANGER'),
(179, '99309', 'TANZANIE'),
(180, '99344', 'TCHAD'),
(181, '99345', 'TOGO'),
(182, '99351', 'TUNISIE'),
(183, '99346', 'ZAMBIE'),
(184, '99308', 'ZANZIBAR'),
(185, '99310', 'ZIMBABWE'),
(186, '99404', 'ALASKA'),
(187, '99425', 'ANGUILLA'),
(188, '99441', 'ANTIGUA-ET-BARBUDA'),
(189, '99431', 'ANTILLES NEERLANDAISES'),
(190, '99415', 'ARGENTINE'),
(191, '99436', 'BAHAMAS'),
(192, '99434', 'BARBADE'),
(193, '99429', 'BELIZE'),
(194, '99425', 'BERMUDES'),
(195, '99418', 'BOLIVIE'),
(196, '99443', 'BONAIRE, SAINT EUSTACHE ET SABA'),
(197, '99416', 'BRESIL'),
(198, '99425', 'CAIMANES (ILES)'),
(199, '99401', 'CANADA'),
(200, '99417', 'CHILI'),
(201, '99419', 'COLOMBIE'),
(202, '99406', 'COSTA RICA'),
(203, '99407', 'CUBA'),
(204, '99444', 'CURAÇAO'),
(205, '99408', 'DOMINICAINE (REPUBLIQUE)'),
(206, '99438', 'DOMINIQUE'),
(207, '99414', 'EL SALVADOR'),
(208, '99420', 'EQUATEUR'),
(209, '99404', 'ETATS-UNIS'),
(210, '99427', 'GEORGIE DU SUD ET LES ILES SANDWICH DU SUD'),
(211, '99435', 'GRENADE'),
(212, '99430', 'GROENLAND'),
(213, '99409', 'GUATEMALA'),
(214, '99428', 'GUYANA'),
(215, '99410', 'HAITI'),
(216, '99411', 'HONDURAS'),
(217, '99426', 'JAMAIQUE'),
(218, '99403', 'LABRADOR'),
(219, '99427', 'MALOUINES, OU FALKLAND (ILES)'),
(220, '99405', 'MEXIQUE'),
(221, '99425', 'MONTSERRAT'),
(222, '99412', 'NICARAGUA'),
(223, '99413', 'PANAMA'),
(224, '99421', 'PARAGUAY'),
(225, '99422', 'PEROU'),
(226, '99432', 'PORTO RICO'),
(227, '99442', 'SAINT-CHRISTOPHE-ET-NIEVES'),
(228, '99439', 'SAINTE-LUCIE'),
(229, '99445', 'SAINT-MARTIN (PARTIE NEERLANDAISE)'),
(230, '99440', 'SAINT-VINCENT-ET-LES GRENADINES'),
(231, '99437', 'SURINAME'),
(232, '99432', 'TERR. DES ETATS-UNIS D\'AMERIQUE EN AMERIQUE'),
(233, '99427', 'TERR. DU ROYAUME-UNI DANS L\'ATLANTIQUE SUD'),
(234, '99402', 'TERRE-NEUVE'),
(235, '99425', 'TERRITOIRES DU ROYAUME-UNI AUX ANTILLES'),
(236, '99433', 'TRINITE-ET-TOBAGO'),
(237, '99425', 'TURKS ET CAIQUES (ILES)'),
(238, '99423', 'URUGUAY'),
(239, '99424', 'VENEZUELA'),
(240, '99425', 'VIERGES BRITANNIQUES (ILES)'),
(241, '99432', 'VIERGES DES ETATS-UNIS (ILES)'),
(242, '99501', 'AUSTRALIE'),
(243, '99501', 'CHRISTMAS (ILE)'),
(244, '99501', 'COCOS ou KEELING (ILES)'),
(245, '99502', 'COOK (ILES)'),
(246, '99508', 'FIDJI'),
(247, '99505', 'GUAM'),
(248, '99504', 'HAWAII (ILES)'),
(249, '99501', 'HEARD ET MACDONALD (ILES)'),
(250, '99513', 'KIRIBATI'),
(251, '99505', 'MARIANNES DU NORD (ILES)'),
(252, '99515', 'MARSHALL (ILES)'),
(253, '99516', 'MICRONESIE (ETATS FEDERES DE)'),
(254, '99507', 'NAURU'),
(255, '99502', 'NIUE'),
(256, '99501', 'NORFOLK (ILE)'),
(257, '99502', 'NOUVELLE-ZELANDE'),
(258, '99517', 'PALAOS (ILES)'),
(259, '99510', 'PAPOUASIE-NOUVELLE-GUINEE'),
(260, '99503', 'PITCAIRN (ILE)'),
(261, '99512', 'SALOMON (ILES)'),
(262, '99505', 'SAMOA AMERICAINES'),
(263, '99506', 'SAMOA OCCIDENTALES'),
(264, '99505', 'TERR. DES ETATS-UNIS D\'AMERIQUE EN OCEANIE'),
(265, '99502', 'TOKELAU'),
(266, '99509', 'TONGA'),
(267, '99511', 'TUVALU'),
(268, '99514', 'VANUATU'),
(269, '99100', 'FRANCE');

View File

@ -0,0 +1,69 @@
"dn","givenname","mail","sn","uid","userpassword"
"ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","","","","",""
"uid=adeline.buisson,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Adeline","adeline.buisson@ac-orleans-tours.fr","Buisson","adeline.buisson","{SSHA}a+NDl3udTd1ZL2/ZNE7hFs03dLVPZkRp"
"uid=admin,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","admin","admin@envole.ac-dijon.fr","admin","admin","{SSHA}CknsjvVNekn+TvamfHP1fcHFkwoq/YpT"
"uid=alain.goursaud,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Alain","alain.goursaud@ac-orleans-tours.fr","Goursaud","alain.goursaud","{SSHA}gprDfyousOPakJ/09oSBNt8wjaFwSFFk"
"uid=alain.ricci,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Alain","alain.ricci@ac-creteil.fr","Ricci","alain.ricci","{SSHA}qmDlm5roC2VyRkClc/DDVR3j/BBqODhw"
"uid=alexandre.guyot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Alexandre","alexandre.guyot@ac-orleans-tours.fr","Guyot","alexandre.guyot","{SSHA}DwZKklLRGPMKPpZU5XK/CzdpSKhyakd6"
"uid=antoine.frigara,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Antoine","antoine.frigara@ac-aix-marseille.fr","Frigara","antoine.frigara","{SSHA}PwidY6RS58QFUND5v7/dSHJ5RNa1sFfv"
"uid=antoine.poletti,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Antoine","antoine.poletti@ac-reunion.fr","Poletti","antoine.poletti","{SSHA}t6uH7hQ07LB53MGwEPj+tdr2km74k+GD"
"uid=antony.barillot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Antony","Antony.Barillot@ac-poitiers.fr","Barillot","antony.barillot","{SSHA}1jmjFbsuQXpBl89R0uzBUwHmr+92STNt"
"uid=arnaud.fornerot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Arnaud","arnaud.fornerot@ac-dijon.fr","Fornerot","arnaud.fornerot","{SSHA}ZmyHC0md3Q2nJqqUqsON+x3QV4VpRVMz"
"uid=badr.benyahia,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Badr","badr.benyahia@ac-creteil.fr","Benyahia","badr.benyahia","{SSHA}ozWnKITa+9nv+lumVdVzKtWMbIhHUVFo"
"uid=benoit.penet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Benoit","benoit.penet@ac-reims.fr","Penet","benoit.penet","{SSHA}XCEWjOxvkLwBZn2qXxOD1rGYsIVXdjF5"
"uid=bernard.delastre,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Bernard","bernard.delastre@ac-reunion.fr","Delastre","bernard.delastre","{SSHA}HZ82zD+E0taIkgShP74HGJ+keKhPRy45"
"uid=bernard.lecas,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Bernard","blecat@ac-orleans-tours.fr","Lecas","bernard.lecas","{SSHA}dPaPj9EoqIlpfXogTs5fJaX0o7JRNE4x"
"uid=bruno.veys,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Bruno","bruno.veys@ac-orleans-tours.fr","Veys","bruno.veys","{SSHA}XHQMxEsgXRJtTwoHCFA/Y5y5a1d4MDlC"
"uid=catherine.renoult,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Catherine","catherine.renoult@ac-orleans-tours.fr","Renoult","catherine.renoult","{SSHA}NYmlnrIAxipPOvXLuIYFB+d+DTtvL3dw"
"uid=cedric.frayssinet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Cedric","cedric.frayssinet@ac-lyon.fr","Frayssinet","cedric.frayssinet","{SSHA}HzxPUHw0JDEYbI0vvCFm27yQcIvFd/PI"
"uid=christelle.le-moine,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Christelle","Christelle.Le-Moine@ac-dijon.fr","Le-Moine","christelle.le-moine","{SSHA}HXTO8ebn415/EDWuMa6PuAtM8S/3mu0B"
"uid=christine.le-berre,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Christine","christine.le-berre@ac-orleans-tours.fr","Le-Berre","christine.le-berre","{SSHA}thQDWozt9FvGJ8pCqWuousCqKnZWTVZl"
"uid=christophe.breneliere,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Christophe","christophe.breneliere@ac-poitiers.fr","Breneliere","christophe.breneliere","{SSHA}flbNVQYTer9pJ7+3F4HiRUPDp/lzQzRz"
"uid=christophe.leon,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Christophe","christophe.leon@ac-reunion.fr","Leon","christophe.leon","{SSHA}Uz5y9mLfF6PN5z8crq6jTKOQR/88a53Y"
"uid=delphine.michaut,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Delphine","delphine.michaut@ac-besancon.fr","Michaut","delphine.michaut","{SSHA}bpug5gSSdWXF4cwt6Jw+dE6n17tnYV43"
"uid=dominique.quere,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Dominique","dominique.quere@ac-poitiers.fr","Quere","dominique.quere","{SSHA}UK0X/G5esO51LnoKYyrhvief6VYyVFBk"
"uid=eric.chaumet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Eric","eric.chaumet@ac-poitiers.fr","Chaumet","eric.chaumet","{SSHA}++gu8tkych+ydNaGWVC4Xf0jTvRzM1Fn"
"uid=eric.scherr,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Eric","eric.scherr@ac-strasbourg.fr","Scherr","eric.scherr","{SSHA}Ut0FT+D1/CUu+vbTyo7y7dHRZ8FoT1Ix"
"uid=esat.bylykbashi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Esat","esat.bylykbashi@ac-creteil.fr","Bylykbashi","esat.bylykbashi","{SSHA}/l/gK4jB8X90tMw7Vbir90MDxbVHRHNO"
"uid=francis.grandjean,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Francis","francis.grandjean@ac-orleans-tours.fr","Grandjean","francis.grandjean","{SSHA}DyhhDi57KyZODkvsHSnUR89Og40zLjVi"
"uid=francois.granger,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","François","francois.granger@ac-orleans-tours.fr","Granger","francois.granger","{SSHA}WY/Lkb/EglsRBBhRF9wF+5r8YbtYUXAy"
"uid=francois.millet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Francois","francois.millet@ac-reunion.fr","Millet","francois.millet","{SSHA}CkOlrt5KRy/dXDo0z6x0C+WDOjRhbEd1"
"uid=frederic.rivero,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Frederic","frederic.rivero@ac-reims.fr","Rivero","frederic.rivero","{SSHA}3TyuXkY6LB2oBjQ4SInhGc6SKtMxZjRp"
"uid=geraldine.carreno,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Geraldine","geraldine.carreno@ac-aix-marseille.fr","Carreno","geraldine.carreno","{SSHA}znjzbwykU5ykXt/kG9Ngl/ro5Z9iZEZY"
"uid=geraldine.nari,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Geraldine","geraldine.nari@ac-creteil.fr","Nari","geraldine.nari","{SSHA}BueKePIzgzGGU9fVCh/RkszhXctoYzBH"
"uid=gilles.defilippi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Gilles","gilles.defilippi@ac-creteil.fr","Defilippi","gilles.defilippi","{SSHA}OkiaSvrE2YtEPNELQ5WRUsTF6oNoFEir"
"uid=guillaume.bonzoms,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Guillaume","guillaume.bonzoms@ac-besancon.fr","Bonzoms","guillaume.bonzoms","{SSHA}3ipTIv8Sd7dDGasYUWBeCXc4Vs5FSzZt"
"uid=igor.godi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Igor","igor.godi@ac-reims.fr","Godi","igor.godi","{SSHA}fBbgUKvWZxvMpU2ypmWiQpNnvsNSY1M2"
"uid=isabelle.tordjman,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Isabelle","isabelle.tordjman@ac-creteil.fr","Tordjman","isabelle.tordjman","{SSHA}w5c0QA93m09kt7e1XLDnVDUCBVdVemZV"
"uid=jacques.poulet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Jacques","jacques.poulet@ac-besancon.fr","Poulet","jacques.poulet","{SSHA}AeJsQ4ePn6dQt+pkBlvzvQ2wqudqR8ZI"
"uid=jean-marc.bruot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Jean-Marc","jean-marc.bruot@ac-besancon.fr","Bruot","jean-marc.bruot","{SSHA}PeSKQyhg/ImODDyjsVIzEn+aftfO91e+"
"uid=joel.cuissinat,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Joel","joel.cuissinat@ac-dijon.fr","Cuissinat","joel.cuissinat","{SSHA}mggWTO4oAfwXUZJs1jwAypip+5dsbE91"
"uid=katia.merceron,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Katia","katia.merceron@ac-poitiers.fr","Merceron","katia.merceron","{SSHA}u2UsR5/7W03wqAiP+wU+h4mYmo55wz2A"
"uid=laurent.brillard,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Laurent","laurent.brillard@ac-reunion.fr","Brillard","laurent.brillard","{SSHA}2XozZq+pvHtBnxWASqChx6+YBRZjbWpT"
"uid=luc.bourdot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Luc","luc.bourdot@ac-dijon.fr","Bourdot","luc.bourdot","{SSHA}fyU7t66LATGWZPfz9LTy0UlN+B8zYzlk"
"uid=lucas.francavilla,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Lucas","lucas.francavilla@ac-dijon.fr","Francavilla","lucas.francavilla","{SSHA}qIaUF7z+EBpZIu6zariVzv4Bj7VoNmZo"
"uid=ludovic.cavalier,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Ludovic","ludovic.cavalier@ac-poitiers.fr","Cavalier","ludovic.cavalier","{SSHA}hCvJVhzhM1wdhayyHqKl/iid9Vii78MG"
"uid=mathieu.terroba,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Mathieu","mathieu.terroba@ac-poitiers.fr","Terroba","mathieu.terroba","{SSHA}ipfHOQra9BqDeodNPjooaLgroTjSTFaq"
"uid=mchristine.jamotte,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Marie-Christine","mchristine.jamotte@ac-reims.fr","Jamotte","mchristine.jamotte","{SSHA}tU9oPSws4uZEqfWGIBdroLuHgXZadEhP"
"uid=mnzali,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Murphy","murphy.nzali@ac-besancon.fr","Nzali","mnzali","{SSHA}8PYG3iz+7E+8k5Bp5iGNTSzwTPCEb58n"
"uid=nathalie.becoulet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Nathalie","nathalie.becoulet.dane@ac-besancon.fr","Becoulet","nathalie.becoulet","{SSHA}bTGMES7dOPO3VgD1A+w9oBbaNxlPbDlv"
"uid=olivier.janvois,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Olivier","olivier.janvois@ac-orleans-tours.fr","Janvois","olivier.janvois","{SSHA}xx+qK51jt/cOko4k5mCLYskDBrdTiUWf"
"uid=olivier.maurel,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Olivier","olivier.maurel@ac-aix-marseille.fr","Maurel","olivier.maurel","{SSHA}eT9gLoCocqcgxxsSQRjJ5D5B0jmRfAa2"
"uid=pascale.montrol-amouroux,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Pascale","pascale.montrol-amouroux@ac-orleans-tours.fr","Montrol-Amouroux","pascale.montrol-amouroux","{SSHA}UHk9i//qJctHhWT3akQtH2d2hE54VEhw"
"uid=patrick.ciurleo,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Patrick","patrick.ciurleo@ac-nice.fr","Ciurleo","patrick.ciurleo","{SSHA}Ueb55JTdKAI8Kd0ia5rN0yPHfGVFR0pj"
"uid=patrick.lemaire,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Patrick","patrick.lemaire@ac-reims.fr","Lemaire","patrick.lemaire","{SSHA}AEGREW3ABVT4JMsS/HoUfK3ANlVKaGJo"
"uid=philippe.derouette,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","philippe","philippe.derouette@ac-reunion.fr","derouette","philippe.derouette","{SSHA}Levyhda4weF152capk12IMld8nfhWrUa"
"uid=philippe.juan,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Philippe","philippe.juan@ac-nice.fr","Juan","philippe.juan","{SSHA}lBBbw3zrzKdS0zIYJgsCgm3WJUQyLm1h"
"uid=philippe.roy,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Philippe","philippe.roy@ac-aix-marseille.fr","Roy","philippe.roy","{SSHA}i6l3A0a9/xquyQywz2u6WqX1oyD/gtFS"
"uid=pierre.cadeot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Pierre","pierre.cadeot@ac-nice.fr","Cadeot","pierre.cadeot","{SSHA}kU+9cfejTaSmMFkRwT6SR45nGy9uSWxB"
"uid=pierre.colonna,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Pierre","pierre.colonna-d-istria@ac-nice.fr","Colonna d'Istria","pierre.colonna","{SSHA}DnFbEJo17IpIlzvkmv+cE4/4HQQwRS40"
"uid=raymond.dargein,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Raymond","raymond.dargein@ac-creteil.fr","Dargein","raymond.dargein","{SSHA}xkJ90qbKYnI3zfXbPLAOu4q9LApSZDVz"
"uid=renaud.dussol,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Renaud","renaud.dussol@ac-nice.fr","Dussol","renaud.dussol","{SSHA}wEgA4aM0tJnSI+XmTV+tFtWIAskuOGxT"
"uid=rozenn.dagorn,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Rozenn","rozenn.dagorn@ac-creteil.fr","Dagorn","rozenn.dagorn","{SSHA}yrRO0ZFaSJHwfX/6bKV0saqT2rdGa2VJ"
"uid=stephane.klein,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Stephane","stephane.klein@ac-reims.fr","Klein","stephane.klein","{SSHA}Lvs5GK1+sS7ckiGbwoUPyqqnjUQvTlN2"
"uid=thi-houng.phan,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Thi-Houng","thi-houng.phan@ac-orleans-tours.fr","Phan","thi-houng.phan","{SSHA}GreIBw1HWHkRmoYLGL5tTf0iObZEMVlp"
"uid=thierry.faure,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Thierry","thierry.faure@ac-martinique.fr","Faure","thierry.faure","{SSHA}0eq55Zv2Eb6up/wthe6wteLhOw9IUXVW"
"uid=veronique.neret,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Veronique","veronique.neret@ac-orleans-tours.fr","Neret","veronique.neret","{SSHA}3SCcozjar6pNRJF8A8K3jI9WSnro9yDK"
"uid=vincent.mergel,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Vincent","vincent.mergel@ac-besancon.fr","Mergel","vincent.mergel","{SSHA}ACyRYiXKPRi3TAIMoiz+SXdha0aw/IT7"
"uid=vlacoume,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Valerie","valerie.lacoume@ac-reims.fr","Lacoume","vlacoume","{SSHA}nX8aSTd+rc0CMxC4BJrGaSj0aixpRGNE"
"uid=z.lassed,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr","Ali","z.lassed@ac-reims.fr","Lassed","z.lassed","{SSHA}TTa5r13E7wN6LdGHmtW14Dc+POgxVFdk"
1 dn givenname mail sn uid userpassword
2 ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr
3 uid=adeline.buisson,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Adeline adeline.buisson@ac-orleans-tours.fr Buisson adeline.buisson {SSHA}a+NDl3udTd1ZL2/ZNE7hFs03dLVPZkRp
4 uid=admin,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr admin admin@envole.ac-dijon.fr admin admin {SSHA}CknsjvVNekn+TvamfHP1fcHFkwoq/YpT
5 uid=alain.goursaud,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Alain alain.goursaud@ac-orleans-tours.fr Goursaud alain.goursaud {SSHA}gprDfyousOPakJ/09oSBNt8wjaFwSFFk
6 uid=alain.ricci,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Alain alain.ricci@ac-creteil.fr Ricci alain.ricci {SSHA}qmDlm5roC2VyRkClc/DDVR3j/BBqODhw
7 uid=alexandre.guyot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Alexandre alexandre.guyot@ac-orleans-tours.fr Guyot alexandre.guyot {SSHA}DwZKklLRGPMKPpZU5XK/CzdpSKhyakd6
8 uid=antoine.frigara,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Antoine antoine.frigara@ac-aix-marseille.fr Frigara antoine.frigara {SSHA}PwidY6RS58QFUND5v7/dSHJ5RNa1sFfv
9 uid=antoine.poletti,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Antoine antoine.poletti@ac-reunion.fr Poletti antoine.poletti {SSHA}t6uH7hQ07LB53MGwEPj+tdr2km74k+GD
10 uid=antony.barillot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Antony Antony.Barillot@ac-poitiers.fr Barillot antony.barillot {SSHA}1jmjFbsuQXpBl89R0uzBUwHmr+92STNt
11 uid=arnaud.fornerot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Arnaud arnaud.fornerot@ac-dijon.fr Fornerot arnaud.fornerot {SSHA}ZmyHC0md3Q2nJqqUqsON+x3QV4VpRVMz
12 uid=badr.benyahia,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Badr badr.benyahia@ac-creteil.fr Benyahia badr.benyahia {SSHA}ozWnKITa+9nv+lumVdVzKtWMbIhHUVFo
13 uid=benoit.penet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Benoit benoit.penet@ac-reims.fr Penet benoit.penet {SSHA}XCEWjOxvkLwBZn2qXxOD1rGYsIVXdjF5
14 uid=bernard.delastre,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Bernard bernard.delastre@ac-reunion.fr Delastre bernard.delastre {SSHA}HZ82zD+E0taIkgShP74HGJ+keKhPRy45
15 uid=bernard.lecas,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Bernard blecat@ac-orleans-tours.fr Lecas bernard.lecas {SSHA}dPaPj9EoqIlpfXogTs5fJaX0o7JRNE4x
16 uid=bruno.veys,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Bruno bruno.veys@ac-orleans-tours.fr Veys bruno.veys {SSHA}XHQMxEsgXRJtTwoHCFA/Y5y5a1d4MDlC
17 uid=catherine.renoult,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Catherine catherine.renoult@ac-orleans-tours.fr Renoult catherine.renoult {SSHA}NYmlnrIAxipPOvXLuIYFB+d+DTtvL3dw
18 uid=cedric.frayssinet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Cedric cedric.frayssinet@ac-lyon.fr Frayssinet cedric.frayssinet {SSHA}HzxPUHw0JDEYbI0vvCFm27yQcIvFd/PI
19 uid=christelle.le-moine,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Christelle Christelle.Le-Moine@ac-dijon.fr Le-Moine christelle.le-moine {SSHA}HXTO8ebn415/EDWuMa6PuAtM8S/3mu0B
20 uid=christine.le-berre,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Christine christine.le-berre@ac-orleans-tours.fr Le-Berre christine.le-berre {SSHA}thQDWozt9FvGJ8pCqWuousCqKnZWTVZl
21 uid=christophe.breneliere,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Christophe christophe.breneliere@ac-poitiers.fr Breneliere christophe.breneliere {SSHA}flbNVQYTer9pJ7+3F4HiRUPDp/lzQzRz
22 uid=christophe.leon,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Christophe christophe.leon@ac-reunion.fr Leon christophe.leon {SSHA}Uz5y9mLfF6PN5z8crq6jTKOQR/88a53Y
23 uid=delphine.michaut,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Delphine delphine.michaut@ac-besancon.fr Michaut delphine.michaut {SSHA}bpug5gSSdWXF4cwt6Jw+dE6n17tnYV43
24 uid=dominique.quere,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Dominique dominique.quere@ac-poitiers.fr Quere dominique.quere {SSHA}UK0X/G5esO51LnoKYyrhvief6VYyVFBk
25 uid=eric.chaumet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Eric eric.chaumet@ac-poitiers.fr Chaumet eric.chaumet {SSHA}++gu8tkych+ydNaGWVC4Xf0jTvRzM1Fn
26 uid=eric.scherr,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Eric eric.scherr@ac-strasbourg.fr Scherr eric.scherr {SSHA}Ut0FT+D1/CUu+vbTyo7y7dHRZ8FoT1Ix
27 uid=esat.bylykbashi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Esat esat.bylykbashi@ac-creteil.fr Bylykbashi esat.bylykbashi {SSHA}/l/gK4jB8X90tMw7Vbir90MDxbVHRHNO
28 uid=francis.grandjean,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Francis francis.grandjean@ac-orleans-tours.fr Grandjean francis.grandjean {SSHA}DyhhDi57KyZODkvsHSnUR89Og40zLjVi
29 uid=francois.granger,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr François francois.granger@ac-orleans-tours.fr Granger francois.granger {SSHA}WY/Lkb/EglsRBBhRF9wF+5r8YbtYUXAy
30 uid=francois.millet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Francois francois.millet@ac-reunion.fr Millet francois.millet {SSHA}CkOlrt5KRy/dXDo0z6x0C+WDOjRhbEd1
31 uid=frederic.rivero,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Frederic frederic.rivero@ac-reims.fr Rivero frederic.rivero {SSHA}3TyuXkY6LB2oBjQ4SInhGc6SKtMxZjRp
32 uid=geraldine.carreno,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Geraldine geraldine.carreno@ac-aix-marseille.fr Carreno geraldine.carreno {SSHA}znjzbwykU5ykXt/kG9Ngl/ro5Z9iZEZY
33 uid=geraldine.nari,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Geraldine geraldine.nari@ac-creteil.fr Nari geraldine.nari {SSHA}BueKePIzgzGGU9fVCh/RkszhXctoYzBH
34 uid=gilles.defilippi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Gilles gilles.defilippi@ac-creteil.fr Defilippi gilles.defilippi {SSHA}OkiaSvrE2YtEPNELQ5WRUsTF6oNoFEir
35 uid=guillaume.bonzoms,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Guillaume guillaume.bonzoms@ac-besancon.fr Bonzoms guillaume.bonzoms {SSHA}3ipTIv8Sd7dDGasYUWBeCXc4Vs5FSzZt
36 uid=igor.godi,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Igor igor.godi@ac-reims.fr Godi igor.godi {SSHA}fBbgUKvWZxvMpU2ypmWiQpNnvsNSY1M2
37 uid=isabelle.tordjman,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Isabelle isabelle.tordjman@ac-creteil.fr Tordjman isabelle.tordjman {SSHA}w5c0QA93m09kt7e1XLDnVDUCBVdVemZV
38 uid=jacques.poulet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Jacques jacques.poulet@ac-besancon.fr Poulet jacques.poulet {SSHA}AeJsQ4ePn6dQt+pkBlvzvQ2wqudqR8ZI
39 uid=jean-marc.bruot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Jean-Marc jean-marc.bruot@ac-besancon.fr Bruot jean-marc.bruot {SSHA}PeSKQyhg/ImODDyjsVIzEn+aftfO91e+
40 uid=joel.cuissinat,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Joel joel.cuissinat@ac-dijon.fr Cuissinat joel.cuissinat {SSHA}mggWTO4oAfwXUZJs1jwAypip+5dsbE91
41 uid=katia.merceron,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Katia katia.merceron@ac-poitiers.fr Merceron katia.merceron {SSHA}u2UsR5/7W03wqAiP+wU+h4mYmo55wz2A
42 uid=laurent.brillard,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Laurent laurent.brillard@ac-reunion.fr Brillard laurent.brillard {SSHA}2XozZq+pvHtBnxWASqChx6+YBRZjbWpT
43 uid=luc.bourdot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Luc luc.bourdot@ac-dijon.fr Bourdot luc.bourdot {SSHA}fyU7t66LATGWZPfz9LTy0UlN+B8zYzlk
44 uid=lucas.francavilla,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Lucas lucas.francavilla@ac-dijon.fr Francavilla lucas.francavilla {SSHA}qIaUF7z+EBpZIu6zariVzv4Bj7VoNmZo
45 uid=ludovic.cavalier,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Ludovic ludovic.cavalier@ac-poitiers.fr Cavalier ludovic.cavalier {SSHA}hCvJVhzhM1wdhayyHqKl/iid9Vii78MG
46 uid=mathieu.terroba,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Mathieu mathieu.terroba@ac-poitiers.fr Terroba mathieu.terroba {SSHA}ipfHOQra9BqDeodNPjooaLgroTjSTFaq
47 uid=mchristine.jamotte,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Marie-Christine mchristine.jamotte@ac-reims.fr Jamotte mchristine.jamotte {SSHA}tU9oPSws4uZEqfWGIBdroLuHgXZadEhP
48 uid=mnzali,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Murphy murphy.nzali@ac-besancon.fr Nzali mnzali {SSHA}8PYG3iz+7E+8k5Bp5iGNTSzwTPCEb58n
49 uid=nathalie.becoulet,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Nathalie nathalie.becoulet.dane@ac-besancon.fr Becoulet nathalie.becoulet {SSHA}bTGMES7dOPO3VgD1A+w9oBbaNxlPbDlv
50 uid=olivier.janvois,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Olivier olivier.janvois@ac-orleans-tours.fr Janvois olivier.janvois {SSHA}xx+qK51jt/cOko4k5mCLYskDBrdTiUWf
51 uid=olivier.maurel,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Olivier olivier.maurel@ac-aix-marseille.fr Maurel olivier.maurel {SSHA}eT9gLoCocqcgxxsSQRjJ5D5B0jmRfAa2
52 uid=pascale.montrol-amouroux,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Pascale pascale.montrol-amouroux@ac-orleans-tours.fr Montrol-Amouroux pascale.montrol-amouroux {SSHA}UHk9i//qJctHhWT3akQtH2d2hE54VEhw
53 uid=patrick.ciurleo,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Patrick patrick.ciurleo@ac-nice.fr Ciurleo patrick.ciurleo {SSHA}Ueb55JTdKAI8Kd0ia5rN0yPHfGVFR0pj
54 uid=patrick.lemaire,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Patrick patrick.lemaire@ac-reims.fr Lemaire patrick.lemaire {SSHA}AEGREW3ABVT4JMsS/HoUfK3ANlVKaGJo
55 uid=philippe.derouette,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr philippe philippe.derouette@ac-reunion.fr derouette philippe.derouette {SSHA}Levyhda4weF152capk12IMld8nfhWrUa
56 uid=philippe.juan,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Philippe philippe.juan@ac-nice.fr Juan philippe.juan {SSHA}lBBbw3zrzKdS0zIYJgsCgm3WJUQyLm1h
57 uid=philippe.roy,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Philippe philippe.roy@ac-aix-marseille.fr Roy philippe.roy {SSHA}i6l3A0a9/xquyQywz2u6WqX1oyD/gtFS
58 uid=pierre.cadeot,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Pierre pierre.cadeot@ac-nice.fr Cadeot pierre.cadeot {SSHA}kU+9cfejTaSmMFkRwT6SR45nGy9uSWxB
59 uid=pierre.colonna,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Pierre pierre.colonna-d-istria@ac-nice.fr Colonna d'Istria pierre.colonna {SSHA}DnFbEJo17IpIlzvkmv+cE4/4HQQwRS40
60 uid=raymond.dargein,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Raymond raymond.dargein@ac-creteil.fr Dargein raymond.dargein {SSHA}xkJ90qbKYnI3zfXbPLAOu4q9LApSZDVz
61 uid=renaud.dussol,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Renaud renaud.dussol@ac-nice.fr Dussol renaud.dussol {SSHA}wEgA4aM0tJnSI+XmTV+tFtWIAskuOGxT
62 uid=rozenn.dagorn,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Rozenn rozenn.dagorn@ac-creteil.fr Dagorn rozenn.dagorn {SSHA}yrRO0ZFaSJHwfX/6bKV0saqT2rdGa2VJ
63 uid=stephane.klein,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Stephane stephane.klein@ac-reims.fr Klein stephane.klein {SSHA}Lvs5GK1+sS7ckiGbwoUPyqqnjUQvTlN2
64 uid=thi-houng.phan,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Thi-Houng thi-houng.phan@ac-orleans-tours.fr Phan thi-houng.phan {SSHA}GreIBw1HWHkRmoYLGL5tTf0iObZEMVlp
65 uid=thierry.faure,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Thierry thierry.faure@ac-martinique.fr Faure thierry.faure {SSHA}0eq55Zv2Eb6up/wthe6wteLhOw9IUXVW
66 uid=veronique.neret,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Veronique veronique.neret@ac-orleans-tours.fr Neret veronique.neret {SSHA}3SCcozjar6pNRJF8A8K3jI9WSnro9yDK
67 uid=vincent.mergel,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Vincent vincent.mergel@ac-besancon.fr Mergel vincent.mergel {SSHA}ACyRYiXKPRi3TAIMoiz+SXdha0aw/IT7
68 uid=vlacoume,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Valerie valerie.lacoume@ac-reims.fr Lacoume vlacoume {SSHA}nX8aSTd+rc0CMxC4BJrGaSj0aixpRGNE
69 uid=z.lassed,ou=local,ou=personnels,ou=utilisateurs,ou=00123456,ou=ac-dijon,ou=education,o=gouv,c=fr Ali z.lassed@ac-reims.fr Lassed z.lassed {SSHA}TTa5r13E7wN6LdGHmtW14Dc+POgxVFdk

View File

@ -0,0 +1,156 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Cadoles\CoreBundle\Entity\Country;
use Cadoles\CoreBundle\Entity\Niveau02;
class AjaxController extends Controller
{
public function countrylistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$em = $this->getDoctrine()->getManager();
$page_limit=$request->query->get('page_limit');
$q=$request->query->get('q');
$qb = $em->createQueryBuilder();
$qb->select('table')->from("CadolesCoreBundle:Country",'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$q."%")
->orderBy('table.label');
$datas=$qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult();
foreach($datas as $data) {
array_push($output,array("id"=>$data->getId(),"text"=>$data->getLabel()));
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function citylistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$em = $this->getDoctrine()->getManager();
$page_limit=$request->query->get('page_limit');
$q=$request->query->get('q');
$qb = $em->createQueryBuilder();
$qb->select('table')->from("CadolesCoreBundle:City",'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$q."%")
->orderBy('table.label');
$datas=$qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult();
foreach($datas as $data) {
array_push($output,array("id"=>$data->getId(),"text"=>$data->getLabel()));
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function niveau02listAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$em = $this->getDoctrine()->getManager();
$page_limit=$request->query->get('page_limit');
$q=$request->query->get('q');
$niveau01id=$request->query->get('niveau01');
$qb = $em->createQueryBuilder();
$qb->select('table')->from("CadolesCoreBundle:Niveau02",'table')
->where('table.label LIKE :value')
->andwhere('table.niveau01=:niveau01')
->setParameter("value", "%".$q."%")
->setParameter("niveau01", $niveau01id)
->orderBy('table.label');
$datas=$qb->setFirstResult(0)->setMaxResults($page_limit)->getQuery()->getResult();
foreach($datas as $data) {
array_push($output,array("id"=>$data->getId(),"text"=>$data->getLabel()));
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function niveau02readAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$id=$request->request->get('id');
if($id!="") {
$niveau02 = $this->getDoctrine()->getRepository("CadolesCoreBundle:Niveau02")->find($id);
array_push($output,$niveau02->getPostaladress());
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function groupreadAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$output=array();
$id=$request->request->get('id');
if($id!="") {
$group = $this->getDoctrine()->getRepository("CadolesCoreBundle:Group")->find($id);
$users=array();
foreach($group->getUsers() as $usergroup) {
array_push($users,array(
$usergroup->getUser()->getId(),
$usergroup->getUser()->getUsername(),
$usergroup->getUser()->getLastname(),
$usergroup->getUser()->getFirstname(),
$usergroup->getUser()->getAvatar(),
));
}
array_push($output,array($group->getLabel(),$users));
}
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
class ConfigController extends Controller
{
public function homeAction(Request $request)
{
return $this->render('CadolesCoreBundle:Core:config.html.twig');
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
class CoreController extends Controller
{
public function homeAction(Request $request)
{
$framed=$request->query->get('framed');
return $this->render('CadolesCoreBundle:Core:home.html.twig');
}
public function refreshAction(Request $request)
{
return $this->render('CadolesCoreBundle:Core:refresh.html.twig');
}
}

View File

@ -0,0 +1,160 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\HttpFoundation\Session\Session;
class CropController extends Controller
{
// Etape 01 - Téléchargement de l'image
public function crop01Action()
{
return $this->render('CadolesCoreBundle:Crop:crop01.html.twig');
}
// Etape 02 - Couper votre l'image
public function crop02Action(Request $request)
{
// Récupération de l'image à cropper
$session = new Session();
$large_image_location = "uploads/avatar/".$session->get('uploadavatar');
// Récupérer les tailles de l'image
$width = $this->getWidth($large_image_location);
$height = $this->getHeight($large_image_location);
// Définir le pourcentage de réduction de l'image
$max_height=400;
$max_width=860;
$scale = $max_height/$height;
if(($width*$scale)>$max_width) {
$scale = $max_width/$width;
}
$this->resizeImage($large_image_location,$width,$height,$scale);
// Construction du formulaire
$form = $this->createFormBuilder()
->add('submit',SubmitType::class,array("label" => "Valider","attr" => array("class" => "btn btn-success","onclick" => "reportThumb()")))
->add('x1',HiddenType::class)
->add('y1',HiddenType::class)
->add('x2',HiddenType::class)
->add('y2',HiddenType::class)
->add('w',HiddenType::class)
->add('h',HiddenType::class)
->getForm();
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur validation on généère la miniature croppée
if ($form->get('submit')->isClicked() && $form->isValid()) {
// Récupération des valeurs du formulaire
$data = $form->getData();
$thumb_image_location = "uploads/avatar/thumb_".$session->get('uploadavatar');;
$cropped = $this->resizeThumbnailImage($thumb_image_location, $large_image_location,$data["w"],$data["h"],$data["x1"],$data["y1"],$scale);
}
return $this->render('CadolesCoreBundle:Crop:crop02.html.twig', array('form' => $form->createView()));
}
// Calcul de la hauteur
protected function getHeight($image) {
$size = getimagesize($image);
$height = $size[1];
return $height;
}
// Cacul de la largeur
protected function getWidth($image) {
$size = getimagesize($image);
$width = $size[0];
return $width;
}
protected function resizeImage($image,$width,$height,$scale) {
list($imagewidth, $imageheight, $imageType) = getimagesize($image);
$imageType = image_type_to_mime_type($imageType);
$newImageWidth = ceil($width * $scale);
$newImageHeight = ceil($height * $scale);
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
switch($imageType) {
case "image/gif":
$source=imagecreatefromgif($image);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
$source=imagecreatefromjpeg($image);
break;
case "image/png":
case "image/x-png":
$source=imagecreatefrompng($image);
break;
}
imagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);
switch($imageType) {
case "image/gif":
imagegif($newImage,$image);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
imagejpeg($newImage,$image,90);
break;
case "image/png":
case "image/x-png":
imagepng($newImage,$image);
break;
}
chmod($image, 0640);
return $image;
}
protected function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){
list($imagewidth, $imageheight, $imageType) = getimagesize($image);
$imageType = image_type_to_mime_type($imageType);
$newImageWidth = ceil($width * $scale);
$newImageHeight = ceil($height * $scale);
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
switch($imageType) {
case "image/gif":
$source=imagecreatefromgif($image);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
$source=imagecreatefromjpeg($image);
break;
case "image/png":
case "image/x-png":
$source=imagecreatefrompng($image);
break;
}
imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);
switch($imageType) {
case "image/gif":
imagegif($newImage,$thumb_image_name);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
imagejpeg($newImage,$thumb_image_name,90);
break;
case "image/png":
case "image/x-png":
imagepng($newImage,$thumb_image_name);
break;
}
chmod($thumb_image_name, 0640);
return $thumb_image_name;
}
}

View File

@ -0,0 +1,578 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Cadoles\CoreBundle\Entity\Group;
use Cadoles\CoreBundle\Entity\Usergroup;
use Cadoles\CoreBundle\Entity\Usermodo;
use Cadoles\CoreBundle\Form\GroupType;
class GroupController extends Controller
{
private $labelroute = 'cadoles_core_config_group';
private $labelentity = 'CadolesCoreBundle:Group';
private $labeldata = 'group';
private $labeldatas = 'groups';
public function listAction()
{
return $this->render('CadolesCoreBundle:Group:list.html.twig');
}
public function ajaxlistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('table')->from($this->labelentity,'table');
if($search["value"]!="") {
$qb ->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('table.label',$order[0]["dir"]);
break;
case 2 :
$qb->orderBy('table.fgopen',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
$action = "";
if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
if($data->getId()>0&&!$data->getFgall()&&$this->isGranted('ROLE_ADMIN')) $action.="<a href='".$this->generateUrl('cadoles_core_config_group_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
if(!$data->getFgall()) $action .="<a href='".$this->generateUrl('cadoles_core_config_group_users', array('id'=>$data->getId()))."'><i class='fa fa-users fa-fw'></i></a>";
array_push($output["data"],array($action,$data->getLabel(),($data->getFgopen()?"oui":"non")));
}
// Retour
return new Response(json_encode($output), 200);
}
public function ajaxusersnotinAction($id,Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$sub = $em->createQueryBuilder();
$sub->select("usergroup");
$sub->from("CadolesCoreBundle:UserGroup","usergroup");
$sub->andWhere('usergroup.user = user.id');
$sub->andWhere('usergroup.group = :groupid');
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$qb = $em->createQueryBuilder();
if($this->isGranted('ROLE_ADMIN'))
$qb->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->where($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->setParameter("groupid",$id);
else {
$usermodo=$this->get('security.token_storage')->getToken()->getUser()->getId();
$qb->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:UserModo','usermodo')
->where($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->setParameter("groupid",$id);
}
$total=$qb->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
if($this->isGranted('ROLE_ADMIN'))
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->where('user.username LIKE :value OR user.email LIKE :value')
->andWhere($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->setParameter("value", "%".$search["value"]."%")
->setParameter("groupid",$id)
->getQuery()
->getSingleScalarResult();
else
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:UserModo','usermodo')
->where('user.username LIKE :value OR user.email LIKE :value')
->andWhere($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->setParameter("value", "%".$search["value"]."%")
->setParameter("groupid",$id)
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('user')->from("CadolesCoreBundle:User",'user');
if($this->isGranted('ROLE_ADMIN'))
$qb->where($qb->expr()->not($qb->expr()->exists($sub->getDQL())));
else
$qb->from('CadolesCoreBundle:UserModo','usermodo')
->where($qb->expr()->not($qb->expr()->exists($sub->getDQL())))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo);
if($search["value"]!="") {
$qb ->andWhere('user.username LIKE :value OR user.email LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
$qb->setParameter("groupid",$id);
switch($order[0]["column"]) {
case 2 :
$qb->orderBy('user.username',$order[0]["dir"]);
break;
case 3 :
$qb->orderBy('user.email',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
// Action
$action = "";
$action.="<a style='cursor:pointer' onClick='addUsers(".$data->getId().")'><i class='fa fa-plus fa-fw'></i></a>";
// Avatar
$avatar="<img src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>";
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail()));
}
// Retour
return new Response(json_encode($output), 200);
}
public function ajaxusersinAction($id,Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$sub = $em->createQueryBuilder();
$sub->select("usergroup");
$sub->from("CadolesCoreBundle:UserGroup","usergroup");
$sub->andWhere('usergroup.user = user.id');
$sub->andWhere('usergroup.group = :groupid');
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$qb = $em->createQueryBuilder();
if($this->isGranted('ROLE_ADMIN'))
$qb->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->where($qb->expr()->exists($sub->getDQL()))
->setParameter("groupid",$id);
else {
$usermodo=$this->get('security.token_storage')->getToken()->getUser()->getId();
$qb->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:UserModo','usermodo')
->where($qb->expr()->exists($sub->getDQL()))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->setParameter("groupid",$id);
}
$total=$qb->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
if($this->isGranted('ROLE_ADMIN'))
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->where('user.username LIKE :value OR user.email LIKE :value')
->andWhere($qb->expr()->exists($sub->getDQL()))
->setParameter("value", "%".$search["value"]."%")
->setParameter("groupid",$id)
->getQuery()
->getSingleScalarResult();
else
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:UserModo','usermodo')
->where('user.username LIKE :value OR user.email LIKE :value')
->andWhere($qb->expr()->exists($sub->getDQL()))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->setParameter("value", "%".$search["value"]."%")
->setParameter("groupid",$id)
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('user')->from("CadolesCoreBundle:User",'user');
if($this->isGranted('ROLE_ADMIN'))
$qb->where($qb->expr()->exists($sub->getDQL()));
else
$qb->from('CadolesCoreBundle:UserModo','usermodo')
->where($qb->expr()->exists($sub->getDQL()))
->andWhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo);
if($search["value"]!="") {
$qb ->andWhere('user.username LIKE :value OR user.email LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
$qb->setParameter("groupid",$id);
switch($order[0]["column"]) {
case 2 :
$qb->orderBy('user.username',$order[0]["dir"]);
break;
case 3 :
$qb->orderBy('user.email',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
// Action
$action = "";
$action.="<a style='cursor:pointer' onClick='delUsers(".$data->getId().")'><i class='fa fa-minus fa-fw'></i></a>";
// Avatar
$avatar="<img src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>";
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail()));
}
// Retour
return new Response(json_encode($output), 200);
}
public function usergroupaddAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$output=array();
$userid=$request->request->get('userid');
$groupid=$request->request->get('groupid');
$usergroup=new Usergroup;
$usergroup->setUser($em->getRepository("CadolesCoreBundle:User")->find($userid));
$usergroup->setGroup($em->getRepository("CadolesCoreBundle:Group")->find($groupid));
$em->persist($usergroup);
$em->flush();
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function usergroupdelAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$output=array();
$userid=$request->request->get('userid');
$groupid=$request->request->get('groupid');
//dump($em->getRepository("CadolesCoreBundle:User")->find($userid));
$data = $em->getRepository("CadolesCoreBundle:Usergroup")->findOneBy(array("user"=>$userid,"group"=>$groupid));
$em->remove($data);
$em->flush();
$response = new Response(json_encode($output));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
public function submitAction(Request $request)
{
// Initialisation de l'enregistrement
$data = new Group();
// Création du formulaire
$form = $this->createForm(GroupType::class,$data,array("mode"=>"submit"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$data->setFgall(false);
$em = $this->getDoctrine()->getManager();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView()
));
}
public function updateAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(GroupType::class,$data,array("mode"=>"update"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"update");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'update',
'form' => $form->createView()
));
}
public function deleteAction($id,Request $request)
{
// Seule role admin peut supprimer un groupe
if(!$this->isGranted('ROLE_ADMIN'))
return $this->redirectToRoute($this->labelroute);
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(GroupType::class,$data,array("mode"=>"delete"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'form' => $form->createView()
));
}
public function usersAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Affichage du formulaire
return $this->render($this->labelentity.':users.html.twig', array(
$this->labeldata => $data
));
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getEntityBy($entity,$key,$value)
{
$em = $this->getDoctrine()->getManager();
$datas = $em->createQueryBuilder()
->select('u')
->from($entity, 'u')
->where('u.'.$key.'=:value')
->getQuery()->setParameter("value", $value)
->getResult();
if (!$datas) return false;
else return true;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
}
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
$tmp=$this->getEntityBy("CadolesCoreBundle:Niveau01","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un niveau de rang 01 utilise déjà ce label'));
$tmp=$this->getEntityBy("CadolesCoreBundle:Niveau02","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un niveau de rang 02 utilise déjà ce label'));
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,267 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Cadoles\CoreBundle\Entity\Niveau01;
use Cadoles\CoreBundle\Form\Niveau01Type;
class Niveau01Controller extends Controller
{
private $labelroute = 'cadoles_core_config_niveau01';
private $labelentity = 'CadolesCoreBundle:Niveau01';
private $labeldata = 'niveau01';
private $labeldatas = 'niveau01s';
public function listAction()
{
return $this->render('CadolesCoreBundle:Niveau01:list.html.twig');
}
public function ajaxlistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('table')->from($this->labelentity,'table');
if($search["value"]!="") {
$qb ->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('table.label',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
$action ="<a href='".$this->generateUrl('cadoles_core_config_niveau01_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
if($data->getId()>0) $action.="<a href='".$this->generateUrl('cadoles_core_config_niveau01_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
array_push($output["data"],array($action,$data->getLabel()));
}
// Retour
return new Response(json_encode($output), 200);
}
public function submitAction(Request $request)
{
// Initialisation de l'enregistrement
$data = new Niveau01();
// Création du formulaire
$form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"submit"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$em = $this->getDoctrine()->getManager();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView()
));
}
public function updateAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"update"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"update");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'update',
'form' => $form->createView()
));
}
public function deleteAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(Niveau01Type::class,$data,array("mode"=>"delete"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'form' => $form->createView()
));
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getEntityBy($entity,$key,$value)
{
$em = $this->getDoctrine()->getManager();
$datas = $em->createQueryBuilder()
->select('u')
->from($entity, 'u')
->where('u.'.$key.'=:value')
->getQuery()->setParameter("value", $value)
->getResult();
if (!$datas) return false;
else return true;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
// On s'assure que le niveau01 n'est pas rattaché à des utilisateurs
if($data->getUsers()->count() > 0) {
$form->addError(new FormError('Un utilisateur utilise ce niveau de rang 01 : suppression impossible'));
}
if($data->getRegistrations()->count() > 0) {
$form->addError(new FormError('Une inscription utilise ce niveau de rang 01 : suppression impossible'));
}
if($data->getNiveau02s()->count() > 0) {
$form->addError(new FormError('Un niveau de rang 02 utilise ce niveau de rang 01 : suppression impossible'));
}
}
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
$tmp=$this->getEntityBy("CadolesCoreBundle:Group","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un groupe utilise déjà ce label'));
$tmp=$this->getEntityBy("CadolesCoreBundle:Niveau02","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un niveau de rang 02 utilise déjà ce label'));
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,264 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Cadoles\CoreBundle\Entity\Niveau02;
use Cadoles\CoreBundle\Form\Niveau02Type;
class Niveau02Controller extends Controller
{
private $labelroute = 'cadoles_core_config_niveau02';
private $labelentity = 'CadolesCoreBundle:Niveau02';
private $labeldata = 'niveau02';
private $labeldatas = 'niveau02s';
public function listAction()
{
return $this->render('CadolesCoreBundle:Niveau02:list.html.twig');
}
public function ajaxlistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('table')->from($this->labelentity,'table');
if($search["value"]!="") {
$qb ->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('table.label',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
$action ="<a href='".$this->generateUrl('cadoles_core_config_niveau02_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
if($data->getId()>0) $action.="<a href='".$this->generateUrl('cadoles_core_config_niveau02_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
array_push($output["data"],array($action,$data->getLabel()));
}
// Retour
return new Response(json_encode($output), 200);
}
public function submitAction(Request $request)
{
// Initialisation de l'enregistrement
$data = new Niveau02();
// Création du formulaire
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"submit"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$em = $this->getDoctrine()->getManager();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView()
));
}
public function updateAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"update"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"update");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'update',
'form' => $form->createView(),
));
}
public function deleteAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(Niveau02Type::class,$data,array("mode"=>"delete"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'form' => $form->createView(),
));
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getEntityBy($entity,$key,$value)
{
$em = $this->getDoctrine()->getManager();
$datas = $em->createQueryBuilder()
->select('u')
->from($entity, 'u')
->where('u.'.$key.'=:value')
->getQuery()->setParameter("value", $value)
->getResult();
if (!$datas) return false;
else return true;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
// On s'assure que le Niveau02 n'est pas rattaché à des utilisateurs
if($data->getUsers()->count() > 0) {
$form->addError(new FormError('Un utilisateur utilise ce niveau de rang 02 : suppression impossible'));
}
if($data->getRegistrations()->count() > 0) {
$form->addError(new FormError('Une inscription utilise ce niveau de rang 02 : suppression impossible'));
}
}
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
$tmp=$this->getEntityBy("CadolesCoreBundle:Group","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un groupe utilise déjà ce label'));
$tmp=$this->getEntityBy("CadolesCoreBundle:Niveau01","label",$data->getLabel());
if($tmp) $form->addError(new FormError('Un niveau de rang 01 utilise déjà ce label'));
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,745 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Cadoles\CoreBundle\Entity\User;
use Cadoles\CoreBundle\Entity\Registration;
use Cadoles\CoreBundle\Form\RegistrationType;
use Cadoles\CoreBundle\Form\UserType;
use Cadoles\CoreBundle\Form\ResetpwdType;
class RegistrationController extends Controller
{
private $labelroute = 'cadoles_core_config_registration';
private $labelentity = 'CadolesCoreBundle:Registration';
private $labeldata = 'registration';
private $labeldatas = 'registrations';
public function listAction()
{
return $this->render($this->labelentity.':list.html.twig');
}
public function ajaxlistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
if($this->isGranted('ROLE_ADMIN'))
$total = $em->createQueryBuilder()->select('COUNT(registration)')->from($this->labelentity,'registration')->getQuery()->getSingleScalarResult();
else {
$usermodo=$this->get('security.token_storage')->getToken()->getUser()->getId();
$total = $em->createQueryBuilder()
->select('COUNT(registration)')
->from($this->labelentity,'registration')
->from("CadolesCoreBundle:UserModo",'usermodo')
->where("usermodo.niveau01 = registration.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->getQuery()->getSingleScalarResult();
}
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
if($this->isGranted('ROLE_ADMIN'))
$totalf= $em->createQueryBuilder()
->select('COUNT(registration)')
->from($this->labelentity,'registration')
->where('registration.username LIKE :value')
->orWhere('registration.email LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
else
$totalf= $em->createQueryBuilder()
->select('COUNT(registration)')
->from($this->labelentity,'registration')
->from("CadolesCoreBundle:UserModo",'usermodo')
->where('registration.username LIKE :value OR registration.email LIKE :value')
->andWhere("usermodo.niveau01 = registration.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("value", "%".$search["value"]."%")
->setParameter("userid", $usermodo)
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
if($this->isGranted('ROLE_ADMIN')) {
$qb->select('registration')->from($this->labelentity,'registration')->from('CadolesCoreBundle:Niveau01','niveau01');
$qb->where('registration.niveau01=niveau01.id');
}
else{
$qb->select('registration')->from($this->labelentity,'registration')->from('CadolesCoreBundle:Niveau01','niveau01')->from("CadolesCoreBundle:UserModo",'usermodo');
$qb->where('registration.niveau01=niveau01.id')
->andWhere("usermodo.niveau01 = registration.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo);
}
if($search["value"]!="") {
$qb ->andWhere('registration.username LIKE :value OR registration.email LIKE :value OR niveau01.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('registration.username',$order[0]["dir"]);
break;
case 2 :
$qb->orderBy('registration.email',$order[0]["dir"]);
break;
case 3 :
$qb->orderBy('niveau01.label',$order[0]["dir"]);
break;
case 4 :
$qb->orderBy('registration.statut',$order[0]["dir"]);
break;
case 5 :
$qb->orderBy('registration.keyexpire',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
$action ="";
// Si inscription non périmée
if($data->getStatut()->getId()<=2) {
$action.="<a href='".$this->generateUrl('cadoles_core_config_registration_send', array('id'=>$data->getId()))."'><i class='fa fa-envelope fa-fw'></i></a>";
}
$action.="<a href='".$this->generateUrl('cadoles_core_config_registration_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
array_push($output["data"],array(
$action,
$data->getUsername(),
$data->getEmail(),
$data->getNiveau01()->getLabel(),
$data->getStatut()->getLabel(),
(is_null($data->getKeyexpire())?"":$data->getKeyexpire()->format('d/m/Y H:i:s'))
));
}
// Retour
return new Response(json_encode($output), 200);
}
public function submitAction(Request $request)
{
$session = new Session();
$data = new Registration();
// Création du formulaire
$form = $this->createForm(RegistrationType::class,$data,array("mode"=>"submit"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation(z)
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
$appname = $this->getParameter('appname');
$noreply = $this->getParameter('noreply');
$keyterm = $this->getParameter('keyterm');
$moderegistration = $this->getParameter('moderegistration');
// Encodage password
/*
$salt=uniqid(mt_rand());
$data->setSalt($salt);
$encoder = $this->container->get('security.encoder_factory')->getEncoder($data);
$password = $encoder->encodePassword($data->getPassword(),$data->getSalt());
$data->setPassword($password);
*/
// si mode de registration byuser
if($moderegistration=="byuser") {
$idstatut=2;
}
else {
// On recherche le domaine du mail dans la liste blanche
$email=explode("@",$data->getEmail());
$domaine=end($email);
$whitelist = $em->getRepository("CadolesCoreBundle:Whitelist")->findBy(["label"=>$domaine]);
$idstatut=(!$whitelist?1:2);
}
$statut = $em->getRepository("CadolesCoreBundle:Statut")->find($idstatut);
$data->setStatut($statut);
// si non : validation par administrateur
if($idstatut==1) {
// Email à destination de l'inscript pour le prévenir qu'un administrateur doit valider
$text="Votre inscription a bien été enregistrée.\nCependant, un administrateur doit encore valider votre inscription avant que celle-ci ne devienne effective.\n\nVous recevrez un mail quand votre inscription sera validée";
$template="template";
$mail_params=array(
"subject" => $appname." : Inscription en cours de validation",
"body_html"=>nl2br($text),
"body_text"=>$text
);
$to = $data->getEmail();
$niveau01id=$data->getNiveau01()->getId();
$from = $noreply;
$fromName = $appname;
$message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
$info=$mail_params["body_html"];
// Email à l'ensemble administrateurs pour les prévenir qu'il y a une personne à valider
$emailadmins= $em ->createQueryBuilder()
->select('table.email')
->from("CadolesCoreBundle:User",'table')
->where('table.role = :value')
->setParameter("value", "ROLE_ADMIN")
->getQuery()
->getResult(\Doctrine\ORM\Query::HYDRATE_SCALAR);
$to=array();
$from = $noreply;
$fromName = $appname;
foreach($emailadmins as $emailadmin) {
array_push($to,$emailadmin["email"]);
}
// Email à l'ensemble des modérateurs du service pour les prévenir qu'il y a une personne à valider
$emailmodos= $em ->createQueryBuilder()
->select('user.email')
->from("CadolesCoreBundle:UserModo",'usermodo')
->from("CadolesCoreBundle:User",'user')
->where("usermodo.niveau01 = :niveau01id")
->andWhere("user.id = usermodo.user")
->andWhere('user.role = :value')
->setParameter("niveau01id", $niveau01id)
->setParameter("value", "ROLE_MODO")
->getQuery()
->getResult(\Doctrine\ORM\Query::HYDRATE_SCALAR);
$from = $noreply;
$fromName = $appname;
foreach($emailmodos as $emailmodo) {
array_push($to,$emailmodo["email"]);
}
$text="Un utilisateur dont le mail nest pas en liste blanche souhaite sinscrire au ".$appname.".\nMerci dapprouver son inscription pour finaliser celle-ci.";
$mail_params=array(
"subject" => $appname." : Inscription à valider",
"body_html"=>nl2br($text),
"body_text"=>$text
);
$message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
}
// si oui : Domaine de confiance : email de validation d'inscription directement à l'utilisateur
else {
// Génération d'une clé de validation
$key = Uuid::uuid4();
// Génération de la date de fin de validité de la clé
$keyexpire=new \DateTime();
$keyexpire->add(new \DateInterval('PT'.$keyterm.'H'));
// Enregistrement des valeurs
$data->setKeyvalue($key->toString());
$data->setKeyexpire($keyexpire);
// Email à l'utilisateur
$url = $this->generateUrl('cadoles_core_registration_validation', array("key"=>$key->toString()), UrlGeneratorInterface::ABSOLUTE_URL);
$template="template";
$mail_params=array(
"subject" => $appname." : confirmation de validation",
"body_html"=>"<p>Merci de confirmer votre inscription en cliquant sur le lien suivant</p><p><a href='".$url."'>".$url."</a></p><br><p>Attention vous disposez dun délai de 8 heures pour le faire. Passé ce délai, vous devrez vous réinscrire.</p>",
"body_text"=>"Merci de confirmer votre inscription en cliquant sur le lien suivant\r\n$url\n\nAttention vous disposez dun délai de 8 heures pour le faire. Passé ce délai, vous devrez vous réinscrire."
);
$info="Vous allez recevoir un mail de confirmation pour finaliser votre inscription";
$to = $data->getEmail();
$from = $noreply;
$fromName = $appname;
$message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
}
// Sauvegarde
$em->persist($data);
$em->flush();
// A voir retour sur un écran d'info indiquant si validation par admion ou s'il doit matter ses email
return $this->render($this->labelentity.':info.html.twig', array(
'info' => $info,
'mode' => "info"
));
}
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView()
));
}
public function sendAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(RegistrationType::class,$data,array("mode"=>"send"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"send");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
$appname = $this->getParameter('appname');
$noreply = $this->getParameter('noreply');
$keyterm = $this->getParameter('keyterm');
// Génération d'une clé de validation
$key = Uuid::uuid4();
// Génération de la date de fin de validité de la clé
$keyexpire=new \DateTime();
$keyexpire->add(new \DateInterval('PT'.$keyterm.'H'));
// Enregistrement des valeurs
$data->setKeyvalue($key->toString());
$data->setKeyexpire($keyexpire);
// Statut en attente validation utilisateur
$data->setStatut($em->getRepository("CadolesCoreBundle:Statut")->find(2));
// Email à l'utilisateur
$url = $this->generateUrl('cadoles_core_registration_validation', array("key"=>$key->toString()), UrlGeneratorInterface::ABSOLUTE_URL);
$template="template";
$mail_params=array(
"subject" => $appname." : confirmation de validation",
"body_html"=>"<p>Merci de confirmer votre inscription en cliquant sur le lien suivant</p><p><a href='".$url."'>".$url."</a></p><br><p>Attention vous disposez dun délai de 8 heures pour le faire. Passé ce délai, vous devrez vous réinscrire.</p>",
"body_text"=>"Merci de confirmer votre inscription en cliquant sur le lien suivant\r\n$url\n\nAttention vous disposez dun délai de 8 heures pour le faire. Passé ce délai, vous devrez vous réinscrire."
);
$info="Vous allez recevoir un mail de confirmation pour finaliser votre inscription";
$to = $data->getEmail();
$from = $noreply;
$fromName = $appname;
$message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
// Sauvegarde
$em->persist($data);
$em->flush();
return $this->redirectToRoute('cadoles_core_config_registration');
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'send',
'form' => $form->createView()
));
}
public function validationAction($key,Request $request)
{
$now=new \DateTime();
$em = $this->getDoctrine()->getManager();
$data = $em ->createQueryBuilder()
->select('table')
->from($this->labelentity,'table')
->where('table.keyvalue= :key')
->andWhere('table.keyexpire >= :date')
->setParameter("key", $key)
->setParameter("date", $now)
->getQuery()
->getResult();
if(!$data) {
$info="Clé de validation invalide";
$mode="danger";
}
else {
$url=$this->getParameter('eportail_login');
$info="<p>Votre compte est à présent activé</p><p>Vous allez être redirigé vers la mire de connexion</p><p><a href='".$url."'>Connexion</a>";
$mode="success";
// Initialisation de l'enregistrement
$user = new User();
$user->setAvatar("noavatar.png");
$user->setUsername($data[0]->getUsername());
$user->setEmail($data[0]->getEmail());
$user->setLastname($data[0]->getLastname());
$user->setFirstname($data[0]->getFirstname());
$user->setSalt($data[0]->getSalt());
$user->setPasswordDirect($data[0]->getPassword());
$user->setVisible($data[0]->getVisible());
$user->setNiveau01($data[0]->getNiveau01());
$user->setSiren($data[0]->getNiveau01()->getSiren());
$user->setNiveau02($data[0]->getNiveau02());
if($data[0]->getNiveau02()!==null) $user->setSiret($data[0]->getNiveau02()->getSiret());
$user->setUsualname($data[0]->getUsualname());
$user->setTelephonenumber($data[0]->getTelephonenumber());
$user->setPostaladress($data[0]->getPostaladress());
$user->setGivensname($data[0]->getGivensname());
$user->setBirthdate($data[0]->getBirthdate());
$user->setGender($data[0]->getGender());
$user->setJob($data[0]->getJob());
$user->setPosition($data[0]->getPosition());
$user->setBirthcountry($data[0]->getBirthcountry());
$user->setBirthplace($data[0]->getBirthplace());
$user->setRole("ROLE_USER");
$user->setAuthlevel("simple");
$user->setBelongingpopulation("agent");
// Sauvegarde
$em->persist($user);
$em->flush();
$em->remove($data[0]);
$em->flush();
}
return $this->render($this->labelentity.':info.html.twig', array(
'info' => $info,
'mode' => $mode
));
}
public function deleteAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(RegistrationType::class,$data,array("mode"=>"delete"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute('cadoles_core_config_registration');
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'form' => $form->createView()
));
}
public function resetpwd01Action(Request $request)
{
// Création du formulaire
$form = $this->createForm(ResetpwdType::class,null,array("mode"=>"resetpwd01"));
// Récupération des data du formulaire
$form->handleRequest($request);
$data = $form->getData();
// Sur erreur
if ($form->get('submit')->isClicked()) {
// On s'assure que le mail existe dans la base des utilisateurs
$user=$this->getUserBy("email",$data["email"]);
if(!$user) {
$form->addError(new FormError('Mail inconnu'));
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$appname = $this->getParameter('appname');
$noreply = $this->getParameter('noreply');
$keyterm = $this->getParameter('keyterm');
// Génération d'une clé de validation
$key = Uuid::uuid4();
// Génération de la date de fin de validité de la clé
$keyexpire=new \DateTime();
$keyexpire->add(new \DateInterval('PT'.$keyterm.'H'));
// Enregistrement des valeurs
$user[0]->setKeyvalue($key->toString());
$user[0]->setKeyexpire($keyexpire);
// Sauvegarde
$em = $this->getDoctrine()->getManager();
$em->persist($user[0]);
$em->flush();
// Email au user
$url = $this->generateUrl('cadoles_core_resetpwd02', array("key"=>$key->toString()), UrlGeneratorInterface::ABSOLUTE_URL);
$template="template";
$mail_params=array(
"subject" => $appname." : réinitialisation mot de passe",
"body_html"=>"<p>Merci de réinitialiser votre mot de passe en cliquant sur le lien suivant</p><p><a href='".$url."'>".$url."</a></p><br><p>Attention vous disposez dun délai de 8 heures pour le faire.</p><p>Vous pourrez par la suite vous connecter avec votre login : ".$user[0]->getUsername()."</p>",
"body_text"=>"Merci de réinitialiser votre mot de passe en cliquant sur le lien suivant\r\n$url\n\nAttention vous disposez dun délai de 8 heures pour le faire.\n\nVous pourrez par la suite vous connecter avec votre login : ".$user[0]->getUsername()
);
$to = $user[0]->getEmail();
$from = $noreply;
$fromName = $appname;
$message = $this->container->get('cadoles.core.service.mail');
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
// Info
$info="Vous allez recevoir un mail avec lien qui vous permettra de réinitialiser votre mot de passe";
$mode="success";
return $this->render($this->labelentity.':info.html.twig', array(
'info' => $info,
'mode' => $mode
));
}
// Affichage du formulaire
return $this->render($this->labelentity.':resetpwd01.html.twig', array(
'form' => $form->createView()
));
}
public function resetpwd02Action($key,Request $request)
{
$now=new \DateTime();
$em = $this->getDoctrine()->getManager();
$user = $em ->createQueryBuilder()
->select('table')
->from("CadolesCoreBundle:User",'table')
->where('table.keyvalue= :key')
->andWhere('table.keyexpire >= :date')
->setParameter("key", $key)
->setParameter("date", $now)
->getQuery()
->getResult();
if(!$user) {
$info="Clé de validation invalide";
$mode="danger";
return $this->render($this->labelentity.':info.html.twig', array(
'info' => $info,
'mode' => $mode
));
}
else {
// Création du formulaire
$form = $this->createForm(ResetpwdType::class,null,array("mode"=>"resetpwd02"));
// Récupération des data du formulaire
$form->handleRequest($request);
$data = $form->getData();
if($form->get('submit')) {
$password=$data["password"];
$message="";
if(!empty($password)) {
if (strlen($password) < '8') {
$message = "Votre mot de passe doit contenir au minimum 8 caractères, constitué de chiffres, de lettres et caractères spéciaux";
}
elseif(!preg_match("#[0-9]+#",$password)) {
$message = "Votre mot de passe doit contenir au minimum 8 caractères, constitué de chiffres, de lettres et caractères spéciaux";
}
elseif(!preg_match("#[a-zA-Z]+#",$password)) {
$message = "Votre mot de passe doit contenir au minimum 8 caractères, constitué de chiffres, de lettres et caractères spéciaux";
}
elseif(!preg_match("/[|!@#$%&*\/=?,;.:\-_+~^\\\]/",$password)) {
$message = "Votre mot de passe doit contenir au minimum 8 caractères, constitué de chiffres, de lettres et caractères spéciaux";
}
}
if($message!="") {
$form->addError(new FormError($message));
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
if ($form->get('submit')->isClicked() && $form->isValid()) {
$user[0]->setPassword($data["password"]);
$user[0]->setKeyvalue(null);
$user[0]->setKeyexpire(null);
// Sauvegarde
$em = $this->getDoctrine()->getManager();
$em->persist($user[0]);
$em->flush();
$info="Nouveau mot de passe prise en compte<br>Vous allez être rediriger vers la mire d'authentification";
$mode="success";
return $this->render($this->labelentity.':info.html.twig', array(
'info' => $info,
'mode' => $mode
));
}
// Affichage du formulaire
return $this->render($this->labelentity.':resetpwd02.html.twig', array(
'form' => $form->createView()
));
}
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getUserBy($key,$value)
{
$em = $this->getDoctrine()->getManager();
$datas = $em->createQueryBuilder()
->select('u')
->from('CadolesCoreBundle:User', 'u')
->where('u.'.$key.'=:value')
->getQuery()->setParameter("value", $value)
->getResult();
if (!$datas) return false;
else return $datas;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
}
if ($form->get('submit')->isClicked() && $mode=="submit") {
// Taille du login > 5
if (is_null($data->getUsername()) || strlen($data->getUsername()) < '5') {
$form->addError(new FormError('Taille minimum du login 5 caractères'));
}
// On s'assure que le username ne contient pas des caractères speciaux
$string = preg_replace('~[^a-zA-Z0-9._-]~', '', $data->getUsername());
if($string!=$data->getUsername())
{
$form->addError(new FormError('Caractères interdit dans votre login'));
}
// On s'assure que le username et le mail n'existe pas dans la table des users
if($this->getUserBy("username",$data->getUsername())||$this->getUserBy("email",$data->getEmail())) {
$form->addError(new FormError('Un utilisateur utilise déjà ce login ou cet email'));
}
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,165 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Cadoles\CoreBundle\Entity\User;
use Cadoles\CoreBundle\Form\LoginType;
class SecurityController extends Controller
{
public function loginAction(Request $request)
{
$targetpath=$request->getSession()->get("_security.main.target_path");
// Mode d'authentification
$modeauth=$this->getParameter('mode_auth');
switch($modeauth) {
case "SQL":
$authUtils = $this->get('security.authentication_utils');
// get the login error if there is one
$error = $authUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authUtils->getLastUsername();
return $this->render('CadolesCoreBundle:Security:login.html.twig', array(
'last_username' => $lastUsername,
'error' => $error
));
break;
case "CAS":
// Création d'une instance de eolephpCAS
$myphpCAS = new \eolephpCAS();
if (__CAS_LOGOUT){
if (method_exists($myphpCAS, 'eolelogoutRequests')){
$myphpCAS->eolelogoutRequests(false);
}
}
if (__CAS_VALIDER_CA) {
$myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA
} else {
if (method_exists("EolephpCAS", "setNoCasServerValidation")){
$myphpCAS->setNoCasServerValidation();
}
}
$myphpCAS->forceAuthentication();
$username = $myphpCAS->getUser();
$details = $myphpCAS->getDetails();
if(!isset($details["utilisateur"])&&isset($details["attributes"])) {
$details["utilisateur"]=$details["attributes"];
}
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username));
$em = $this->getDoctrine()->getManager();
// Autosubmit
if (!$user) {
$niveau01=$em->getRepository('CadolesCoreBundle:Niveau01')->findOneBy(array("id"=>-100));
$user = new User();
$user->setUsername($username);
$user->setPassword("CASPWD-".$username);
$user->setSalt("CASPWD-".$username);
$user->setNiveau01($niveau01);
$user->setSiren($user->getNiveau01()->getSiren());
$user->setSiret($user->getNiveau02()!==null?$user->getNiveau02()->getSiret():"");
$user->setEmail($details["utilisateur"]["email"][0]);
$user->setAvatar("noavatar.png");
$user->setVisible(true);
$user->setAuthlevel("simple");
$user->setRole("ROLE_USER");
}
// Autoupdate
$user->setFirstname($details["utilisateur"]["firstname"][0]);
$user->setLastname($details["utilisateur"]["lastname"][0]);
$user->setEmail($details["utilisateur"]["email"][0]);
$em->persist($user);
$em->flush();
// Autoconnexion
// Récupérer le token de l'utilisateur
$token = new UsernamePasswordToken($user, null, "main", $user->getRoles());
$this->get("security.token_storage")->setToken($token);
// Simuler l'evenement de connexion
$event = new InteractiveLoginEvent($request, $token);
$dispatcher = new EventDispatcher();
$dispatcher->dispatch("security.interactive_login", $event);
// Aller sur la page souhaitée au départ
if(empty($targetpath)) {
$targetpath="\\".$this->getParameter('alias');
return $this->redirect($targetpath);
}
else {
return $this->redirect($targetpath);
}
break;
}
}
public function logoutAction(Request $request)
{
/*
return $this->render('Security:logout.html.twig');
$this->get('security.context')->setToken(null);
$this->get('request')->getSession()->invalidate();
return $this->render('Security:logout.html.twig');
*/
}
public function killAction(Request $request)
{
if(isset($_GET["redirect"])) {
/*
$redirect=$_GET["redirect"];
$alias=$this->getParameter('alias');
$url=str_replace("/".$alias."/kill?redirect=".$redirect,"",urldecode($request->getUri()));
$url.=$redirect;
*/
$url=str_replace("kill","killall",urldecode($request->getUri()));
}
else $url = str_replace("/kill","",$request->getUri());
// Création d'une instance de eolephpCAS
$myphpCAS = new \eolephpCAS();
if (__CAS_VALIDER_CA) {
$myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA
} else {
if (method_exists("EolephpCAS", "setNoCasServerValidation")){
$myphpCAS->setNoCasServerValidation();
}
}
$myphpCAS->logout(array("service"=>$url));
}
public function killallAction(Request $request) {
$redirect=$_GET["redirect"];
return $this->render('CadolesCoreBundle:Security:logout.html.twig', array('redirect' => $redirect));
}
}

View File

@ -0,0 +1,581 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Cadoles\CoreBundle\Entity\User;
use Cadoles\CoreBundle\Entity\UserGroup;
use Cadoles\CoreBundle\Entity\UserModo;
use Cadoles\CoreBundle\Form\UserType;
class UserController extends Controller
{
private $labelroute = 'cadoles_core_config_user';
private $labelentity = 'CadolesCoreBundle:User';
private $labeldata = 'user';
private $labeldatas = 'users';
public function listAction($access)
{
return $this->render('CadolesCoreBundle:User:list.html.twig',array('access' => $access));
}
public function ajaxlistAction($access, Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
$viewniveau02=$this->getParameter('viewniveau02');
// Nombre total d'enregistrement
// Nombre total d'enregistrement
if($this->isGranted('ROLE_ADMIN'))
$total = $em->createQueryBuilder()->select('COUNT(user)')->from($this->labelentity,'user')->getQuery()->getSingleScalarResult();
else {
$usermodo=$this->get('security.token_storage')->getToken()->getUser()->getId();
$total = $em->createQueryBuilder()
->select('COUNT(user)')
->from($this->labelentity,'user')
->from("CadolesCoreBundle:UserModo",'usermodo')
->where("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->getQuery()->getSingleScalarResult();
}
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
if($this->isGranted('ROLE_ADMIN'))
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:Niveau01', 'niveau01')
->where('user.niveau01=niveau01.id')
->andWhere('user.username LIKE :value OR user.firstname LIKE :value OR user.lastname LIKE :value OR user.email LIKE :value OR user.role LIKE :value OR niveau01.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
else
$totalf= $em->createQueryBuilder()
->select('COUNT(user)')
->from('CadolesCoreBundle:User','user')
->from('CadolesCoreBundle:Niveau01', 'niveau01')
->from('CadolesCoreBundle:UserModo', 'usermodo')
->where('user.niveau01=niveau01.id')
->andWhere('user.username LIKE :value OR user.firstname LIKE :value OR user.lastname LIKE :value OR user.email LIKE :value OR user.role LIKE :value OR niveau01.label LIKE :value')
->andwhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo)
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
if($this->isGranted('ROLE_ADMIN')) {
$qb->select('user')->from($this->labelentity,'user')->from('CadolesCoreBundle:Niveau01','niveau01');
$qb->where('user.niveau01=niveau01.id');
}
else {
$qb->select('user')->from($this->labelentity,'user')->from('CadolesCoreBundle:Niveau01','niveau01')->from('CadolesCoreBundle:UserModo', 'usermodo');
$qb->where('user.niveau01=niveau01.id')
->andwhere("usermodo.niveau01 = user.niveau01")
->andWhere("usermodo.user = :userid")
->setParameter("userid", $usermodo);
}
if($search["value"]!="") {
$qb ->andWhere('user.username LIKE :value OR user.firstname LIKE :value OR user.lastname LIKE :value OR user.email LIKE :value OR user.role LIKE :value OR niveau01.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
if($access=="config") {
switch($order[0]["column"]) {
case 2 :
$qb->orderBy('user.username',$order[0]["dir"]);
break;
case 3 :
$qb->orderBy('user.lastname',$order[0]["dir"]);
break;
case 4 :
$qb->orderBy('user.firstname',$order[0]["dir"]);
break;
case 5 :
$qb->orderBy('user.email',$order[0]["dir"]);
break;
case 6 :
$qb->orderBy('niveau01.label',$order[0]["dir"]);
break;
case 9 :
$qb->orderBy('user.role',$order[0]["dir"]);
break;
}
}
else {
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('user.username',$order[0]["dir"]);
break;
case 2 :
$qb->orderBy('user.lastname',$order[0]["dir"]);
break;
case 3 :
$qb->orderBy('user.firstname',$order[0]["dir"]);
break;
case 4 :
$qb->orderBy('user.email',$order[0]["dir"]);
break;
case 5 :
$qb->orderBy('niveau01.label',$order[0]["dir"]);
break;
case 7 :
$qb->orderBy('user.role',$order[0]["dir"]);
break;
}
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
// Action
$action = "";
if($access=="config") {
$action.="<a href='".$this->generateUrl('cadoles_core_config_user_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
if($data->getId()>0) {
$action.="<a href='".$this->generateUrl('cadoles_core_config_user_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
}
}
// Groupes
$groups="";
foreach($data->getGroups() as $usergroup) {
$groups.=$usergroup->getGroup()->getLabel()."<br>";
}
$tmp=array();
if($access=="config") array_push($tmp,$action);
array_push($tmp,"<img src='/".$this->container->getParameter('alias')."/uploads/avatar/".$data->getAvatar()."' style='width:30px;background-color:#337ab7;margin:auto;display:block;'>");
array_push($tmp,$data->getUsername());
array_push($tmp,$data->getLastname());
array_push($tmp,$data->getFirstname());
array_push($tmp,"<a href='mailto:".$data->getEmail()."'>".$data->getEmail()."</a>");
array_push($tmp,$data->getNiveau01()->getLabel());
if($viewniveau02) array_push($tmp,($data->getNiveau02()!==null?$data->getNiveau02()->getLabel():""));
array_push($tmp,$groups);
array_push($tmp,$data->getRole());
array_push($output["data"],$tmp);
}
// Retour
return new Response(json_encode($output), 200);
}
public function submitAction(Request $request)
{
// Initialisation de l'enregistrement
$data = new User();
// Création du formulaire
$form = $this->createForm(UserType::class,$data,array("mode"=>"submit","access"=>"config","perm"=>$this->isGranted('ROLE_ADMIN'),"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId()));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$em = $this->getDoctrine()->getManager();
// On récupère le SIREN et le SIRET
$data->setSiren($data->getNiveau01()->getSiren());
$data->setSiret($data->getNiveau02()!==null?$data->getNiveau02()->getSiret():"");
// On récupère les groupes et on cacule ceux à ajouter ou à supprimer
$lstgroups=array_filter(explode(",",$form->get("linkgroups")->getData()));
$lstmodos=array_filter(explode(",",$form->get("linkmodos")->getData()));
// Sauvegarde
$em->persist($data);
$em->flush();
// On récupére l'enregistrement inséré
$iduser=$data->getId();
// Ajout des groupes
foreach($lstgroups as $idgroup) {
$group= new UserGroup();
$group->setUser($data);
$datagroup = $em->getRepository("CadolesCoreBundle:Group")->find($idgroup);
$user->setGroup($datagroup);
$em->persist($group);
$em->flush();
}
// Ajout des modos
foreach($lstmodos as $idmodo) {
$modo= new UserModo();
$modo->setUser($data);
$dataniveau01 = $em->getRepository("CadolesCoreBundle:Niveau01")->find($idmodo);
$modo->setNiveau01($dataniveau01);
$em->persist($modo);
$em->flush();
}
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'access' => 'config',
'listgroups' => $this->getListGroups("config"),
'listmodos' => $this->getListModos(),
'form' => $form->createView()
));
}
public function updateAction($id,$access,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
$oldpassword=$data->getPassword();
// Si un acces modo via console d'admin on s'assure qu'il a les droit dessus sinon retour à la liste
if($this->isGranted('ROLE_MODO')&&$access=="config") {
$niveau01=$data->getNiveau01();
$modos=$this->get('security.token_storage')->getToken()->getUser()->getmodos();
$fgperm=false;
foreach($modos as $modo) {
if($modo->getNiveau01()==$niveau01) $fgperm=true;
}
if(!$fgperm) return $this->redirectToRoute($this->labelroute);
}
// Récuparation des groupes associés
$oldlstgroups=[];
foreach($data->getGroups() as $group){
$oldlstgroups[] = $group->getGroup()->getId();
}
// Récuparation des modos associés
$oldlstmodos=[];
foreach($data->getModos() as $modo){
$oldlstmodos[] = $modo->getNiveau01()->getId();
}
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(UserType::class,$data,array("mode"=>"update","access"=>$access,"perm"=>($access=="config"?$this->isGranted('ROLE_ADMIN'):false),"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId()));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"update");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Si pas de changement de password on replace l'ancien
if($data->getPassword()=="") {
$data->setPassword($oldpassword);
}
// Sinon on encode le nouveau
else {
$data->setPassword($data->getPassword());
}
// Sauvegarde
$em->persist($data);
$em->flush();
// On récupère les groupes et on cacule ceux à ajouter ou à supprimer
$lstgroups=array_filter(explode(",",$form->get("linkgroups")->getData()));
$removegroups=array_diff($oldlstgroups,$lstgroups);
$addgroups=array_diff($lstgroups,$oldlstgroups);
// Ajout des nouveaux groupes
foreach($addgroups as $idgroup) {
$group= new UserGroup();
$group->setUser($data);
$datagroup = $em->getRepository("CadolesCoreBundle:Group")->find($idgroup);
$group->setGroup($datagroup);
$em->persist($group);
$em->flush();
}
// Suppression des groupes obsolètes
foreach($removegroups as $idgroup) {
// Lien Group User
$usergroups = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:UserGroup', 'table')
->where('table.user = :user AND table.group = :group')
->setParameter('user', $id)
->setParameter('group', $idgroup)
->getQuery()
->getResult();
foreach($usergroups as $usergroup) {
$em->remove($usergroup);
$em->flush();
}
}
// On récupère les modos et on cacule ceux à ajouter ou à supprimer
$lstmodos=array_filter(explode(",",$form->get("linkmodos")->getData()));
if($data->getRole()!="ROLE_MODO")
$lstmodos=array();
$removemodos=array_diff($oldlstmodos,$lstmodos);
$addmodos=array_diff($lstmodos,$oldlstmodos);
// Ajout des nouveaux modos
foreach($addmodos as $idmodo) {
$modo= new UserModo();
$modo->setUser($data);
$dataniveau01 = $em->getRepository("CadolesCoreBundle:Niveau01")->find($idmodo);
$modo->setNiveau01($dataniveau01);
$em->persist($modo);
$em->flush();
}
// Suppression des modos obsolètes
foreach($removemodos as $idmodo) {
// Lien Group User
$usermodos = $em ->createQueryBuilder()
->select('table')
->from('CadolesCoreBundle:UserModo', 'table')
->where('table.user = :user AND table.niveau01 = :niveau01')
->setParameter('user', $id)
->setParameter('niveau01', $idmodo)
->getQuery()
->getResult();
foreach($usermodos as $usermodo) {
$em->remove($usermodo);
$em->flush();
}
}
// Retour à la liste
if($access=="config")
return $this->redirectToRoute($this->labelroute);
else
return $this->redirectToRoute("cadoles_core_refresh");
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'update',
'access' => $access,
'listgroups' => $this->getListGroups($access),
'listmodos' => $this->getListModos(),
'form' => $form->createView()
));
}
public function deleteAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Si un acces modo via console d'admin on s'assure qu'il a les droit dessus sinon retour à la liste
if($this->isGranted('ROLE_MODO')&&$access=="config") {
$niveau01=$data->getNiveau01();
$modos=$this->get('security.token_storage')->getToken()->getUser()->getmodos();
$fgperm=false;
foreach($modos as $modo) {
if($modo->getNiveau01()==$niveau01) $fgperm=true;
}
if(!$fgperm) return $this->redirectToRoute($this->labelroute);
}
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(UserType::class,$data,array("mode"=>"delete","access"=>"config","perm"=>false,"userid"=>$this->get('security.token_storage')->getToken()->getUser()->getId()));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'access' => 'config',
'listgroups' => $this->getListGroups("config"),
'listmodos' => $this->getListModos(),
'form' => $form->createView()
));
}
public function profilAction(Request $request)
{
$user = $this->get('security.token_storage')->getToken()->getUser();
return $this->updateAction($user->getId(),"profil",$request);
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getRegistrationBy($key,$value)
{
$em = $this->getDoctrine()->getManager();
$datas = $em->createQueryBuilder()
->select('u')
->from('CadolesCoreBundle:registration', 'u')
->where('u.'.$key.'=:value')
->getQuery()->setParameter("value", $value)
->getResult();
if (!$datas) return false;
else return true;
}
protected function getListGroups($access)
{
$em = $this->getDoctrine()->getManager();
$qb=$em->createQueryBuilder();
$qb->select('b')->from('CadolesCoreBundle:Group','b');
if($access!="config")
$qb->where("b.fgopen=true");
$datas=$qb->getQuery()->getResult();
return $datas;
}
protected function getListModos()
{
$em = $this->getDoctrine()->getManager();
$qb=$em->createQueryBuilder();
$qb->select('b')->from('CadolesCoreBundle:Niveau01','b');
$datas=$qb->getQuery()->getResult();
return $datas;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
}
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
// Taille du login > 5
if (is_null($data->getUsername()) || strlen($data->getUsername()) < '5') {
$form->addError(new FormError('Taille minimum du login 5 caractères'));
}
// On s'assure que le username ne contient pas des caractères speciaux
$string = preg_replace('~[^a-zA-Z0-9._-]~', '', $data->getUsername());
if($string!=$data->getUsername())
{
$form->addError(new FormError('Caractères interdit dans votre login'));
}
// On s'assure que le username et le mail n'existe pas dans la table des users
if($this->getRegistrationBy("username",$data->getUsername())||$this->getRegistrationBy("email",$data->getEmail())) {
$form->addError(new FormError('Une inscription utilise déjà ce login ou cet email'));
}
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,237 @@
<?php
namespace Cadoles\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Cadoles\CoreBundle\Entity\Whitelist;
use Cadoles\CoreBundle\Form\WhitelistType;
class WhitelistController extends Controller
{
private $labelroute = 'cadoles_core_config_whitelist';
private $labelentity = 'CadolesCoreBundle:Whitelist';
private $labeldata = 'whitelist';
private $labeldatas = 'whitelists';
public function listAction()
{
return $this->render('CadolesCoreBundle:Whitelist:list.html.twig');
}
public function ajaxlistAction(Request $request)
{
// S'assurer que c'est un appel ajax
if (!$request->isXmlHttpRequest()) {
return new JsonResponse(array('message' => 'Interdit'), 400);
}
$em = $this->getDoctrine()->getManager();
$start=$request->query->get('start');
$length= $request->query->get('length');
$search= $request->query->get('search');
$draw= $request->query->get('draw');
$order= $request->query->get('order');
// Nombre total d'enregistrement
$total = $em->createQueryBuilder()->select('COUNT(table)')->from($this->labelentity,'table')->getQuery()->getSingleScalarResult();
// Nombre d'enregistrement filtré
if($search["value"]=="")
$totalf = $total;
else {
$totalf= $em->createQueryBuilder()
->select('COUNT(table)')
->from($this->labelentity,'table')
->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%")
->getQuery()
->getSingleScalarResult();
}
// Construction du tableau de retour
$output = array(
'draw' => $draw,
'recordsFiltered' => $totalf,
'recordsTotal' => $total,
'data' => array(),
);
// Parcours des Enregistrement
$qb = $em->createQueryBuilder();
$qb->select('table')->from($this->labelentity,'table');
if($search["value"]!="") {
$qb ->where('table.label LIKE :value')
->setParameter("value", "%".$search["value"]."%");
}
switch($order[0]["column"]) {
case 1 :
$qb->orderBy('table.label',$order[0]["dir"]);
break;
}
$datas=$qb->setFirstResult($start)->setMaxResults($length)->getQuery()->getResult();
foreach($datas as $data) {
$action ="<a href='".$this->generateUrl('cadoles_core_config_whitelist_update', array('id'=>$data->getId()))."'><i class='fa fa-file fa-fw'></i></a>";
$action.="<a href='".$this->generateUrl('cadoles_core_config_whitelist_delete', array('id'=>$data->getId()))."'><i class='fa fa-trash fa-fw'></i></a>";
array_push($output["data"],array($action,$data->getLabel()));
}
// Retour
return new Response(json_encode($output), 200);
}
public function submitAction(Request $request)
{
// Initialisation de l'enregistrement
$data = new Whitelist();
// Création du formulaire
$form = $this->createForm(WhitelistType::class,$data,array("mode"=>"submit"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm(null,$form,$request,$data,"submit");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$data = $form->getData();
$em = $this->getDoctrine()->getManager();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'submit',
'form' => $form->createView()
));
}
public function updateAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est modifiable
// Création du formulaire
$form = $this->createForm(WhitelistType::class,$data,array("mode"=>"update"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"update");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$data = $form->getData();
// Sauvegarde
$em->persist($data);
$em->flush();
// Retour à la liste
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'update',
'form' => $form->createView()
));
}
public function deleteAction($id,Request $request)
{
// Récupération de l'enregistrement courant
$data=$this->getData($id);
// Vérifier que cet enregistrement est supprimable
// Création du formulaire
$form = $this->createForm(WhitelistType::class,$data,array("mode"=>"delete"));
// Récupération des data du formulaire
$form->handleRequest($request);
// Sur erreur
$this->getErrorForm($id,$form,$request,$data,"delete");
// Sur validation
if ($form->get('submit')->isClicked() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($data);
$em->flush();
return $this->redirectToRoute($this->labelroute);
}
// Affichage du formulaire
return $this->render($this->labelentity.':edit.html.twig', array(
$this->labeldata => $data,
'mode' => 'delete',
'form' => $form->createView()
));
}
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
$datas = $em->getRepository($this->labelentity)->findAll();
return $datas;
}
protected function getData($id)
{
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository($this->labelentity)->find($id);
if (!$data) {
throw $this->createNotFoundException('Unable to find '.$this->labeldata);
}
return $data;
}
protected function getErrorForm($id,$form,$request,$data,$mode) {
if ($form->get('submit')->isClicked()&&$mode=="delete") {
}
if ($form->get('submit')->isClicked() && $mode=="submit") {
}
if ($form->get('submit')->isClicked() && !$form->isValid()) {
$this->get('session')->getFlashBag()->clear();
$validator = $this->get('validator');
$errors = $validator->validate($data);
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
$errors = $form->getErrors();
foreach( $errors as $error ) {
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
}
}
}
}

View File

@ -0,0 +1,143 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="city")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="code", message="Une commune existe déjà avec ce code")
*/
class City
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=20, unique=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="birhtplace", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set code
*
* @param string $code
*
* @return City
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set label
*
* @param string $label
*
* @return City
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return City
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,143 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="city")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="code", message="Une commune existe déjà avec ce code")
*/
class City
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=20, unique=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="birhtplace", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set code
*
* @param string $code
*
* @return City
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set label
*
* @param string $label
*
* @return City
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return City
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,142 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="country")
* @ORM\HasLifecycleCallbacks()
*
*/
class Country
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=20)
*/
private $code;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="birhtcountry", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set code
*
* @param string $code
*
* @return Country
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set label
*
* @param string $label
*
* @return Country
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Country
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,142 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="country")
* @ORM\HasLifecycleCallbacks()
*
*/
class Country
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=20)
*/
private $code;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="birhtcountry", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set code
*
* @param string $code
*
* @return Country
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set label
*
* @param string $label
*
* @return Country
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Country
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,173 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="groupe")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un group existe déjà avec ce label")
*/
class Group
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="boolean")
*/
private $fgopen;
/**
* @ORM\Column(type="boolean")
*/
private $fgall;
/**
* @var ArrayCollection $users
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserGroup", mappedBy="group", cascade={"persist"}, orphanRemoval=true)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Group
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set fgopen
*
* @param boolean $fgopen
*
* @return Group
*/
public function setFgopen($fgopen)
{
$this->fgopen = $fgopen;
return $this;
}
/**
* Get fgopen
*
* @return boolean
*/
public function getFgopen()
{
return $this->fgopen;
}
/**
* Set fgall
*
* @param boolean $fgall
*
* @return Group
*/
public function setFgall($fgall)
{
$this->fgall = $fgall;
return $this;
}
/**
* Get fgall
*
* @return boolean
*/
public function getFgall()
{
return $this->fgall;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $user
*
* @return Group
*/
public function addUser(\Cadoles\CoreBundle\Entity\UserGroup $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\UserGroup $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,173 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="groupe")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un group existe déjà avec ce label")
*/
class Group
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="boolean")
*/
private $fgopen;
/**
* @ORM\Column(type="boolean")
*/
private $fgall;
/**
* @var ArrayCollection $users
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserGroup", mappedBy="group", cascade={"persist"}, orphanRemoval=true)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Group
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set fgopen
*
* @param boolean $fgopen
*
* @return Group
*/
public function setFgopen($fgopen)
{
$this->fgopen = $fgopen;
return $this;
}
/**
* Get fgopen
*
* @return boolean
*/
public function getFgopen()
{
return $this->fgopen;
}
/**
* Set fgall
*
* @param boolean $fgall
*
* @return Group
*/
public function setFgall($fgall)
{
$this->fgall = $fgall;
return $this;
}
/**
* Get fgall
*
* @return boolean
*/
public function getFgall()
{
return $this->fgall;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $user
*
* @return Group
*/
public function addUser(\Cadoles\CoreBundle\Entity\UserGroup $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\UserGroup $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,272 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="niveau01")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un Niveau de rang 1 existe déjà avec ce label")
*/
class Niveau01
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="string", length=9)
*/
private $siren;
/**
* @var ArrayCollection $niveau02s
* @var Registration
*
* @ORM\OneToMany(targetEntity="Niveau02", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $niveau02s;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $registrations;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="UserModo", mappedBy="service", cascade={"persist"}, orphanRemoval=false)
*/
private $modos;
/**
* Constructor
*/
public function __construct()
{
$this->niveau02s = new \Doctrine\Common\Collections\ArrayCollection();
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Niveau01
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set siren
*
* @param string $siren
*
* @return Niveau01
*/
public function setSiren($siren)
{
$this->siren = $siren;
return $this;
}
/**
* Get siren
*
* @return string
*/
public function getSiren()
{
return $this->siren;
}
/**
* Add niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return Niveau01
*/
public function addNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02)
{
$this->niveau02s[] = $niveau02;
return $this;
}
/**
* Remove niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*/
public function removeNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02)
{
$this->niveau02s->removeElement($niveau02);
}
/**
* Get niveau02s
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getNiveau02s()
{
return $this->niveau02s;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Niveau01
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Niveau01
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
/**
* Add modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*
* @return Niveau01
*/
public function addModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos[] = $modo;
return $this;
}
/**
* Remove modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*/
public function removeModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos->removeElement($modo);
}
/**
* Get modos
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModos()
{
return $this->modos;
}
}

View File

@ -0,0 +1,272 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="niveau01")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un Niveau de rang 1 existe déjà avec ce label")
*/
class Niveau01
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="string", length=9)
*/
private $siren;
/**
* @var ArrayCollection $niveau02s
* @var Registration
*
* @ORM\OneToMany(targetEntity="Niveau02", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $niveau02s;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $registrations;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="niveau01", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="UserModo", mappedBy="service", cascade={"persist"}, orphanRemoval=false)
*/
private $modos;
/**
* Constructor
*/
public function __construct()
{
$this->niveau02s = new \Doctrine\Common\Collections\ArrayCollection();
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Niveau01
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set siren
*
* @param string $siren
*
* @return Niveau01
*/
public function setSiren($siren)
{
$this->siren = $siren;
return $this;
}
/**
* Get siren
*
* @return string
*/
public function getSiren()
{
return $this->siren;
}
/**
* Add niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return Niveau01
*/
public function addNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02)
{
$this->niveau02s[] = $niveau02;
return $this;
}
/**
* Remove niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*/
public function removeNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02)
{
$this->niveau02s->removeElement($niveau02);
}
/**
* Get niveau02s
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getNiveau02s()
{
return $this->niveau02s;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Niveau01
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Niveau01
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
/**
* Add modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*
* @return Niveau01
*/
public function addModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos[] = $modo;
return $this;
}
/**
* Remove modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*/
public function removeModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos->removeElement($modo);
}
/**
* Get modos
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModos()
{
return $this->modos;
}
}

View File

@ -0,0 +1,245 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="niveau02")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un Niveau de rang 2 existe déjà avec ce label")
*/
class Niveau02
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="string", length=14)
*/
private $siret;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $postaladress;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="niveau02", cascade={"persist"}, orphanRemoval=false)
*/
private $registrations;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="niveau02", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Niveau02
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set siret
*
* @param string $siret
*
* @return Niveau02
*/
public function setSiret($siret)
{
$this->siret = $siret;
return $this;
}
/**
* Get siret
*
* @return string
*/
public function getSiret()
{
return $this->siret;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return Niveau02
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return Niveau02
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Niveau02
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Niveau02
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,245 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="niveau02")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un Niveau de rang 2 existe déjà avec ce label")
*/
class Niveau02
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @ORM\Column(type="string", length=14)
*/
private $siret;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $postaladress;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="niveau02", cascade={"persist"}, orphanRemoval=false)
*/
private $registrations;
/**
* @var ArrayCollection $users
* @var User
*
* @ORM\OneToMany(targetEntity="User", mappedBy="niveau02", cascade={"persist"}, orphanRemoval=false)
*/
private $users;
/**
* Constructor
*/
public function __construct()
{
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
$this->users = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Niveau02
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set siret
*
* @param string $siret
*
* @return Niveau02
*/
public function setSiret($siret)
{
$this->siret = $siret;
return $this;
}
/**
* Get siret
*
* @return string
*/
public function getSiret()
{
return $this->siret;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return Niveau02
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return Niveau02
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Niveau02
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
/**
* Add user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return Niveau02
*/
public function addUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users[] = $user;
return $this;
}
/**
* Remove user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*/
public function removeUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->users->removeElement($user);
}
/**
* Get users
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getUsers()
{
return $this->users;
}
}

View File

@ -0,0 +1,712 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
* @ORM\Entity
* @ORM\Table(name="registration")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="username", message="Un utilisateur existe déjà avec ce login.")
* @UniqueEntity(fields="email", message="Un utilisateur existe déjà avec ce mail.")
*/
class Registration implements UserInterface, \Serializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=25, unique=true)
* @Assert\Length(
* min = "5",
* max = "25",
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
* )
*/
private $username;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @ORM\Column(type="string", length=250)
*/
private $salt;
/**
* @ORM\Column(type="string", length=60, unique=true)
*/
private $email;
/**
* @ORM\Column(name="visible", type="boolean")
*/
protected $visible;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $keyexpire;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $keyvalue;
/**
* @ORM\ManyToOne(targetEntity="Statut")
* @ORM\JoinColumn(nullable=false)
*/
private $statut;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $usualname;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $telephonenumber;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $postaladress;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $givensname;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $gender;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $job;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $position;
/**
* @ORM\ManyToOne(targetEntity="Country")
* @ORM\JoinColumn(nullable=true)
* @ORM\OrderBy({"label" = "ASC"})
*/
private $birthcountry;
/**
* @ORM\ManyToOne(targetEntity="City")
* @ORM\JoinColumn(nullable=true)
*/
private $birthplace;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @ORM\ManyToOne(targetEntity="Niveau02")
* @ORM\JoinColumn(nullable=true)
*/
private $niveau02;
//== CODE A NE PAS REGENERER
public function getUserName()
{
return $this->username;
}
public function getSalt()
{
return $this->salt;
}
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
$this->tempopassword=$password;
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
$hash = "{SSHA}" . base64_encode(pack("H*", sha1($password . $this->salt)) . $this->salt);
$this->password = $hash;
}
return $this;
}
public function getPassword()
{
return $this->password;
}
public function getRoles()
{
}
public function eraseCredentials()
{
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->username,
$this->password,
$this->salt,
));
}
/** @see \Serializable::unserialize() */
public function unserialize($serialized)
{
list (
$this->id,
$this->login,
$this->password,
$this->salt
) = unserialize($serialized);
}
//== FIN DU CODE A NE PAS REGENERER
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return Registration
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Set firstname
*
* @param string $firstname
*
* @return Registration
*/
public function setFirstname($firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get firstname
*
* @return string
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* Set lastname
*
* @param string $lastname
*
* @return Registration
*/
public function setLastname($lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get lastname
*
* @return string
*/
public function getLastname()
{
return $this->lastname;
}
/**
* Set salt
*
* @param string $salt
*
* @return Registration
*/
public function setSalt($salt)
{
$this->salt = $salt;
return $this;
}
/**
* Set email
*
* @param string $email
*
* @return Registration
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set visible
*
* @param boolean $visible
*
* @return Registration
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Get visible
*
* @return boolean
*/
public function getVisible()
{
return $this->visible;
}
/**
* Set keyexpire
*
* @param \DateTime $keyexpire
*
* @return Registration
*/
public function setKeyexpire($keyexpire)
{
$this->keyexpire = $keyexpire;
return $this;
}
/**
* Get keyexpire
*
* @return \DateTime
*/
public function getKeyexpire()
{
return $this->keyexpire;
}
/**
* Set keyvalue
*
* @param string $keyvalue
*
* @return Registration
*/
public function setKeyvalue($keyvalue)
{
$this->keyvalue = $keyvalue;
return $this;
}
/**
* Get keyvalue
*
* @return string
*/
public function getKeyvalue()
{
return $this->keyvalue;
}
/**
* Set usualname
*
* @param string $usualname
*
* @return Registration
*/
public function setUsualname($usualname)
{
$this->usualname = $usualname;
return $this;
}
/**
* Get usualname
*
* @return string
*/
public function getUsualname()
{
return $this->usualname;
}
/**
* Set telephonenumber
*
* @param string $telephonenumber
*
* @return Registration
*/
public function setTelephonenumber($telephonenumber)
{
$this->telephonenumber = $telephonenumber;
return $this;
}
/**
* Get telephonenumber
*
* @return string
*/
public function getTelephonenumber()
{
return $this->telephonenumber;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return Registration
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set givensname
*
* @param string $givensname
*
* @return Registration
*/
public function setGivensname($givensname)
{
$this->givensname = $givensname;
return $this;
}
/**
* Get givensname
*
* @return string
*/
public function getGivensname()
{
return $this->givensname;
}
/**
* Set birthdate
*
* @param \DateTime $birthdate
*
* @return Registration
*/
public function setBirthdate($birthdate)
{
$this->birthdate = $birthdate;
return $this;
}
/**
* Get birthdate
*
* @return \DateTime
*/
public function getBirthdate()
{
return $this->birthdate;
}
/**
* Set gender
*
* @param string $gender
*
* @return Registration
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* Get gender
*
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* Set job
*
* @param string $job
*
* @return Registration
*/
public function setJob($job)
{
$this->job = $job;
return $this;
}
/**
* Get job
*
* @return string
*/
public function getJob()
{
return $this->job;
}
/**
* Set position
*
* @param string $position
*
* @return Registration
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* Get position
*
* @return string
*/
public function getPosition()
{
return $this->position;
}
/**
* Set statut
*
* @param \Cadoles\CoreBundle\Entity\Statut $statut
*
* @return Registration
*/
public function setStatut(\Cadoles\CoreBundle\Entity\Statut $statut)
{
$this->statut = $statut;
return $this;
}
/**
* Get statut
*
* @return \Cadoles\CoreBundle\Entity\Statut
*/
public function getStatut()
{
return $this->statut;
}
/**
* Set birthcountry
*
* @param \Cadoles\CoreBundle\Entity\Country $birthcountry
*
* @return Registration
*/
public function setBirthcountry(\Cadoles\CoreBundle\Entity\Country $birthcountry = null)
{
$this->birthcountry = $birthcountry;
return $this;
}
/**
* Get birthcountry
*
* @return \Cadoles\CoreBundle\Entity\Country
*/
public function getBirthcountry()
{
return $this->birthcountry;
}
/**
* Set birthplace
*
* @param \Cadoles\CoreBundle\Entity\City $birthplace
*
* @return Registration
*/
public function setBirthplace(\Cadoles\CoreBundle\Entity\City $birthplace = null)
{
$this->birthplace = $birthplace;
return $this;
}
/**
* Get birthplace
*
* @return \Cadoles\CoreBundle\Entity\City
*/
public function getBirthplace()
{
return $this->birthplace;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return Registration
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Set niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return Registration
*/
public function setNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02 = null)
{
$this->niveau02 = $niveau02;
return $this;
}
/**
* Get niveau02
*
* @return \Cadoles\CoreBundle\Entity\Niveau02
*/
public function getNiveau02()
{
return $this->niveau02;
}
}

View File

@ -0,0 +1,712 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
* @ORM\Entity
* @ORM\Table(name="registration")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="username", message="Un utilisateur existe déjà avec ce login.")
* @UniqueEntity(fields="email", message="Un utilisateur existe déjà avec ce mail.")
*/
class Registration implements UserInterface, \Serializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=25, unique=true)
* @Assert\Length(
* min = "5",
* max = "25",
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
* )
*/
private $username;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @ORM\Column(type="string", length=250)
*/
private $salt;
/**
* @ORM\Column(type="string", length=60, unique=true)
*/
private $email;
/**
* @ORM\Column(name="visible", type="boolean")
*/
protected $visible;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $keyexpire;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $keyvalue;
/**
* @ORM\ManyToOne(targetEntity="Statut")
* @ORM\JoinColumn(nullable=false)
*/
private $statut;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $usualname;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $telephonenumber;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $postaladress;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $givensname;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $gender;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $job;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $position;
/**
* @ORM\ManyToOne(targetEntity="Country")
* @ORM\JoinColumn(nullable=true)
* @ORM\OrderBy({"label" = "ASC"})
*/
private $birthcountry;
/**
* @ORM\ManyToOne(targetEntity="City")
* @ORM\JoinColumn(nullable=true)
*/
private $birthplace;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @ORM\ManyToOne(targetEntity="Niveau02")
* @ORM\JoinColumn(nullable=true)
*/
private $niveau02;
//== CODE A NE PAS REGENERER
public function getUserName()
{
return $this->username;
}
public function getSalt()
{
return $this->salt;
}
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
$this->tempopassword=$password;
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
$hash = "{SSHA}" . base64_encode(pack("H*", sha1($password . $this->salt)) . $this->salt);
$this->password = $hash;
}
return $this;
}
public function getPassword()
{
return $this->password;
}
public function getRoles()
{
}
public function eraseCredentials()
{
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->username,
$this->password,
$this->salt,
));
}
/** @see \Serializable::unserialize() */
public function unserialize($serialized)
{
list (
$this->id,
$this->login,
$this->password,
$this->salt
) = unserialize($serialized);
}
//== FIN DU CODE A NE PAS REGENERER
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return Registration
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Set firstname
*
* @param string $firstname
*
* @return Registration
*/
public function setFirstname($firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get firstname
*
* @return string
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* Set lastname
*
* @param string $lastname
*
* @return Registration
*/
public function setLastname($lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get lastname
*
* @return string
*/
public function getLastname()
{
return $this->lastname;
}
/**
* Set salt
*
* @param string $salt
*
* @return Registration
*/
public function setSalt($salt)
{
$this->salt = $salt;
return $this;
}
/**
* Set email
*
* @param string $email
*
* @return Registration
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set visible
*
* @param boolean $visible
*
* @return Registration
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Get visible
*
* @return boolean
*/
public function getVisible()
{
return $this->visible;
}
/**
* Set keyexpire
*
* @param \DateTime $keyexpire
*
* @return Registration
*/
public function setKeyexpire($keyexpire)
{
$this->keyexpire = $keyexpire;
return $this;
}
/**
* Get keyexpire
*
* @return \DateTime
*/
public function getKeyexpire()
{
return $this->keyexpire;
}
/**
* Set keyvalue
*
* @param string $keyvalue
*
* @return Registration
*/
public function setKeyvalue($keyvalue)
{
$this->keyvalue = $keyvalue;
return $this;
}
/**
* Get keyvalue
*
* @return string
*/
public function getKeyvalue()
{
return $this->keyvalue;
}
/**
* Set usualname
*
* @param string $usualname
*
* @return Registration
*/
public function setUsualname($usualname)
{
$this->usualname = $usualname;
return $this;
}
/**
* Get usualname
*
* @return string
*/
public function getUsualname()
{
return $this->usualname;
}
/**
* Set telephonenumber
*
* @param string $telephonenumber
*
* @return Registration
*/
public function setTelephonenumber($telephonenumber)
{
$this->telephonenumber = $telephonenumber;
return $this;
}
/**
* Get telephonenumber
*
* @return string
*/
public function getTelephonenumber()
{
return $this->telephonenumber;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return Registration
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set givensname
*
* @param string $givensname
*
* @return Registration
*/
public function setGivensname($givensname)
{
$this->givensname = $givensname;
return $this;
}
/**
* Get givensname
*
* @return string
*/
public function getGivensname()
{
return $this->givensname;
}
/**
* Set birthdate
*
* @param \DateTime $birthdate
*
* @return Registration
*/
public function setBirthdate($birthdate)
{
$this->birthdate = $birthdate;
return $this;
}
/**
* Get birthdate
*
* @return \DateTime
*/
public function getBirthdate()
{
return $this->birthdate;
}
/**
* Set gender
*
* @param string $gender
*
* @return Registration
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* Get gender
*
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* Set job
*
* @param string $job
*
* @return Registration
*/
public function setJob($job)
{
$this->job = $job;
return $this;
}
/**
* Get job
*
* @return string
*/
public function getJob()
{
return $this->job;
}
/**
* Set position
*
* @param string $position
*
* @return Registration
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* Get position
*
* @return string
*/
public function getPosition()
{
return $this->position;
}
/**
* Set statut
*
* @param \Cadoles\CoreBundle\Entity\Statut $statut
*
* @return Registration
*/
public function setStatut(\Cadoles\CoreBundle\Entity\Statut $statut)
{
$this->statut = $statut;
return $this;
}
/**
* Get statut
*
* @return \Cadoles\CoreBundle\Entity\Statut
*/
public function getStatut()
{
return $this->statut;
}
/**
* Set birthcountry
*
* @param \Cadoles\CoreBundle\Entity\Country $birthcountry
*
* @return Registration
*/
public function setBirthcountry(\Cadoles\CoreBundle\Entity\Country $birthcountry = null)
{
$this->birthcountry = $birthcountry;
return $this;
}
/**
* Get birthcountry
*
* @return \Cadoles\CoreBundle\Entity\Country
*/
public function getBirthcountry()
{
return $this->birthcountry;
}
/**
* Set birthplace
*
* @param \Cadoles\CoreBundle\Entity\City $birthplace
*
* @return Registration
*/
public function setBirthplace(\Cadoles\CoreBundle\Entity\City $birthplace = null)
{
$this->birthplace = $birthplace;
return $this;
}
/**
* Get birthplace
*
* @return \Cadoles\CoreBundle\Entity\City
*/
public function getBirthplace()
{
return $this->birthplace;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return Registration
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Set niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return Registration
*/
public function setNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02 = null)
{
$this->niveau02 = $niveau02;
return $this;
}
/**
* Get niveau02
*
* @return \Cadoles\CoreBundle\Entity\Niveau02
*/
public function getNiveau02()
{
return $this->niveau02;
}
}

View File

@ -0,0 +1,260 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="sidebar")
* @ORM\HasLifecycleCallbacks()
*
*/
class Sidebar
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $roworder;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $path;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $fonticon;
/**
* @ORM\Column(type="simple_array", length=250, nullable=true)
*/
private $permission;
/**
* @ORM\ManyToOne(targetEntity="Sidebar")
* @ORM\JoinColumn(nullable=true)
*/
private $parent;
/**
* @var ArrayCollection $childs
* @var Child
*
* @ORM\OneToMany(targetEntity="Sidebar", mappedBy="parent", cascade={"persist"}, orphanRemoval=false)
* @ORM\OrderBy({"roworder" = "ASC"})
*/
private $childs;
/**
* Constructor
*/
public function __construct()
{
$this->childs = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set roworder
*
* @param integer $roworder
*
* @return Sidebar
*/
public function setRoworder($roworder)
{
$this->roworder = $roworder;
return $this;
}
/**
* Get roworder
*
* @return integer
*/
public function getRoworder()
{
return $this->roworder;
}
/**
* Set label
*
* @param string $label
*
* @return Sidebar
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set path
*
* @param string $path
*
* @return Sidebar
*/
public function setPath($path)
{
$this->path = $path;
return $this;
}
/**
* Get path
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set fonticon
*
* @param string $fonticon
*
* @return Sidebar
*/
public function setFonticon($fonticon)
{
$this->fonticon = $fonticon;
return $this;
}
/**
* Get fonticon
*
* @return string
*/
public function getFonticon()
{
return $this->fonticon;
}
/**
* Set permission
*
* @param array $permission
*
* @return Sidebar
*/
public function setPermission($permission)
{
$this->permission = $permission;
return $this;
}
/**
* Get permission
*
* @return array
*/
public function getPermission()
{
return $this->permission;
}
/**
* Set parent
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $parent
*
* @return Sidebar
*/
public function setParent(\Cadoles\CoreBundle\Entity\Sidebar $parent = null)
{
$this->parent = $parent;
return $this;
}
/**
* Get parent
*
* @return \Cadoles\CoreBundle\Entity\Sidebar
*/
public function getParent()
{
return $this->parent;
}
/**
* Add child
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $child
*
* @return Sidebar
*/
public function addChild(\Cadoles\CoreBundle\Entity\Sidebar $child)
{
$this->childs[] = $child;
return $this;
}
/**
* Remove child
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $child
*/
public function removeChild(\Cadoles\CoreBundle\Entity\Sidebar $child)
{
$this->childs->removeElement($child);
}
/**
* Get childs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getChilds()
{
return $this->childs;
}
}

View File

@ -0,0 +1,260 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="sidebar")
* @ORM\HasLifecycleCallbacks()
*
*/
class Sidebar
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $roworder;
/**
* @ORM\Column(type="string", length=250)
*/
private $label;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $path;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $fonticon;
/**
* @ORM\Column(type="simple_array", length=250, nullable=true)
*/
private $permission;
/**
* @ORM\ManyToOne(targetEntity="Sidebar")
* @ORM\JoinColumn(nullable=true)
*/
private $parent;
/**
* @var ArrayCollection $childs
* @var Child
*
* @ORM\OneToMany(targetEntity="Sidebar", mappedBy="parent", cascade={"persist"}, orphanRemoval=false)
* @ORM\OrderBy({"roworder" = "ASC"})
*/
private $childs;
/**
* Constructor
*/
public function __construct()
{
$this->childs = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set roworder
*
* @param integer $roworder
*
* @return Sidebar
*/
public function setRoworder($roworder)
{
$this->roworder = $roworder;
return $this;
}
/**
* Get roworder
*
* @return integer
*/
public function getRoworder()
{
return $this->roworder;
}
/**
* Set label
*
* @param string $label
*
* @return Sidebar
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set path
*
* @param string $path
*
* @return Sidebar
*/
public function setPath($path)
{
$this->path = $path;
return $this;
}
/**
* Get path
*
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Set fonticon
*
* @param string $fonticon
*
* @return Sidebar
*/
public function setFonticon($fonticon)
{
$this->fonticon = $fonticon;
return $this;
}
/**
* Get fonticon
*
* @return string
*/
public function getFonticon()
{
return $this->fonticon;
}
/**
* Set permission
*
* @param array $permission
*
* @return Sidebar
*/
public function setPermission($permission)
{
$this->permission = $permission;
return $this;
}
/**
* Get permission
*
* @return array
*/
public function getPermission()
{
return $this->permission;
}
/**
* Set parent
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $parent
*
* @return Sidebar
*/
public function setParent(\Cadoles\CoreBundle\Entity\Sidebar $parent = null)
{
$this->parent = $parent;
return $this;
}
/**
* Get parent
*
* @return \Cadoles\CoreBundle\Entity\Sidebar
*/
public function getParent()
{
return $this->parent;
}
/**
* Add child
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $child
*
* @return Sidebar
*/
public function addChild(\Cadoles\CoreBundle\Entity\Sidebar $child)
{
$this->childs[] = $child;
return $this;
}
/**
* Remove child
*
* @param \Cadoles\CoreBundle\Entity\Sidebar $child
*/
public function removeChild(\Cadoles\CoreBundle\Entity\Sidebar $child)
{
$this->childs->removeElement($child);
}
/**
* Get childs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getChilds()
{
return $this->childs;
}
}

View File

@ -0,0 +1,116 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="statut")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un statut existe déjà avec ce label")
*/
class Statut
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="statut", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $registrations;
/**
* Constructor
*/
public function __construct()
{
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Statut
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Statut
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
}

View File

@ -0,0 +1,116 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="statut")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Un statut existe déjà avec ce label")
*/
class Statut
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* @var ArrayCollection $registrations
* @var Registration
*
* @ORM\OneToMany(targetEntity="Registration", mappedBy="statut", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $registrations;
/**
* Constructor
*/
public function __construct()
{
$this->registrations = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Statut
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Add registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*
* @return Statut
*/
public function addRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations[] = $registration;
return $this;
}
/**
* Remove registration
*
* @param \Cadoles\CoreBundle\Entity\Registration $registration
*/
public function removeRegistration(\Cadoles\CoreBundle\Entity\Registration $registration)
{
$this->registrations->removeElement($registration);
}
/**
* Get registrations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getRegistrations()
{
return $this->registrations;
}
}

View File

@ -0,0 +1,959 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
* @ORM\Entity
* @ORM\Table(name="user")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="username", message="Un utilisateur existe déjà avec ce login.")
* @UniqueEntity(fields="email", message="Un utilisateur existe déjà avec ce mail.")
*/
class User implements UserInterface, \Serializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=25, unique=true)
*/
private $username;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @ORM\Column(type="string", length=250)
*/
private $salt;
/**
* @Password()
*/
private $tempopassword;
/**
* @ORM\Column(type="string", length=60, unique=true)
*/
private $email;
/**
* @ORM\Column(name="visible", type="boolean")
*/
protected $visible;
/**
* @ORM\Column(type="string", length=60, nullable=true, options={"default" : 0})
*/
private $avatar;
/**
* @ORM\Column(type="string", length=60)
*/
private $role;
/**
* @ORM\Column(type="string", length=60)
*/
private $authlevel;
/**
* @ORM\Column(type="string", length=9)
*/
private $siren;
/**
* @ORM\Column(type="string", length=14, nullable=true)
*/
private $siret;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $usualname;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $telephonenumber;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $postaladress;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $givensname;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $gender;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $job;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $position;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $keyexpire;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $keyvalue;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $belongingpopulation;
/**
* @ORM\ManyToOne(targetEntity="Country")
* @ORM\JoinColumn(nullable=true)
*/
private $birthcountry;
/**
* @ORM\ManyToOne(targetEntity="City")
* @ORM\JoinColumn(nullable=true)
*/
private $birthplace;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @ORM\ManyToOne(targetEntity="Niveau02")
* @ORM\JoinColumn(nullable=true)
*/
private $niveau02;
/**
* @var ArrayCollection $groups
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserGroup", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
*/
private $groups;
/**
* @var ArrayCollection $groups
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserModo", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
*/
private $modos;
//== CODE A NE PAS REGENERER
/**
* @ORM\PostLoad
*/
public function PostLoad() {
if($this->getAvatar()=="") {
$this->setAvatar("noavatar.png");
}
}
public function __construct()
{
$this->profils = new ArrayCollection();
}
public function getUserName()
{
return $this->username;
}
public function getSalt()
{
return $this->salt;
}
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
$this->tempopassword=$password;
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
$hash = "{SSHA}" . base64_encode(pack("H*", sha1($password . $this->salt)) . $this->salt);
$this->password = $hash;
}
return $this;
}
public function setPasswordDirect($password)
{
$this->password = $password;
return $this;
}
public function getPassword()
{
return $this->password;
}
public function getRoles()
{
return explode(",",$this->role);
}
public function eraseCredentials()
{
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->username,
$this->password,
$this->salt,
));
}
/** @see \Serializable::unserialize() */
public function unserialize($serialized)
{
list (
$this->id,
$this->login,
$this->password,
$this->salt
) = unserialize($serialized);
}
//== FIN DU CODE A NE PAS REGENERER
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Set firstname
*
* @param string $firstname
*
* @return User
*/
public function setFirstname($firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get firstname
*
* @return string
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* Set lastname
*
* @param string $lastname
*
* @return User
*/
public function setLastname($lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get lastname
*
* @return string
*/
public function getLastname()
{
return $this->lastname;
}
/**
* Set salt
*
* @param string $salt
*
* @return User
*/
public function setSalt($salt)
{
$this->salt = $salt;
return $this;
}
/**
* Set email
*
* @param string $email
*
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set visible
*
* @param boolean $visible
*
* @return User
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Get visible
*
* @return boolean
*/
public function getVisible()
{
return $this->visible;
}
/**
* Set avatar
*
* @param string $avatar
*
* @return User
*/
public function setAvatar($avatar)
{
$this->avatar = $avatar;
return $this;
}
/**
* Get avatar
*
* @return string
*/
public function getAvatar()
{
return $this->avatar;
}
/**
* Set role
*
* @param string $role
*
* @return User
*/
public function setRole($role)
{
$this->role = $role;
return $this;
}
/**
* Get role
*
* @return string
*/
public function getRole()
{
return $this->role;
}
/**
* Set authlevel
*
* @param string $authlevel
*
* @return User
*/
public function setAuthlevel($authlevel)
{
$this->authlevel = $authlevel;
return $this;
}
/**
* Get authlevel
*
* @return string
*/
public function getAuthlevel()
{
return $this->authlevel;
}
/**
* Set siren
*
* @param string $siren
*
* @return User
*/
public function setSiren($siren)
{
$this->siren = $siren;
return $this;
}
/**
* Get siren
*
* @return string
*/
public function getSiren()
{
return $this->siren;
}
/**
* Set siret
*
* @param string $siret
*
* @return User
*/
public function setSiret($siret)
{
$this->siret = $siret;
return $this;
}
/**
* Get siret
*
* @return string
*/
public function getSiret()
{
return $this->siret;
}
/**
* Set usualname
*
* @param string $usualname
*
* @return User
*/
public function setUsualname($usualname)
{
$this->usualname = $usualname;
return $this;
}
/**
* Get usualname
*
* @return string
*/
public function getUsualname()
{
return $this->usualname;
}
/**
* Set telephonenumber
*
* @param string $telephonenumber
*
* @return User
*/
public function setTelephonenumber($telephonenumber)
{
$this->telephonenumber = $telephonenumber;
return $this;
}
/**
* Get telephonenumber
*
* @return string
*/
public function getTelephonenumber()
{
return $this->telephonenumber;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return User
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set givensname
*
* @param string $givensname
*
* @return User
*/
public function setGivensname($givensname)
{
$this->givensname = $givensname;
return $this;
}
/**
* Get givensname
*
* @return string
*/
public function getGivensname()
{
return $this->givensname;
}
/**
* Set birthdate
*
* @param \DateTime $birthdate
*
* @return User
*/
public function setBirthdate($birthdate)
{
$this->birthdate = $birthdate;
return $this;
}
/**
* Get birthdate
*
* @return \DateTime
*/
public function getBirthdate()
{
return $this->birthdate;
}
/**
* Set gender
*
* @param string $gender
*
* @return User
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* Get gender
*
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* Set job
*
* @param string $job
*
* @return User
*/
public function setJob($job)
{
$this->job = $job;
return $this;
}
/**
* Get job
*
* @return string
*/
public function getJob()
{
return $this->job;
}
/**
* Set position
*
* @param string $position
*
* @return User
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* Get position
*
* @return string
*/
public function getPosition()
{
return $this->position;
}
/**
* Set belongingpopulation
*
* @param string $belongingpopulation
*
* @return User
*/
public function setBelongingpopulation($belongingpopulation)
{
$this->belongingpopulation = $belongingpopulation;
return $this;
}
/**
* Get belongingpopulation
*
* @return string
*/
public function getBelongingpopulation()
{
return $this->belongingpopulation;
}
/**
* Set birthcountry
*
* @param \Cadoles\CoreBundle\Entity\Country $birthcountry
*
* @return User
*/
public function setBirthcountry(\Cadoles\CoreBundle\Entity\Country $birthcountry = null)
{
$this->birthcountry = $birthcountry;
return $this;
}
/**
* Get birthcountry
*
* @return \Cadoles\CoreBundle\Entity\Country
*/
public function getBirthcountry()
{
return $this->birthcountry;
}
/**
* Set birthplace
*
* @param \Cadoles\CoreBundle\Entity\City $birthplace
*
* @return User
*/
public function setBirthplace(\Cadoles\CoreBundle\Entity\City $birthplace = null)
{
$this->birthplace = $birthplace;
return $this;
}
/**
* Get birthplace
*
* @return \Cadoles\CoreBundle\Entity\City
*/
public function getBirthplace()
{
return $this->birthplace;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return User
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Set niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return User
*/
public function setNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02 = null)
{
$this->niveau02 = $niveau02;
return $this;
}
/**
* Get niveau02
*
* @return \Cadoles\CoreBundle\Entity\Niveau02
*/
public function getNiveau02()
{
return $this->niveau02;
}
/**
* Add group
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $group
*
* @return User
*/
public function addGroup(\Cadoles\CoreBundle\Entity\UserGroup $group)
{
$this->groups[] = $group;
return $this;
}
/**
* Remove group
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $group
*/
public function removeGroup(\Cadoles\CoreBundle\Entity\UserGroup $group)
{
$this->groups->removeElement($group);
}
/**
* Get groups
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getGroups()
{
return $this->groups;
}
/**
* Add modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*
* @return User
*/
public function addModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos[] = $modo;
return $this;
}
/**
* Remove modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*/
public function removeModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos->removeElement($modo);
}
/**
* Get modos
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModos()
{
return $this->modos;
}
/**
* Set keyexpire
*
* @param \DateTime $keyexpire
*
* @return User
*/
public function setKeyexpire($keyexpire)
{
$this->keyexpire = $keyexpire;
return $this;
}
/**
* Get keyexpire
*
* @return \DateTime
*/
public function getKeyexpire()
{
return $this->keyexpire;
}
/**
* Set keyvalue
*
* @param string $keyvalue
*
* @return User
*/
public function setKeyvalue($keyvalue)
{
$this->keyvalue = $keyvalue;
return $this;
}
/**
* Get keyvalue
*
* @return string
*/
public function getKeyvalue()
{
return $this->keyvalue;
}
}

View File

@ -0,0 +1,911 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
* @ORM\Entity
* @ORM\Table(name="user")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="username", message="Un utilisateur existe déjà avec ce login.")
* @UniqueEntity(fields="email", message="Un utilisateur existe déjà avec ce mail.")
*/
class User implements UserInterface, \Serializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=25, unique=true)
*/
private $username;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @ORM\Column(type="string", length=250)
*/
private $salt;
/**
* @Password()
*/
private $tempopassword;
/**
* @ORM\Column(type="string", length=60, unique=true)
*/
private $email;
/**
* @ORM\Column(name="visible", type="boolean")
*/
protected $visible;
/**
* @ORM\Column(type="string", length=60, nullable=true, options={"default" : 0})
*/
private $avatar;
/**
* @ORM\Column(type="string", length=60)
*/
private $role;
/**
* @ORM\Column(type="string", length=60)
*/
private $authlevel;
/**
* @ORM\Column(type="string", length=9)
*/
private $siren;
/**
* @ORM\Column(type="string", length=14, nullable=true)
*/
private $siret;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $usualname;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $telephonenumber;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $postaladress;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $givensname;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $gender;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $job;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $position;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $keyexpire;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private $keyvalue;
/**
* @ORM\Column(type="string", length=250, nullable=true)
*/
private $belongingpopulation;
/**
* @ORM\ManyToOne(targetEntity="Country")
* @ORM\JoinColumn(nullable=true)
*/
private $birthcountry;
/**
* @ORM\ManyToOne(targetEntity="City")
* @ORM\JoinColumn(nullable=true)
*/
private $birthplace;
/**
* @ORM\ManyToOne(targetEntity="Niveau01")
* @ORM\JoinColumn(nullable=false)
*/
private $niveau01;
/**
* @ORM\ManyToOne(targetEntity="Niveau02")
* @ORM\JoinColumn(nullable=true)
*/
private $niveau02;
/**
* @var ArrayCollection $groups
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserGroup", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
*/
private $groups;
/**
* @var ArrayCollection $groups
* @var UserGroup
*
* @ORM\OneToMany(targetEntity="UserModo", mappedBy="user", cascade={"persist"}, orphanRemoval=true)
*/
private $modos;
//== CODE A NE PAS REGENERER
/**
* @ORM\PostLoad
*/
public function PostLoad() {
if($this->getAvatar()=="") {
$this->setAvatar("noavatar.png");
}
}
public function __construct()
{
$this->profils = new ArrayCollection();
}
public function getUserName()
{
return $this->username;
}
public function getSalt()
{
return $this->salt;
}
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
$this->tempopassword=$password;
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
$hash = "{SSHA}" . base64_encode(pack("H*", sha1($password . $this->salt)) . $this->salt);
$this->password = $hash;
}
return $this;
}
public function setPasswordDirect($password)
{
$this->password = $password;
return $this;
}
public function getPassword()
{
return $this->password;
}
public function getRoles()
{
return explode(",",$this->role);
}
public function eraseCredentials()
{
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->username,
$this->password,
$this->salt,
));
}
/** @see \Serializable::unserialize() */
public function unserialize($serialized)
{
list (
$this->id,
$this->login,
$this->password,
$this->salt
) = unserialize($serialized);
}
//== FIN DU CODE A NE PAS REGENERER
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return User
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Set firstname
*
* @param string $firstname
*
* @return User
*/
public function setFirstname($firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get firstname
*
* @return string
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* Set lastname
*
* @param string $lastname
*
* @return User
*/
public function setLastname($lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get lastname
*
* @return string
*/
public function getLastname()
{
return $this->lastname;
}
/**
* Set salt
*
* @param string $salt
*
* @return User
*/
public function setSalt($salt)
{
$this->salt = $salt;
return $this;
}
/**
* Set email
*
* @param string $email
*
* @return User
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set visible
*
* @param boolean $visible
*
* @return User
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Get visible
*
* @return boolean
*/
public function getVisible()
{
return $this->visible;
}
/**
* Set avatar
*
* @param string $avatar
*
* @return User
*/
public function setAvatar($avatar)
{
$this->avatar = $avatar;
return $this;
}
/**
* Get avatar
*
* @return string
*/
public function getAvatar()
{
return $this->avatar;
}
/**
* Set role
*
* @param string $role
*
* @return User
*/
public function setRole($role)
{
$this->role = $role;
return $this;
}
/**
* Get role
*
* @return string
*/
public function getRole()
{
return $this->role;
}
/**
* Set authlevel
*
* @param string $authlevel
*
* @return User
*/
public function setAuthlevel($authlevel)
{
$this->authlevel = $authlevel;
return $this;
}
/**
* Get authlevel
*
* @return string
*/
public function getAuthlevel()
{
return $this->authlevel;
}
/**
* Set siren
*
* @param string $siren
*
* @return User
*/
public function setSiren($siren)
{
$this->siren = $siren;
return $this;
}
/**
* Get siren
*
* @return string
*/
public function getSiren()
{
return $this->siren;
}
/**
* Set siret
*
* @param string $siret
*
* @return User
*/
public function setSiret($siret)
{
$this->siret = $siret;
return $this;
}
/**
* Get siret
*
* @return string
*/
public function getSiret()
{
return $this->siret;
}
/**
* Set usualname
*
* @param string $usualname
*
* @return User
*/
public function setUsualname($usualname)
{
$this->usualname = $usualname;
return $this;
}
/**
* Get usualname
*
* @return string
*/
public function getUsualname()
{
return $this->usualname;
}
/**
* Set telephonenumber
*
* @param string $telephonenumber
*
* @return User
*/
public function setTelephonenumber($telephonenumber)
{
$this->telephonenumber = $telephonenumber;
return $this;
}
/**
* Get telephonenumber
*
* @return string
*/
public function getTelephonenumber()
{
return $this->telephonenumber;
}
/**
* Set postaladress
*
* @param string $postaladress
*
* @return User
*/
public function setPostaladress($postaladress)
{
$this->postaladress = $postaladress;
return $this;
}
/**
* Get postaladress
*
* @return string
*/
public function getPostaladress()
{
return $this->postaladress;
}
/**
* Set givensname
*
* @param string $givensname
*
* @return User
*/
public function setGivensname($givensname)
{
$this->givensname = $givensname;
return $this;
}
/**
* Get givensname
*
* @return string
*/
public function getGivensname()
{
return $this->givensname;
}
/**
* Set birthdate
*
* @param \DateTime $birthdate
*
* @return User
*/
public function setBirthdate($birthdate)
{
$this->birthdate = $birthdate;
return $this;
}
/**
* Get birthdate
*
* @return \DateTime
*/
public function getBirthdate()
{
return $this->birthdate;
}
/**
* Set gender
*
* @param string $gender
*
* @return User
*/
public function setGender($gender)
{
$this->gender = $gender;
return $this;
}
/**
* Get gender
*
* @return string
*/
public function getGender()
{
return $this->gender;
}
/**
* Set job
*
* @param string $job
*
* @return User
*/
public function setJob($job)
{
$this->job = $job;
return $this;
}
/**
* Get job
*
* @return string
*/
public function getJob()
{
return $this->job;
}
/**
* Set position
*
* @param string $position
*
* @return User
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* Get position
*
* @return string
*/
public function getPosition()
{
return $this->position;
}
/**
* Set belongingpopulation
*
* @param string $belongingpopulation
*
* @return User
*/
public function setBelongingpopulation($belongingpopulation)
{
$this->belongingpopulation = $belongingpopulation;
return $this;
}
/**
* Get belongingpopulation
*
* @return string
*/
public function getBelongingpopulation()
{
return $this->belongingpopulation;
}
/**
* Set birthcountry
*
* @param \Cadoles\CoreBundle\Entity\Country $birthcountry
*
* @return User
*/
public function setBirthcountry(\Cadoles\CoreBundle\Entity\Country $birthcountry = null)
{
$this->birthcountry = $birthcountry;
return $this;
}
/**
* Get birthcountry
*
* @return \Cadoles\CoreBundle\Entity\Country
*/
public function getBirthcountry()
{
return $this->birthcountry;
}
/**
* Set birthplace
*
* @param \Cadoles\CoreBundle\Entity\City $birthplace
*
* @return User
*/
public function setBirthplace(\Cadoles\CoreBundle\Entity\City $birthplace = null)
{
$this->birthplace = $birthplace;
return $this;
}
/**
* Get birthplace
*
* @return \Cadoles\CoreBundle\Entity\City
*/
public function getBirthplace()
{
return $this->birthplace;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return User
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
/**
* Set niveau02
*
* @param \Cadoles\CoreBundle\Entity\Niveau02 $niveau02
*
* @return User
*/
public function setNiveau02(\Cadoles\CoreBundle\Entity\Niveau02 $niveau02 = null)
{
$this->niveau02 = $niveau02;
return $this;
}
/**
* Get niveau02
*
* @return \Cadoles\CoreBundle\Entity\Niveau02
*/
public function getNiveau02()
{
return $this->niveau02;
}
/**
* Add group
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $group
*
* @return User
*/
public function addGroup(\Cadoles\CoreBundle\Entity\UserGroup $group)
{
$this->groups[] = $group;
return $this;
}
/**
* Remove group
*
* @param \Cadoles\CoreBundle\Entity\UserGroup $group
*/
public function removeGroup(\Cadoles\CoreBundle\Entity\UserGroup $group)
{
$this->groups->removeElement($group);
}
/**
* Get groups
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getGroups()
{
return $this->groups;
}
/**
* Add modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*
* @return User
*/
public function addModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos[] = $modo;
return $this;
}
/**
* Remove modo
*
* @param \Cadoles\CoreBundle\Entity\UserModo $modo
*/
public function removeModo(\Cadoles\CoreBundle\Entity\UserModo $modo)
{
$this->modos->removeElement($modo);
}
/**
* Get modos
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModos()
{
return $this->modos;
}
}

View File

@ -0,0 +1,98 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="usergroupe")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields={"user", "group"}, message="Cette liaison existe déjà !")
*/
class UserGroup
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="groups")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="Group", inversedBy="users")
* @ORM\JoinColumn(name="group_id", referencedColumnName="id", nullable=false)
*/
private $group;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return UserGroup
*/
public function setUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \Cadoles\CoreBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* Set group
*
* @param \Cadoles\CoreBundle\Entity\Group $group
*
* @return UserGroup
*/
public function setGroup(\Cadoles\CoreBundle\Entity\Group $group)
{
$this->group = $group;
return $this;
}
/**
* Get group
*
* @return \Cadoles\CoreBundle\Entity\Group
*/
public function getGroup()
{
return $this->group;
}
}

View File

@ -0,0 +1,98 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="usergroupe")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields={"user", "group"}, message="Cette liaison existe déjà !")
*/
class UserGroup
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="groups")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="Group", inversedBy="users")
* @ORM\JoinColumn(name="group_id", referencedColumnName="id", nullable=false)
*/
private $group;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return UserGroup
*/
public function setUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \Cadoles\CoreBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* Set group
*
* @param \Cadoles\CoreBundle\Entity\Group $group
*
* @return UserGroup
*/
public function setGroup(\Cadoles\CoreBundle\Entity\Group $group)
{
$this->group = $group;
return $this;
}
/**
* Get group
*
* @return \Cadoles\CoreBundle\Entity\Group
*/
public function getGroup()
{
return $this->group;
}
}

View File

@ -0,0 +1,96 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="usermodo")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields={"user", "service"}, message="Cette liaison existe déjà !")
*/
class UserModo
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="modos")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="Niveau01", inversedBy="modos")
* @ORM\JoinColumn(name="niveau01_id", referencedColumnName="id", nullable=false)
*/
private $niveau01;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return UserModo
*/
public function setUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \Cadoles\CoreBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return UserModo
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
}

View File

@ -0,0 +1,96 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="usermodo")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields={"user", "service"}, message="Cette liaison existe déjà !")
*/
class UserModo
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="modos")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="Niveau01", inversedBy="modos")
* @ORM\JoinColumn(name="niveau01_id", referencedColumnName="id", nullable=false)
*/
private $niveau01;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set user
*
* @param \Cadoles\CoreBundle\Entity\User $user
*
* @return UserModo
*/
public function setUser(\Cadoles\CoreBundle\Entity\User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return \Cadoles\CoreBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
/**
* Set niveau01
*
* @param \Cadoles\CoreBundle\Entity\Niveau01 $niveau01
*
* @return UserModo
*/
public function setNiveau01(\Cadoles\CoreBundle\Entity\Niveau01 $niveau01)
{
$this->niveau01 = $niveau01;
return $this;
}
/**
* Get niveau01
*
* @return \Cadoles\CoreBundle\Entity\Niveau01
*/
public function getNiveau01()
{
return $this->niveau01;
}
}

View File

@ -0,0 +1,67 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="whitelist")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Une liste blanche existe déjà avec ce label")
*/
class Whitelist
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Whitelist
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
}

View File

@ -0,0 +1,67 @@
<?php
namespace Cadoles\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="whitelist")
* @ORM\HasLifecycleCallbacks()
*
* @UniqueEntity(fields="label", message="Une liste blanche existe déjà avec ce label")
*/
class Whitelist
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=250, unique=true)
*/
private $label;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Whitelist
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
}

View File

@ -0,0 +1,172 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\HttpFoundation\Session\Session;
use Doctrine\ORM\EntityManager;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
class sessionListener {
protected $container;
protected $em;
public function __construct($container, EntityManager $em, TokenStorageInterface $token_storage)
{
$this->container = $container;
$this->em = $em;
$this->token_storage = $token_storage;
}
public function haveRole($roles,$tohave) {
if($roles=="") {
if(empty($tohave)) return true;
}
else {
foreach($roles as $role) {
if(in_array($role,$tohave))
return true;
}
}
return false;
}
public function onDomainParse(Event $event) {
$session = new Session();
// Calcul des couleurs
$color = $this->container->get('cadoles.core.service.color');
$color->setColor();
// Utilisateur en cours
$curentuserid=0;
$token = $this->token_storage->getToken();
if(!$token) return;
$curentuser=$token->getUser();
// Roles actif
if($curentuser=="anon.") $roles="";
else $roles=$curentuser->getRoles();
// Chargement de la sidebar
$iconniveau01 =$this->container->getParameter('iconniveau01');
$labelsniveau01 =$this->container->getParameter('labelsniveau01');
$labelniveau01 =$this->container->getParameter('labelsniveau01');
$session->set('labelniveau01',$labelniveau01);
$iconniveau02 =$this->container->getParameter('iconniveau02');
$labelsniveau02 =$this->container->getParameter('labelsniveau02');
$labelniveau02 =$this->container->getParameter('labelsniveau02');
$session->set('labelniveau02',$labelniveau02);
$moderegistration =$this->container->getParameter('moderegistration');
$sidebar=array();
$nvs1 = $this->em->getRepository("CadolesCoreBundle:Sidebar")->findBy(array('parent'=> NULL), array('roworder' => 'ASC'));
foreach($nvs1 as $nv1) {
if($this->haveRole($roles,$nv1->getPermission())) {
$sidebar[$nv1->getRoworder()] = array(
"fonticon" => $nv1->getFonticon(),
"label" => $nv1->getLabel(),
"path" => $nv1->getPath(),
);
if($nv1->getPath()=="cadoles_core_config_niveau01") {
$sidebar[$nv1->getRoworder()]["label"]=$labelsniveau01;
$sidebar[$nv1->getRoworder()]["fonticon"]=$iconniveau01;
}
if($nv1->getPath()=="cadoles_core_config_niveau02") {
$sidebar[$nv1->getRoworder()]["label"]=$labelsniveau02;
$sidebar[$nv1->getRoworder()]["fonticon"]=$iconniveau02;
}
if($nv1->getPath()=="cadoles_core_config_whitelist") {
if($moderegistration=="none")
unset($sidebar[$nv1->getRoworder()]);
}
foreach($nv1->getChilds() as $nv2) {
if($this->haveRole($roles,$nv2->getPermission())) {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()] = array (
"fonticon" => $nv2->getFonticon(),
"label" => $nv2->getLabel(),
"path" => $nv2->getPath(),
);
if($nv2->getPath()=="cadoles_core_config_niveau01") {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["label"]=$labelsniveau01;
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["fonticon"]=$iconniveau01;
}
if($nv2->getPath()=="cadoles_core_config_niveau02") {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["label"]=$labelsniveau02;
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["fonticon"]=$iconniveau02;
}
if($nv2->getPath()=="cadoles_core_config_whitelist") {
if($moderegistration=="none")
unset($sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]);
}
foreach($nv2->getChilds() as $nv3) {
if($this->haveRole($roles,$nv3->getPermission())) {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()] = array (
"fonticon" => $nv3->getFonticon(),
"label" => $nv3->getLabel(),
"path" => $nv3->getPath(),
);
if($nv3->getPath()=="cadoles_core_config_niveau01") {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["label"]=$labelsniveau01;
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["fonticon"]=$iconniveau01;
}
if($nv3->getPath()=="cadoles_core_config_niveau02") {
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["label"]=$labelsniveau02;
$sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]["fonticon"]=$iconniveau02;
}
if($nv3->getPath()=="cadoles_core_config_whitelist") {
if($moderegistration=="none"||$moderegistration=="byuser")
unset($sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]);
}
if($nv3->getPath()=="cadoles_core_config_registration") {
if($moderegistration=="none")
unset($sidebar[$nv1->getRoworder()]["childs"][$nv2->getRoworder()]["childs"][$nv3->getRoworder()]);
}
}
}
}
}
}
}
$session->set('sidebar', $sidebar);
// CAS et non appel Ajax
$request=$event->getRequest();
if(!$request->isXmlHttpRequest()) {
// Création d'une instance de eolephpCAS
$myphpCAS = new \eolephpCAS();
// Déclaration du client
if(!$myphpCAS->EoleTestphpCAS()) {
$myphpCAS->client(__CAS_VERSION, __CAS_SERVER, __CAS_PORT, __CAS_FOLDER, false);
}
if (__CAS_LOGOUT){
if (method_exists($myphpCAS, 'eolelogoutRequests')){
$myphpCAS->eolelogoutRequests(false);
}
}
if (__CAS_VALIDER_CA) {
$myphpCAS->setCasServerCACert(__CAS_CA_LOCATION); // verification par rapport a la CA
} else {
if (method_exists("EolephpCAS", "setNoCasServerValidation")){
$myphpCAS->setNoCasServerValidation();
}
}
}
}
}

View File

@ -0,0 +1,131 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Group;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
class syncGroup implements EventSubscriber
{
protected $container;
protected $em;
protected $shouldSync;
protected $oldid;
protected $baseGroup;
public function __construct($container, EntityManager $em) {
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
}
public function getSubscribedEvents()
{
return array(
'postPersist',
'preUpdate',
'postUpdate',
'preRemove'
);
}
public function preUpdate(PreUpdateEventArgs $args) {
$entity = $args->getEntity();
if(!($entity instanceof Group)) return;
// Synchronisation uniquement si changement de valeur
$this->shouldSync = $args->hasChangedField('label');
if($args->hasChangedField('label')) $this->oldid=$args->getOldValue('label');
}
public function postUpdate(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On met à jour/créé la fiche de l'utilisateur dans l'annuaire
if ($entity instanceof Group && $this->shouldSync) {
$this->upsertGroup($entity);
}
}
public function postPersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On créait une fiche pour l'usager dans l'annuaire
if ($entity instanceof Group) {
$this->upsertGroup($entity);
}
}
public function preRemove(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
if ($entity instanceof Group) {
$this->removeGroup($entity);
}
}
public function removeGroup($group) {
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche dans l'annuaire
$criteria = '(cn='.$group->getLabel().')';
$subbranch= $this->baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
if(count($results)) {
$ldap->deleteGroup($group);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->delGroup($group);
}
public function upsertGroup($group, $force = false)
{
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche dans l'annuaire
if(isset($this->oldid))
$criteria = '(cn='.$this->oldid.')';
else
$criteria = '(cn='.$group->getLabel().')';
$subbranch=$this->baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$ldap->modifyGroup($group,$this->oldid);
}
// Sinon création de la fiche
else {
$ldap->addGroup($group);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->syncGroup($group,$this->oldid);
}
public function getBaseGroup() {
return $this->baseGroup;
}
public function setBaseGroup($baseGroup) {
$this->baseGroup = $baseGroup;
return $this;
}
}

View File

@ -0,0 +1,152 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Niveau01;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
class syncNiveau01 implements EventSubscriber
{
protected $container;
protected $shouldSync;
protected $oldid;
protected $baseNiveau01;
public function __construct($container, EntityManager $em) {
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
$this->changeSiren = true;
}
public function getSubscribedEvents()
{
return array(
'postPersist',
'preUpdate',
'postUpdate',
'preRemove'
);
}
public function preUpdate(PreUpdateEventArgs $args) {
$entity = $args->getEntity();
if(!($entity instanceof Niveau01)) return;
// Synchronisation uniquement si changement de valeur
$this->shouldSync = $args->hasChangedField('label')||$args->hasChangedField('siren');
$this->changeSiren = $args->hasChangedField('siren');
if($args->hasChangedField('label')) $this->oldid=$args->getOldValue('label');
}
public function postUpdate(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On met à jour/créé la fiche de l'utilisateur dans l'annuaire
if ($entity instanceof Niveau01 && $this->shouldSync) {
$this->upsertNiveau01($entity);
}
if ($entity instanceof Niveau01 && $this->changeSiren) {
// On change le SIRET de l'ensemble des utlisateurs associés à cet établissement
$qb = $this->em->createQueryBuilder();
$datas= $qb ->select('table')->from('CadolesCoreBundle:User','table')
->where('table.niveau01 = :id')
->setParameter("id", $entity->getId())
->getQuery()
->getResult();
foreach($datas as $data) {
$data->setSiren($entity->getSiren());
$this->em->persist($data);
$this->em->flush();
}
}
}
public function postPersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On créait une fiche pour l'usager dans l'annuaire
if ($entity instanceof Niveau01) {
$this->upsertNiveau01($entity);
}
}
public function preRemove(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
if ($entity instanceof Niveau01) {
$this->removeNiveau01($entity);
}
}
public function removeNiveau01($niveau01) {
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'utilisateur dans l'annuaire
$criteria = '(cn='.$niveau01->getLabel().')';
$subbranch=$this->baseNiveau01;
$results = $ldap->search($criteria, array('uid'), $subbranch);
if(count($results)) {
$ldap->deleteNiveau01($niveau01);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->delNiveau01($niveau01);
}
public function upsertNiveau01($niveau01, $force = false)
{
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche le niveau01 dans l'annuaire
if(isset($this->oldid))
$criteria = '(cn='.$this->oldid.')';
else
$criteria = '(cn='.$niveau01->getLabel().')';
$subbranch=$this->baseNiveau01;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$ldap->modifyNiveau01($niveau01,$this->oldid);
}
// Sinon création de la fiche
else {
$ldap->addNiveau01($niveau01);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->syncNiveau01($niveau01,$this->oldid);
}
public function getBaseNiveau01() {
return $this->baseNiveau01;
}
public function setBaseNiveau01($baseNiveau01) {
$this->baseNiveau01 = $baseNiveau01;
return $this;
}
}

View File

@ -0,0 +1,149 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Niveau02;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
class syncNiveau02 implements EventSubscriber
{
protected $container;
protected $em;
protected $shouldSync;
protected $changeSiren;
protected $oldid;
protected $baseNiveau02;
public function __construct($container, EntityManager $em) {
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
$this->changeSiret = true;
}
public function getSubscribedEvents()
{
return array(
'postPersist',
'preUpdate',
'postUpdate',
'preRemove'
);
}
public function preUpdate(PreUpdateEventArgs $args) {
$entity = $args->getEntity();
if(!($entity instanceof Niveau02)) return;
// Synchronisation uniquement si changement de valeur
$this->shouldSync = $args->hasChangedField('label')||$args->hasChangedField('siret')||$args->hasChangedField('postaladress');
$this->changeSiret = $args->hasChangedField('siret');
if($args->hasChangedField('label')) $this->oldid=$args->getOldValue('label');
}
public function postUpdate(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On met à jour/créé la fiche de l'utilisateur dans l'annuaire
if ($entity instanceof Niveau02 && $this->shouldSync) {
$this->upsertNiveau02($entity);
}
if ($entity instanceof Niveau02 && $this->changeSiret) {
// On change le SIRET de l'ensemble des utlisateurs associés à cet établissement
$qb = $this->em->createQueryBuilder();
$datas= $qb ->select('table')->from('CadolesCoreBundle:User','table')
->where('table.niveau02 = :id')
->setParameter("id", $entity->getId())
->getQuery()
->getResult();
foreach($datas as $data) {
$data->setSiret($entity->getSiret());
$this->em->persist($data);
$this->em->flush();
}
}
}
public function postPersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On créait une fiche pour l'usager dans l'annuaire
if ($entity instanceof Niveau02) {
$this->upsertNiveau02($entity);
}
}
public function preRemove(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
if ($entity instanceof Niveau02) {
$this->removeNiveau02($entity);
}
}
public function removeNiveau02($niveau02) {
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'utilisateur dans l'annuaire
$criteria = '(cn='.$niveau02->getLabel().')';
$subbranch= $this->baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
if(count($results)) {
$ldap->deleteNiveau02($niveau02);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->delNiveau02($niveau02);
}
public function upsertNiveau02($niveau02, $force = false)
{
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'établissement dans l'annuaire
if(isset($this->oldid))
$criteria = '(cn='.$this->oldid.')';
else
$criteria = '(cn='.$niveau02->getLabel().')';
$subbranch=$this->baseNiveau02;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$ldap->modifyNiveau02($niveau02,$this->oldid);
}
// Sinon création de la fiche
else {
$ldap->addNiveau02($niveau02);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->syncNiveau02($niveau02,$this->oldid);
}
public function getBaseNiveau02() {
return $this->baseNiveau02;
}
public function setBaseNiveau02($baseNiveau02) {
$this->baseNiveau02 = $baseNiveau02;
return $this;
}
}

View File

@ -0,0 +1,171 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Cadoles\CoreBundle\Entity\User;
use Cadoles\CoreBundle\Entity\Group;
use Cadoles\CoreBundle\Entity\UserGroup;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\EntityManager;
class syncUser implements EventSubscriber
{
protected $container;
protected $shouldSync;
protected $baseUser;
public function __construct($container, EntityManager $em) {
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
}
public function getSubscribedEvents()
{
return array(
'postPersist',
'preUpdate',
'postUpdate',
'preRemove'
);
}
public function preUpdate(PreUpdateEventArgs $args) {
$entity = $args->getEntity();
if(!($entity instanceof User)) return;
// Synchronisation uniquement si changement de valeur
$this->shouldSync = $args->hasChangedField('username') ||
$args->hasChangedField('firstname') ||
$args->hasChangedField('lastname') ||
$args->hasChangedField('email') ||
$args->hasChangedField('role') ||
$args->hasChangedField('password') ||
$args->hasChangedField('avatar') ||
$args->hasChangedField('niveau01') ||
$args->hasChangedField('niveau02') ||
$args->hasChangedField('siren') ||
$args->hasChangedField('siret') ||
$args->hasChangedField('authlevel') ||
$args->hasChangedField('usualname') ||
$args->hasChangedField('telephonenumber') ||
$args->hasChangedField('postaladress') ||
$args->hasChangedField('givensname') ||
$args->hasChangedField('birthdate') ||
$args->hasChangedField('gender') ||
$args->hasChangedField('job') ||
$args->hasChangedField('position') ||
$args->hasChangedField('belongingpopulation') ||
$args->hasChangedField('birthcountry') ||
$args->hasChangedField('birthplace')
;
$entity->setSiren($entity->getNiveau01()->getSiren());
if($entity->getNiveau02()!==null)
$entity->setSiret($entity->getNiveau02()->getSiret());
else
$entity->setSiret(null);
}
public function postUpdate(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On met à jour/créé la fiche de l'utilisateur dans l'annuaire
if ($entity instanceof User && $this->shouldSync) {
$this->upsertUser($entity);
}
}
public function postPersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On créait une fiche pour l'usager dans l'annuaire
if ($entity instanceof User) {
$this->upsertUser($entity);
}
}
public function preRemove(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
if ($entity instanceof User) {
$this->removeUser($entity);
}
}
public function removeUser($user) {
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'utilisateur dans l'annuaire
$criteria = '(uid='.$user->getUsername().')';
$subbranch=$this->baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
if(count($results)) {
$ldap->deleteUser($user);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->delUser($user);
}
public function upsertUser($user, $force = false)
{
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'utilisateur dans l'annuaire
$criteria = '(uid='.$user->getUsername().')';
$subbranch=$this->baseUser;
$results = $ldap->search($criteria, array('uid'), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$ldap->modifyUser($user);
}
// Sinon création de la fiche
else {
$ldap->addUser($user);
}
$ldap->addGroupUser($user);
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->syncUser($user);
// On ajoute l'utilisateur au groupe 'Tout le Monde' quoi qu'il arrive
$fgall=$this->em->getRepository('CadolesCoreBundle:Group')->findBy(array('fgall'=>true));
if($fgall) {
$data=$this->em->getRepository('CadolesCoreBundle:UserGroup')->findBy(array('user'=>$user,'group'=>$fgall[0]));
if(!$data) {
$data=new UserGroup();
$data->setUser($user);
$data->setGroup($fgall[0]);
$this->em->persist($data);
$this->em->flush();
}
}
}
public function getBaseUser() {
return $this->baseUser;
}
public function setBaseUser($baseUser) {
$this->baseUser = $baseUser;
return $this;
}
}

View File

@ -0,0 +1,122 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Doctrine\ORM\EntityManager;
use Cadoles\CoreBundle\Entity\Group;
use Cadoles\CoreBundle\Entity\UserGroup;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
class syncUserGroup implements EventSubscriber
{
protected $container;
protected $em;
protected $shouldSync;
protected $oldid;
protected $baseGroup;
public function __construct($container, EntityManager $em) {
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
}
public function getSubscribedEvents()
{
return array(
'postPersist',
'preUpdate',
'postUpdate',
'preRemove'
);
}
public function preUpdate(PreUpdateEventArgs $args) {
$entity = $args->getEntity();
if(!($entity instanceof UserGroup)) return;
$this->shouldSync = true;
}
public function postUpdate(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On met à jour/créé le rattachement utilisateur/group dans l'annuaire
if ($entity instanceof UserGroup && $this->shouldSync) {
$this->upsertGroup($entity);
}
}
public function postPersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
// On créait le rattachement utilisateur/group dans l'annuaire
if ($entity instanceof UserGroup) {
$this->upsertGroup($entity);
}
}
public function preRemove(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
if ($entity instanceof UserGroup) {
$this->removeGroup($entity);
}
}
public function removeGroup($group) {
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche dans l'annuaire
$criteria = '(cn='.$group->getGroup()->getLabel().')';
$subbranch= $this->baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
if(count($results)) {
$ldap->delUserGroup($group);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->delUserGroup($group);
}
public function upsertGroup($group, $force = false)
{
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche dans l'annuaire
$criteria = '(cn='.$group->getGroup()->getLabel().')';
$subbranch=$this->baseGroup;
$results = $ldap->search($criteria, array('cn'), $subbranch);
// Mise à jour si elle existe (pas normal que le group n'existe pas)
if(count($results) > 0) {
$ldap->addUserGroup($group);
}
}
$eportail = $this->container->get('cadoles.core.service.eportail');
if($eportail->isEnabled())
$eportail->addUserGroup($group);
}
public function getBaseGroup() {
return $this->baseGroup;
}
public function setBaseGroup($baseGroup) {
$this->baseGroup = $baseGroup;
return $this;
}
}

View File

@ -0,0 +1,95 @@
<?php
namespace Cadoles\CoreBundle\EventListener;
use Doctrine\Common\Persistence\ObjectManager;
use Oneup\UploaderBundle\Event\PostPersistEvent;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
class uploadListener
{
/**
* @var ObjectManager
*/
private $om;
public function __construct(ObjectManager $om, TokenStorageInterface $token_storage)
{
$this->om = $om;
$this->token_storage = $token_storage;
}
protected function getHeight($image) {
$size = getimagesize($image);
$height = $size[1];
return $height;
}
// Cacul de la largeur
protected function getWidth($image) {
$size = getimagesize($image);
$width = $size[0];
return $width;
}
protected function resizeImage($image,$width,$height,$scale) {
list($imagewidth, $imageheight, $imageType) = getimagesize($image);
$imageType = image_type_to_mime_type($imageType);
$newImageWidth = ceil($width * $scale);
$newImageHeight = ceil($height * $scale);
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
switch($imageType) {
case "image/gif":
$source=imagecreatefromgif($image);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
$source=imagecreatefromjpeg($image);
break;
case "image/png":
case "image/x-png":
$source=imagecreatefrompng($image);
break;
}
$newImage = imagecreatetruecolor( $newImageWidth, $newImageHeight );
imagealphablending( $newImage, false );
imagesavealpha( $newImage, true );
imagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);
switch($imageType) {
case "image/gif":
imagegif($newImage,$image);
break;
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
imagejpeg($newImage,$image,90);
break;
case "image/png":
case "image/x-png":
imagepng($newImage,$image);
break;
}
chmod($image, 0640);
return $image;
}
public function onUpload(PostPersistEvent $event)
{
$type=$event->getType();
switch($type) {
case "avatar":
$file=$event->getFile();
$filename=$file->getFilename();
$session = new Session();
$session->set('uploadavatar', $filename);
break;
}
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace Cadoles\CoreBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
class GroupType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('submit',
SubmitType::class, array(
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Valider"),
"attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success"))
)
);
$builder->add('label',
TextType::class, array(
"label" =>"Label",
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$choices=array("oui" => "1","non" => "0");
$builder->add("fgopen",
ChoiceType::class,array(
"label" =>"Groupe Ouvert (inscription possible par les utilisateurs)",
'disabled' => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"),
"choices" => $choices
)
);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\CoreBundle\Entity\Group',
'mode' => "string"
));
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace Cadoles\CoreBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
class LoginType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('_username')
->add('_password', PasswordType::class)
;
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace Cadoles\CoreBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
class Niveau01Type extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('submit',
SubmitType::class, array(
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Valider"),
"attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success"))
)
);
$builder->add('label',
TextType::class, array(
"label" =>"Label",
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('siren',
TextType::class, array(
"label" =>"SIREN",
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\CoreBundle\Entity\Niveau01',
'mode' => "string"
));
}
}

View File

@ -0,0 +1,78 @@
<?php
namespace Cadoles\CoreBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
class Niveau02Type extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$session = new Session();
$builder->add('submit',
SubmitType::class, array(
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Valider"),
"attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success"))
)
);
$builder->add('niveau01',
EntityType::class,
array(
"class" => "CadolesCoreBundle:Niveau01",
"label" => $session->get('labelniveau01'),
"choice_label" => "label",
"disabled" => ($options["mode"]!="submit"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]!="submit"?true:false))
)
);
$builder->add('label',
TextType::class, array(
"label" =>"Label",
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('siret',
TextType::class, array(
"label" =>"SIRET",
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('postaladress',
TextareaType::class, array(
"label" => "Adresse",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height:100px")
)
);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\CoreBundle\Entity\Niveau02',
'mode' => "string"
));
}
}

View File

@ -0,0 +1,264 @@
<?php
namespace Cadoles\CoreBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Gregwar\CaptchaBundle\Type\CaptchaType;
use Tetranz\Select2EntityBundle\Form\Type\Select2EntityType;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManager;
class RegistrationType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$session = new Session();
$builder->add('submit',
SubmitType::class, array(
"label" => ($options["mode"]=="delete"?"Confirmer la Suppression":"Valider"),
"attr" => ($options["mode"]=="delete"?array("class" => "btn btn-danger"):array("class" => "btn btn-success"))
)
);
# Obligatoire
$builder->add('username',
TextType::class, array(
"label" =>"Login",
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('firstname',
TextType::class, array(
"label" =>"Prénom",
"disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('lastname',
TextType::class, array(
"label" =>"Nom de Famille",
"disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('email',
EmailType::class, array(
"label" =>"Mail",
"disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$choices=array("oui" => "1","non" => "0");
$builder->add("visible",
ChoiceType::class,array(
"label" =>"Visible",
'disabled' => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"),
"choices" => $choices
)
);
$builder->add('niveau01',
EntityType::class,
array("class" => "CadolesCoreBundle:Niveau01",
"label" => $session->get('labelniveau01'),
"choice_label" => "label",
"disabled" => ($options["mode"]=="delete"||$options["mode"]=="send"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="submit"?false:true))));
# Password
if($options["mode"]!="delete"&&$options["mode"]!="send") {
$builder->add('password',
RepeatedType::class, array(
"type" => PasswordType::class,
"required" => ($options["mode"]=="submit"?true:false),
"first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")),
"second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"))
)
);
$builder->add('captcha',
CaptchaType::class,array(
"width" => 200,
"height" => 50,
"length" => 6,
)
);
}
# Optionnel
$builder->add('usualname',
TextType::class, array(
"label" => "Nom d'Usage",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('givensname',
TextType::class, array(
"label" => "Autre Prénom",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('telephonenumber',
TextType::class, array(
"label" => "Téléphone",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('postaladress',
TextareaType::class, array(
"label" => "Adresse",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 90px")
)
);
$builder->add('birthdate',
DateType::class, array(
"label" => "Date de Naissance",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"widget" => 'single_text',
"format" => "dd/MM/yyyy",
"html5" => false,
"attr" => array("class" => "form-control js-datepicker", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false)
)
)
);
$choices=array("" => "", "homme" => "male","femme" => "female");
$builder->add("gender",
ChoiceType::class,array(
"label" =>"Sexe",
"required" => false,
'disabled' => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px"),
"choices" => $choices
)
);
$builder->add('job',
TextType::class, array(
"label" => "Métier",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('position',
TextType::class, array(
"label" => "Fonction",
"required" => false,
"disabled" => ($options["mode"]=="submit"?false:true),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('birthcountry',
Select2EntityType::class, array(
'label' => "Pays de Naissance",
'disabled' => ($options["mode"]=="submit"?false:true),
'multiple' => false,
'remote_route' => 'cadoles_core_ajax_country_list',
'class' => 'Cadoles\coreBundle\Entity\Country',
'primary_key' => 'id',
'text_property' => 'label',
'minimum_input_length' => 2,
'page_limit' => 10,
'allow_clear' => true,
'delay' => 250,
'cache' => false,
'cache_timeout' => 60000, // if 'cache' is true
'language' => 'fr',
'placeholder' => 'Selectionner un pays',
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('birthplace',
Select2EntityType::class, array(
'label' => "Ville de Naissance",
'disabled' => ($options["mode"]=="submit"?false:true),
'multiple' => false,
'remote_route' => 'cadoles_core_ajax_city_list',
'class' => 'Cadoles\coreBundle\Entity\City',
'primary_key' => 'id',
'text_property' => 'label',
'minimum_input_length' => 2,
'page_limit' => 10,
'allow_clear' => true,
'delay' => 250,
'cache' => false,
'cache_timeout' => 60000, // if 'cache' is true
'language' => 'fr',
'placeholder' => 'Selectionner une ville',
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
$builder->add('niveau02',
Select2EntityType::class, array(
'label' => $session->get('labelniveau02'),
'disabled' => ($options["mode"]=="submit"?false:true),
'multiple' => false,
'remote_route' => 'cadoles_core_ajax_niveau02_list',
'class' => 'Cadoles\coreBundle\Entity\Niveau02',
'req_params' => ['niveau01' => 'parent.children[niveau01]'],
'primary_key' => 'id',
'text_property' => 'label',
'minimum_input_length' => 0,
'page_limit' => 10,
'allow_clear' => true,
'delay' => 250,
'cache' => false,
'cache_timeout' => 60000, // if 'cache' is true
'language' => 'fr',
'placeholder' => 'Selectionner une Localisation',
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
)
);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Cadoles\CoreBundle\Entity\Registration',
'mode' => "string"
));
}
}

Some files were not shown because too many files have changed in this diff Show More