Compare commits

..

12 Commits

Author SHA1 Message Date
19c24803d1 svg 2025-09-30 23:09:03 +02:00
29e5daad9a svg 2025-09-30 22:59:52 +02:00
b0894e0267 svg 2025-09-30 22:47:43 +02:00
b7b9cebacb svg 2025-09-30 21:24:37 +02:00
d603fb452a svg 2025-09-30 20:55:15 +02:00
f0e5d00970 svg 2024-12-19 11:04:51 +01:00
a3f54b2f11 reconf env.model 2023-09-06 14:23:54 +02:00
386d639151 gestion composer 1 & 2 2023-08-31 15:43:48 +02:00
a2899ee93b correctif breakday 2023-08-31 11:10:50 +02:00
efe978130c rest breakday depuis depuis début ninebadge 2023-08-25 15:43:56 +02:00
9c752523b4 rest breakday depuis depuis début ninebadge 2023-08-25 15:42:28 +02:00
afornerot
43c1b6f5ce correction feriées sur synthèse (fix #82) 2023-05-16 17:20:38 +02:00
2962 changed files with 2476 additions and 32440 deletions

39
.dockerignore Normal file
View File

@@ -0,0 +1,39 @@
# Dépendances locales (elles seront réinstallées dans limage)
vendor/
node_modules/
# Fichiers de config locaux ou secrets
.env.local
.env.*.local
# Cache et logs Symfony
var
# Build front-end
public/build/
public/bundles/
# Tests
phpunit.xml
phpunit.xml.dist
tests/
# IDE & OS
*.log
*.md
*.swp
.idea/
.vscode/
.DS_Store
Thumbs.db
# Git
.git
.gitignore
# uploads
uploads/
public/uploads/
# Volume
volume/

42
.env Normal file
View File

@@ -0,0 +1,42 @@
# Basic
APP_ENV=PROD
APP_SECRET=changeme
APP_ALIAS=schedule
APP_AUTH=MYSQL
APP_NAME=Schedule
APP_CRON=true
# Office hours
OFFICE_HOUR_START=09:00
OFFICE_HOUR_END=17:30
# MAIL sendmail / smtp
MAILER_METHOD=sendmail
MAILER_URL=
MAILER_NOREPLY=noreply@noreply.fr
MAILER_DEFAULT_NOTIF=
MAILER_URL=null://localhost
# BDD
DATABASE_HOST=mariadb
DATABASE_NAME=schedule
DATABASE_USER=user
DATABASE_PASSWORD=changeme
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
## Sentry DSN
SENTRY_DSN=
# Dolibar
DOLIBARR_ACTIVE=false
DOLIBARR_API_KEY=
DOLIBARR_URI=

28
.gitignore vendored
View File

@@ -1 +1,27 @@
*~
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
###> symfony/webpack-encore-bundle ###
/node_modules/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
###> uploads ###
/public/uploads
/uploads
###> uploads ###

53
.php-cs-fixer.dist.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'vendor',
'var',
'web',
'app/DoctrineMigrations',
'bin',
'doc',
])
->name('*.php')
;
// TODO: Définir les règles de style communes
// spécifiques au projet
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'concat_space' => ['spacing' => 'none'],
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'explicit_indirect_variable' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'no_unused_imports' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'ternary_operator_spaces' => true,
'class_definition' => ['single_line' => true],
'whitespace_after_comma_in_array' => true,
// phpdoc
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true],
'phpdoc_order' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'alpha',
],
'phpdoc_no_empty_return' => false,
'phpdoc_summary' => false,
'general_phpdoc_annotation_remove' => [
'annotations' => [
'expectedExceptionMessageRegExp',
'expectedException',
'expectedExceptionMessage',
'author',
],
],
])
->setFinder($finder)
;

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"php.version": "7.4"
}

View File

@@ -1,26 +0,0 @@
################################
# Makefile
################################
SOURCE=schedule
VERSION=2.0
EOLE_VERSION=2.7
EOLE_RELEASE=2.7.1
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

