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": {