This commit is contained in:
afornerot 2020-04-23 14:43:03 +02:00
parent 526f9eec3d
commit 9c27cd82f9
4 changed files with 337 additions and 0 deletions

View File

@ -0,0 +1,130 @@
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, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}yiDxhDNog19bkfbdXAX1PH2iZWUu5eGy
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
TRUNCATE TABLE sidebar;
INSERT IGNORE INTO `sidebar` (`id`, `parent_id`, `roworder`, `label`, `path`, `fonticon`, `permission`, `appactivate`) VALUES
(1000, NULL, 1000, 'CONFIGURATION', NULL, 'fa-gear', 'ROLE_ADMIN,ROLE_MODO', ''),
(1010, 1000, 1010, 'Générale', 'cadoles_core_config_commun', 'fa-table', 'ROLE_ADMIN,ROLE_MODO', ''),
(1020, 1000, 1020, 'Thème', 'cadoles_core_config_theme', 'fa-paint-brush', 'ROLE_ADMIN,ROLE_MODO', ''),
(1030, 1000, 1030, 'Modération', 'cadoles_core_config_permmodo', 'fa-balance-scale', 'ROLE_ADMIN', ''),
(1040, 1000, 1040, 'Fiche Utilisateur', 'cadoles_core_config_datauser', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO', ''),
(1050, 1000, 1050, 'Liste Utilisateurs', 'cadoles_core_config_datausers', 'fa-gear', 'ROLE_ADMIN,ROLE_MODO', ''),
(1200, NULL, 1200, 'ORGANISATION', NULL, 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO', ''),
(1210, 1200, 1210, 'Listes Blanche', 'cadoles_core_config_whitelist', 'fa-tasks', 'ROLE_ADMIN,ROLE_MODO', ''),
(1220, 1200, 1220, 'Niveau 01', 'cadoles_core_config_niveau01', 'fa-building', 'ROLE_ADMIN,ROLE_MODO', ''),
(1230, 1200, 1230, 'Niveau 02', 'cadoles_core_config_niveau02', 'fa-sitemap', 'ROLE_ADMIN,ROLE_MODO', ''),
(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', ''),
(1270, 1200, 1270, 'Import Utilisateurs', 'cadoles_core_config_importuser', 'fa-download', 'ROLE_ADMIN,ROLE_MODO', 'importuser_activate'),
(1500, NULL, 1500, 'PORTAIL', NULL, 'fa-cubes', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1510, 1500, 1510, 'Modèles de Page', 'cadoles_portal_config_pagetemplate', 'fa-copy', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1520, 1500, 1520, 'Pages', 'cadoles_portal_config_page', 'fa-file', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1530, 1500, 1530, 'Items', 'cadoles_portal_config_item', 'fa-desktop', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1540, 1500, 1540, 'Annonces', 'cadoles_portal_config_alert', 'fa-bell', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1550, 1500, 1550, 'Calendriers', 'cadoles_portal_config_calendar', 'fa-calendar', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1560, 1500, 1560, 'Blogs', 'cadoles_portal_config_blog', 'fa-paper-plane', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1570, 1500, 1570, 'Projets', 'cadoles_portal_config_project', 'fa-suitcase', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1580, 1500, 1580, 'Flux', 'cadoles_portal_config_flux', 'fa-rss', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1590, 1500, 1590, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(1600, 1500, 1600, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'portal_activate'),
(2500, NULL, 2500, 'MODULES', NULL, 'fa-cubes', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
(2510, 2500, 2510, 'Pages', 'cadoles_portal_config_page', 'fa-file', 'ROLE_ADMIN,ROLE_MODO', 'page_activate'),
(2520, 2500, 2520, 'Items', 'cadoles_portal_config_item', 'fa-desktop', 'ROLE_ADMIN,ROLE_MODO', 'item_activate'),
(2530, 2500, 2530, 'Annonces', 'cadoles_portal_config_alert', 'fa-bell', 'ROLE_ADMIN,ROLE_MODO', 'alert_activate'),
(2540, 2500, 2540, 'Calendriers', 'cadoles_portal_config_calendar', 'fa-calendar', 'ROLE_ADMIN,ROLE_MODO', 'calendar_activate'),
(2550, 2500, 2550, 'Blogs', 'cadoles_portal_config_blog', 'fa-paper-plane', 'ROLE_ADMIN,ROLE_MODO', 'blog_activate'),
(2560, 2500, 2560, 'Projects', 'cadoles_portal_config_project', 'fa-suitcase', 'ROLE_ADMIN,ROLE_MODO', 'project_activate'),
(2570, 2500, 2570, 'Flux', 'cadoles_portal_config_flux', 'fa-rss', 'ROLE_ADMIN,ROLE_MODO', 'flux_activate'),
(2580, 2500, 2580, 'Chartes', 'cadoles_portal_config_notice', 'fa-info', 'ROLE_ADMIN,ROLE_MODO', 'notice_activate'),
(2590, 2500, 2590, 'Icônes', 'cadoles_portal_config_icon', 'fa-bug', 'ROLE_ADMIN,ROLE_MODO', 'module_activate'),
(3000, NULL, 3000, 'SYNCHRONISATION', NULL, 'fa-exchange', 'ROLE_ADMIN,ROLE_MODO', 'syncenvole_activate'),
(3001, 3000, 3001, 'Délégation', 'cadoles_portal_config_syncdelegation', 'fa-balance-scale', 'ROLE_ADMIN,ROLE_MODO', 'syncenvole_activate'),
(3110, 3000, 3110, 'Balado', 'cadoles_portal_config_syncbalado', 'fa-microphone', 'ROLE_ADMIN,ROLE_MODO', 'widbalado_activate_syncenvole'),
(3115, 3000, 3115, 'GEPI via Annuaire', 'cadoles_portal_config_syncgepiannu', 'fa-tags', 'ROLE_ADMIN,ROLE_MODO', 'widgepi_activate_syncenvole'),
(3116, 3000, 3116, 'GEPI via SIECLE', 'cadoles_portal_config_syncgepisiecle', 'fa-tags', 'ROLE_ADMIN,ROLE_MODO', 'widgepi_activate_syncenvole'),
(3120, 3000, 3120, 'Limesurvey', 'cadoles_portal_config_synclimesurvey', 'fa-question', 'ROLE_ADMIN,ROLE_MODO', 'activate_widlimesurvey'),
(3130, 3000, 3130, 'Moodle', 'cadoles_portal_config_syncmoodle', 'fa-graduation-cap', 'ROLE_ADMIN,ROLE_MODO', 'activate_widmoodle'),
(3140, 3000, 3140, 'Nexcloud', 'cadoles_portal_config_syncnextcloud', 'fa-cloud', 'ROLE_ADMIN,ROLE_MODO', 'widnextcloud_activate_syncenvole'),
(3150, 3000, 3150, 'Sacoche via SIECLE', 'cadoles_portal_config_syncsacoche', 'fa-suitcase', 'ROLE_ADMIN,ROLE_MODO', 'widsacoche_activate_syncenvole'),
(3160, 3000, 3160, 'Piwik', 'cadoles_portal_config_syncpiwik', 'fa-signal', 'ROLE_ADMIN,ROLE_MODO', 'widpiwik_activate_syncenvole'),
(3230, 3000, 3230, 'Wordpress', 'cadoles_portal_config_syncwordpress', 'fa-wordpress', 'ROLE_ADMIN,ROLE_MODO', 'activate_widwordpress'),
(7000, NULL, 7000, 'CRON', NULL, 'fa-bolt', 'ROLE_ADMIN,ROLE_MODO', 'cron_activate'),
(7010, 7000, 7010, 'Jobs', 'cadoles_cron_config', 'fa-bullseye', 'ROLE_ADMIN,ROLE_MODO', 'cron_activate'),
(7020, 7000, 7020, 'Logs', 'cadoles_cron_config_log', 'fa-list-alt', 'ROLE_ADMIN,ROLE_MODO', 'cron_activate');
DELETE FROM `config` WHERE `changeable` = 0;
INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type`, `id`, `value`, `grouped`, `help`) VALUES
('001', 1, 1, 1, 'string', 'appname', 'Ninegate', '', 'Le titre de votre site'),
('002', 1, 0, 1, 'string', 'version', '1.0.0', '', 'Version de l\'application'),
('003', 1, 1, 0, 'string', 'subappname', 'Portail', '', 'Le sous titre de votre site'),
('004', 1, 1, 1, 'logo', 'logo', 'uploads/logo/logo.png', '', 'Le logo de votre site'),
('005', 0, 1, 0, 'theme', 'theme', '', '', 'Le theme de votre site'),
('006', 0, 1, 0, 'datauser', 'datauser', '', '', 'Parametrage des champs utilisateurs : obligatoire / facultatif / caché'),
('007', 0, 1, 0, 'datausers', 'datausers', '', '', 'Parametrage des colonnes visible dans la liste des utilisateurs'),
('010', 1, 1, 1, 'boolean', 'fgforceconnect', '0', '', 'Forcer la connection afin de rendre votre site privé'),
('040', 1, 1, 1, 'boolean', 'fgheader', '1', '', 'Utiliser une image en bannière du site'),
('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'),
('042', 1, 1, 1, 'integer', 'heightheader', '100', 'fgheader', 'Hauteur de la bannière du site'),
('050', 1, 1, 1, 'color', 'colormain', '2c3e50', '', 'Couleur principale de votre site'),
('051', 1, 1, 1, 'color', 'fontcolorhover', 'ffffff', '', 'Couleur de la police sur couleur principale'),
('052', 1, 1, 1, 'color', 'colorbody', 'ffffff', '', 'Couleur de fond de vos pages'),
('060', 1, 1, 1, 'font', 'fontfacetitle', 'Anton-Regular', '', 'Police des titres de votre site'),
('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica', '', 'Police des titres de votre site'),
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'),
('201', 1, 0, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'),
('202', 1, 0, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy'),
('500', 1, 1, 1, 'permgroup', 'permgroup', 'ROLE_ANIM', '', 'Determine quel rôle aura la permission de créer des groupes de travail');
INSERT IGNORE permmodo (`route`, `visible`) VALUES
('cadoles_core_config_commun',0),
('cadoles_core_config_theme',0),
('cadoles_core_config_datauser',0),
('cadoles_core_config_datausers',0),
('cadoles_core_config_whitelist',0),
('cadoles_core_config_niveau01',0),
('cadoles_core_config_niveau02',1),
('cadoles_core_config_group',1),
('cadoles_core_config_registration',1),
('cadoles_core_config_user',1),
('cadoles_core_config_importuser',0),
('cadoles_portal_config_pagetemplate',1),
('cadoles_portal_config_page',1),
('cadoles_portal_config_item',1),
('cadoles_portal_config_alert',1),
('cadoles_portal_config_calendar',1),
('cadoles_portal_config_blog',1),
('cadoles_portal_config_flux',1),
('cadoles_portal_config_notice',1),
('cadoles_portal_config_icon',1),
('cadoles_portal_config_synclimesurvey',0),
('cadoles_portal_config_syncmoodle',0),
('cadoles_portal_config_syncwordpress',0),
('cadoles_cron_config',0),
('cadoles_cron_config_log',0);

View File

@ -0,0 +1,57 @@
#!/bin/bash
echo "INSTALLATION NINEGATE HORS EOLE"
cd /var/www/html/ninegate
www_dir="/var/www/html"
yes | cp scripts/apache/ninegate.conf /etc/apache2/sites-available/
a2ensite ninegate
service apache2 restart
# Récuper les composer associés à la version de php installé
version72=`php -r 'echo version_compare(phpversion(), "7.2.0", ">=");'`
if [[ "$version72" == "1" ]]
then
cp -rf /var/www/html/ninegate/scripts/php72/composer.json /var/www/html/ninegate/composer.json
cp -rf /var/www/html/ninegate/scripts/php72/composer.lock /var/www/html/ninegate/composer.lock
else
version70=`php -r 'echo version_compare(phpversion(), "7.0.0", ">=");'`
if [[ "$version70" == "1" ]]
then
cp -rf /var/www/html/ninegate/scripts/php70/composer.json /var/www/html/ninegate/composer.json
cp -rf /var/www/html/ninegate/scripts/php70/composer.lock /var/www/html/ninegate/composer.lock
fi
fi
# Installation des dépendances composer
composer install
rm -f /var/www/html/ninegate/var/logs/dev.log
# Permissions
./perm.sh www-data
# Nettoyage du cache
rm /var/www/html/ninegate/var/cache -rf
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 --env=prod
php bin/console Cron:InitData --env=prod
php bin/console Portal:InitData --env=prod
# Passage des scripts
php bin/console Core:Script --env=prod
# Generation des assets
bin/console assetic:dump --env=prod
# Copie des polices du projet dans le rep web
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
bin/console Core:SetPassword admin admin
# Permissions
./perm.sh www-data

View File

@ -0,0 +1,11 @@
Alias /ninegate /var/www/html/ninegate/web
<Directory "/var/www/html/ninegate/web" >
AllowOverride All
Order Allow,Deny
Allow from All
Options Indexes FollowSymLinks MultiViews
php_admin_flag allow_url_fopen On
</Directory>

View File

@ -0,0 +1,139 @@
# This file is auto-generated during the composer install
parameters:
# Determine qui est le maitre de l'identitité = SQL / LDAP / SSO
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
# Si la source est externe de fait pas de module d'inscription ni de reset de password
# Et pas de synchronisation vers un annuaire ou vers ePortail
masteridentity: SQL
# Mode d'authentification soit SQL / LDAP / CAS / SAML
# Pour l'instant SQL - CAS - SAML Reste à faire LDAP
# Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL
# Car aucune synchronisation des password n'est possible
mode_auth: SQL
# Mode de registration : none / byuser / byadmin
# none = désactivation de l'inscription mais reset de password possible
# byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même
# byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche
moderegistration: byadmin
# Activation module
cron_activate: true
portal_activate: true
module_activate: false
page_activate: false
item_activate: false
alert_activate: false
calendar_activate: false
blog_activate: false
project_activate: false
flux_activate: false
notice_activate: false
# Mise en page
weburl: localhost
alias: ninegate
libelle_etab: ninegate
numero_etab: ~
colormain: 2c3e50 # Couleur principale
fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale
keyterm: 8 # Taille mini du password
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
labelsirenniveau01: SIREN # Label SIREN
viewniveau02: true # Gérer un niveau 02 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
labelsiretniveau02: SIRET # Label SIRET
mailer_port: '2525'
mailer_encryption: null
mailer_authmode: null
noreply: noreply@ninegate.fr
websocket_activate: false
websocket_host: localhost
websocket_port: 5555
websocket_portinterne: 5556
activate_widadminer: false
activate_widbalado: false
activate_widdokuwiki: false
activate_wideconnect: false
activate_widetherhome: false
activate_widfluxbb: false
activate_widgepi: false
activate_widglpi: false
activate_widgrr: false
activate_widkanboard: false
activate_widlimesurvey: false
activate_widmindmaps: false
activate_widmoodle: false
activate_widnextcloud: false
activate_widonlyoffice: false
activate_widopensondage: false
activate_widphpldapadmin: false
activate_widpiwik: false
activate_widroundcube: false
activate_widsacoche: false
activate_widwordpress: false
syncenvole_activate: false
widbalado_activate_syncenvole: false
widgepi_activate_syncenvole: false
widnextcloud_activate_syncenvole: false
widonlyoffice_sync: false
widpiwik_activate_syncenvole: false
widsacoche_activate_syncenvole: false
activate_widsonde: false
widsonde_url:
saml_entityid: 'http://discovery'
saml_logout_url: 'http://localhost:8088/idp/profile/Logout'
saml_idps_list: ['http://localhost:8088/idp/shibboleth']
ldap_sync: false
ldap_template: open
ldap_host: 127.0.0.1
ldap_port: 389
ldap_user: cn=admin,o=gouv,c=fr
ldap_password: ~
ldap_basedn: o=gouv,c=fr
ldap_baseuser:
ldap_baseniveau01:
ldap_baseniveau02:
ldap_basegroup:
# Doctrine Configuration
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
orm:
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
CadolesCoreBundle: ~
CadolesCronBundle: ~
CadolesPortalBundle: ~
CadolesWebsocketBundle: ~