64
apps.mk
View File

@@ -1,64 +0,0 @@
#
# 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

@@ -44,6 +44,7 @@
"tetranz/select2entity-bundle": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
"symfony/debug-pack": "*",
"symfony/test-pack": "*"
},
@@ -51,7 +52,10 @@
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"symfony/flex": true
}
},
"autoload": {
"psr-4": {
@@ -74,10 +78,7 @@
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"cache:clear --env=prod": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"make:migration": "symfony-cmd",
"doctrine:migrations:migrate --no-interaction --allow-no-migration": "symfony-cmd"
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"

View File

@@ -1,10 +1,10 @@
{
"_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",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1ad3ebfcef7f9cf273d256ed17d9bfa1",
"content-hash": "b88b4bb7a5b2d82324133b372e47e930",
"packages": [
{
"name": "clue/stream-filter",
@@ -8629,6 +8629,385 @@
}
],
"packages-dev": [
{
"name": "composer/pcre",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
"keywords": [
"PCRE",
"preg",
"regex",
"regular expression"
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/1.0.1"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-01-21T20:24:37+00:00"
},
{
"name": "composer/semver",
"version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.11",
"symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.4"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
}
],
"time": "2025-08-20T19:15:30+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
"shasum": ""
},
"require": {
"composer/pcre": "^1",
"php": "^5.3.2 || ^7.0 || ^8.0",
"psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1",
"symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Composer\\XdebugHandler\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "John Stevenson",
"email": "john-stevenson@blueyonder.co.uk"
}
],
"description": "Restarts a process without Xdebug.",
"keywords": [
"Xdebug",
"performance"
],
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
"source": "https://github.com/composer/xdebug-handler/tree/2.0.5"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2022-02-24T20:20:32+00:00"
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.19.3",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
"reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8",
"shasum": ""
},
"require": {
"composer/semver": "^1.4 || ^2.0 || ^3.0",
"composer/xdebug-handler": "^1.2 || ^2.0",
"doctrine/annotations": "^1.2",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^5.6 || ^7.0 || ^8.0",
"php-cs-fixer/diff": "^1.3",
"symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
"symfony/finder": "^3.0 || ^4.0 || ^5.0",
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
"symfony/polyfill-php70": "^1.0",
"symfony/polyfill-php72": "^1.4",
"symfony/process": "^3.0 || ^4.0 || ^5.0",
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.0",
"keradus/cli-executor": "^1.4",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.4.2",
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy-phpunit": "^1.1 || ^2.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
"symfony/phpunit-bridge": "^5.2.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
"ext-mbstring": "For handling non-UTF8 characters.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
},
"bin": [
"php-cs-fixer"
],
"type": "application",
"extra": {
"branch-alias": {
"dev-master": "2.19-dev"
}
},
"autoload": {
"psr-4": {
"PhpCsFixer\\": "src/"
},
"classmap": [
"tests/Test/AbstractFixerTestCase.php",
"tests/Test/AbstractIntegrationCaseFactory.php",
"tests/Test/AbstractIntegrationTestCase.php",
"tests/Test/Assert/AssertTokensTrait.php",
"tests/Test/IntegrationCase.php",
"tests/Test/IntegrationCaseFactory.php",
"tests/Test/IntegrationCaseFactoryInterface.php",
"tests/Test/InternalIntegrationCaseFactory.php",
"tests/Test/IsIdenticalConstraint.php",
"tests/Test/TokensWithObservedTransformers.php",
"tests/TestCase.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
}
],
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3"
},
"funding": [
{
"url": "https://github.com/keradus",
"type": "github"
}
],
"time": "2021-11-15T17:17:55+00:00"
},
{
"name": "php-cs-fixer/diff",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
"reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
"symfony/process": "^3.3"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{
"name": "SpacePossum"
}
],
"description": "sebastian/diff v2 backport support for PHP5.6",
"homepage": "https://github.com/PHP-CS-Fixer",
"keywords": [
"diff"
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/diff/issues",
"source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1"
},
"abandoned": true,
"time": "2020-10-14T08:39:05+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v4.4.15",
@@ -8996,7 +9375,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
@@ -9004,5 +9383,6 @@
"ext-ctype": "*",
"ext-iconv": "*"
},
"platform-dev": []
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

View File

@@ -11,3 +11,5 @@ twig:
appAuth: '%appAuth%'
appName: '%appName%'
appCron: '%appCron%'
doliActive: '%doliActive%'
doliUri: '%doliUri%'

View File

@@ -266,13 +266,13 @@ app_offer_viewservice:
path: /master/offer/viewservice
defaults: { _controller: App\Controller\OfferController:viewservice }
app_offer_getorders:
path: /master/offer/getorders
defaults: { _controller: App\Controller\OfferController:getorders }
app_offer_dolibarr:
path: /master/offer/dolibarr
defaults: { _controller: App\Controller\OfferController:dolibarr }
app_offer_convert:
path: /master/offer/convert/{type}/{id}
defaults: { _controller: App\Controller\OfferController:convert }
app_offer_getdolibarr:
path: /master/offer/getdolibarr
defaults: { _controller: App\Controller\OfferController:getdolibarr }
#== Task ====================================================================================================
app_task:

View File

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

1
debian/compat vendored
View File

@@ -1 +0,0 @@
7

24
debian/control vendored
View File

@@ -1,24 +0,0 @@
Source: eole-schedule
Section: web
Priority: optional
Maintainer: Cadoles <contact@cadoles.com>
Build-Depends: debhelper (>= 7.0.50)
Standards-Version: 3.8.4
Homepage: https://forge.cadoles.com/Cadoles/schedule
Vcs-Git: https://forge.cadoles.com/Cadoles/schedule
Vcs-Browser: https://forge.cadoles.com/Cadoles/schedule
Package: schedule-sso
Architecture: all
Depends: ${misc:Depends}, eole-sso
Description: Filtre SSO pour schedule "EOLE".
Package: eole-schedule
Architecture: all
Depends: ${misc:Depends}, eole-envole-dependances, schedule-sso
Description: Eolisation de l'application schedule.
Package: schedule-apps
Architecture: all
Depends: ${misc:Depends}, envole-dependances-apps
Description: Sources pour schedule "EOLE".

44
debian/copyright vendored
View File

@@ -1,44 +0,0 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: {PROJECT}
Source: {URL}
Files: *
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
License: {UPSTREAM LICENSE}
Files: debian/*
Copyright: 2012 Équipe EOLE <eole@ac-dijon.fr>
License: CeCILL-2
License: {UPSTREAM LICENSE}
{TEXT OF THE LICENSE}
License: CeCILL-2
This software is governed by the CeCILL-2 license under French law and
abiding by the rules of distribution of free software. You can use,
modify and or redistribute the software under the terms of the CeCILL-2
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info";.
.
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-2 license and that you accept its terms.
.
On Eole systems, the complete text of the CeCILL-2 License can be found
in '/usr/share/common-licenses/CeCILL-2-en'.

View File

@@ -1 +0,0 @@
usr/share/eole

3
debian/gbp.conf vendored
View File

@@ -1,3 +0,0 @@
# Set per distribution debian tag
[DEFAULT]
debian-tag = debian/envole/%(version)s

8
debian/rules vendored
View File

@@ -1,8 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@

View File

@@ -1 +0,0 @@
var/www/html

View File

@@ -1 +0,0 @@
usr/share/sso

View File

@@ -1 +0,0 @@
3.0 (native)

View File

@@ -1,102 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='schedule' name='/etc/eole/eole-db.d/schedule-db.yml' rm='True' mkdir='True'/>
</files>
<containers>
<container name='web'>
<package>schedule-apps</package>
<!-- service de configuration apache -->
<service method="apache" servicelist="schedule">schedule</service>
<!-- template -->
<file filelist='schedule' name='/etc/apache2/sites-available/schedule' source='schedule-apache.conf' />
<file filelist='schedule' name='/var/www/html/schedule/.env.local' source='schedule-env.local' rm='True'/>
<file filelist='schedule' name='/var/www/html/schedule/scripts/proxy.sh' source='schedule-proxy.sh' rm='True'/>
<file filelist='schedule' name='/etc/cron.d/schedule' source='schedule.cron' rm='True'/>
</container>
</containers>
<variables>
<family name='applications web'>
<variable name='activer_schedule' type='oui/non' description='Activer schedule'>
<value>oui</value>
</variable>
</family>
<family name='schedule' mode='expert'>
<variable type='string' name='schedule_db_mode' description='Serveur de bases de données à utiliser'/>
<variable type='string' name='schedule_dbserver' description='Adresse du serveur de base de données'/>
<variable type='number' name='schedule_dbport' description="Port d'écoute du serveur de base de données"/>
<variable type='string' name='schedule_allow_hosts' description="Hôtes authorisés à utiliser la base de données" multi='True'/>
<variable type='string' name='schedule_dbuser' description='Utilisateur du serveur de base de données'/>
<variable type='string' name='schedule_dbpass' description='Fichier de mot de passe du serveur'/>
<variable type='string' name='schedule_email_url' description='URL de connexion au serveur smtp'/>
<variable type='string' name='schedule_email_global_notif' description='Email pour envoie de notifications'/>
<variable type='string' name="schedule_office_hour_start" description="Heure de début d'une journée">
<value>09:00</value>
</variable>
<variable type='string' name="schedule_office_hour_end" description="Heure de fin d'une journée">
<value>17:30</value>
</variable>
<variable type='oui/non' name="schedule_dolibarr_api" description='Activer la récupération des commandes depuis Dolibarr'>
<value>non</value>
</variable>
<variable type='string' name='schedule_dolibarr_apikey' description='Api Key pour Dolibarr'/>
<variable type='string' name='schedule_dolibarr_uri' description='Uri du serveur Dolibarr'/>
<variable type='oui/non' name="schedule_sentry" description='Activer Sentry'>
<value>non</value>
</variable>
<variable type='string' name='schedule_sentry_dsn' description='DSN de Sentry'/>
</family>
</variables>
<constraints>
<condition name='hidden_if_in' source='activer_apache'>
<param>non</param>
<target type='filelist'>schedule</target>
<target type='servicelist'>schedule</target>
</condition>
<condition name='hidden_if_in' source='activer_schedule'>
<param>non</param>
<target type='filelist'>schedule</target>
<target type='servicelist'>schedule</target>
</condition>
<check name='valid_enum' target='schedule_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
<condition name='disabled_if_in' source='schedule_db_mode'>
<param>local</param>
<target type='variable'>schedule_dbserver</target>
<target type='variable'>schedule_dbuser</target>
<target type='variable'>schedule_dbport</target>
<target type='variable'>schedule_dbpass</target>
</condition>
<condition name='disabled_if_in' source='schedule_db_mode'>
<param>default</param>
<target type='variable'>schedule_dbserver</target>
<target type='variable'>schedule_dbuser</target>
<target type='variable'>schedule_dbport</target>
<target type='variable'>schedule_dbpass</target>
<target type='variable'>schedule_allow_hosts</target>
</condition>
<condition name='disabled_if_in' source='schedule_dolibarr_api'>
<param>non</param>
<target type='variable'>schedule_dolibarr_apikey</target>
<target type='variable'>schedule_dolibarr_uri</target>
</condition>
<condition name='disabled_if_in' source='schedule_sentry'>
<param>non</param>
<target type='variable'>schedule_sentry_dsn</target>
</condition>
</constraints>
<help>
<variable name='activer_schedule'>Outils de gestion de Planning</variable>
</help>
</creole>

41
docker-compose.yml Normal file
View File

@@ -0,0 +1,41 @@
services:
mariadb:
image: mariadb
container_name: schedule-mariadb
restart: unless-stopped
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: schedule
MYSQL_USER: user
MYSQL_PASSWORD: changeme
volumes:
- mariadb-data:/var/lib/mysql
adminer:
image: adminer
container_name: schedule-adminer
restart: unless-stopped
ports:
- 6081:8080
schedule:
build:
context: .
dockerfile: ./misc/docker/Dockerfile
container_name: schedule
image: reg.cadoles.com/envole/schedule
restart: unless-stopped
volumes:
- ./src:/app/src:delegated
- ./templates:/app/templates:delegated
- ./config:/app/config:delegated
- ./public/uploads:/app/public/uploads:delegated
- ./uploads:/app/uploads:delegated
- ./misc:/app/misc:delegated
ports:
- "8000:80"
volumes:
mariadb-data:

231
eole.mk
View File

@@ -1,231 +0,0 @@
#
# 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

25
misc/docker/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
ARG NODE_VERSION=20.12.2
FROM node:${NODE_VERSION}-alpine AS node
FROM reg.cadoles.com/envole/nineapache:7.4
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/zapp.conf
COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
RUN npm install -g yarn --force
RUN composer self-update --1
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
WORKDIR /app
COPY . .
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn install
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn build
RUN rm -rf node_modules
RUN composer install
CMD /app/misc/script/reconfigure.sh && /etc/apache2/apache2.sh

19
misc/docker/apache.conf Executable file
View File

@@ -0,0 +1,19 @@
LoadModule rewrite_module modules/mod_rewrite.so
ServerName nineapache.local
DocumentRoot "/app/public"
Alias /schedule /app/public
<Directory "/app/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</Directory>

28
misc/script/reconfigure.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -eo pipefail
# Se positionner sur la racine du projet
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd ${DIR}
cd ../..
DIR=$(pwd)
mkdir -p public/uploads/avatar
cp public/images/admin.jpg public/uploads/avatar/
cp public/images/system.jpg public/uploads/avatar/
cp public/images/noavatar.png public/uploads/avatar/
chown -R apache:apache public/uploads
mkdir -p uploads
chown -R apache:apache public/uploads
bin/console d:s:u --force --complete
php bin/console app:AppInit --env=prod
php bin/console app:CronInit --env=prod
php bin/console app:Script --env=prod
crond -b
echo
exec $@

View File

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

View File

@@ -1,3 +0,0 @@
#!/bin/bash
CreoleRun "/var/www/html/schedule/scripts/genkey.sh" web
exit 0

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 936 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

13
scripts/checkcomposer.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
$requiredVersion = 'version 1'; // La version interdite
$composerVersion = trim(shell_exec('COMPOSER_ALLOW_SUPERUSER=1 composer --version --no-ansi'));
echo $composerVersion."\n";
if (stripos($composerVersion,$requiredVersion)===false ) {
echo "La version de Composer $requiredVersion n'est pas autorisée" . PHP_EOL;
echo "Veuillez mettre à jour Composer avec 'composer self-update --1'." . PHP_EOL;
echo "Ou executez le scripts/reconfigure.sh" . PHP_EOL;
exit(1); // Quitte avec un code d'erreur
}

View File

@@ -6,12 +6,13 @@ cd /var/www/html/schedule
. scripts/proxy.sh
# Mise en place du fichier d'environnement model
if [ ! -f /var/www/html/schedule/.env ]; then
mv /var/www/html/schedule/scripts/.env.model /var/www/html/schedule/.env
fi
yes 2>/dev/null | cp /var/www/html/schedule/scripts/.env.model $DIR/.env
# Installation des dépendances composer
composer install
echo COMPOSER = Install
export COMPOSER_ALLOW_SUPERUSER=1
composer self-update --1 --quiet
composer install --quiet
php bin/console app:AppInit --env=prod
php bin/console app:CronInit --env=prod

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