Compare commits

..

4 Commits

24 changed files with 206 additions and 142 deletions

View File

@@ -15,7 +15,7 @@
},
"require": {
"ext-redis": "*",
"chill-project/chill-bundles": "dev-upgrade-sf5@dev",
"chill-project/chill-bundles": "dev-ticket-app-master@dev",
"symfony/flex": "^1.9",
"nelmio/alice": "^3.8",
"phpoffice/phpword": "^0.18.2",

View File

@@ -36,4 +36,5 @@ return [
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Chill\EventBundle\ChillEventBundle::class => ['all' => true],
Chill\TicketBundle\ChillTicketBundle::class => ['all' => true],
];

View File

@@ -1,14 +0,0 @@
framework:
cache:
default_redis_provider: '%env(resolve:REDIS_URL)%'
pools:
cache.user_data:
adapter: cache.adapter.redis
public: true
default_lifetime: 300 # 5 minutes
# will be used in chill_main.tag_aware_cache service
cache.tags:
adapter: cache.adapter.redis
public: false
default_lifetime: 300

View File

@@ -27,12 +27,6 @@ chill_main:
y: '%env(float:ADD_ADDRESS_MAP_CENTER_Y)%'
z: '%env(float:ADD_ADDRESS_MAP_CENTER_Z)%'
when@test:
chill_main:
available_languages:
- 'fr'
- 'en'
chill_custom_fields:
show_empty_values_in_views: false

View File

@@ -0,0 +1,88 @@
chill_main:
cruds:
-
class: 'App\Entity\VendeePerson'
controller: 'App\Controller\VendeePersonController'
name: vendeeperson
base_path: /vendee/vendeeperson
actions:
infosociopro_edit:
controller_action: 'infosocioproEdit'
path: '/{id}/infosociopro/edit'
role: CHILL_PERSON_EDIT
infosociopro_view:
controller_action: 'infosocioproView'
path: '/{id}/infosociopro/view'
role: CHILL_PERSON_VIEW
entourage_edit:
controller_action: 'entourageEdit'
path: '/{id}/entourage/edit'
role: CHILL_PERSON_EDIT
entourage_view:
controller_action: 'entourageView'
path: '/{id}/entourage/view'
role: CHILL_PERSON_VIEW
infomedicale_edit:
controller_action: 'infomedicaleEdit'
path: '/{id}/infomedicale/edit'
role: CHILL_PERSON_EDIT
infomedicale_view:
controller_action: 'infomedicaleView'
path: '/{id}/infomedicale/view'
role: CHILL_PERSON_VIEW
infologement_edit:
controller_action: 'infologementEdit'
path: '/{id}/infologement/edit'
role: CHILL_PERSON_EDIT
infologement_view:
controller_action: 'infologementView'
path: '/{id}/infologement/view'
role: CHILL_PERSON_VIEW
-
class: 'App\Entity\VendeePersonMineur'
controller: 'App\Controller\VendeePersonMineurController'
name: vendeepersonmineur
base_path: /vendee/vendeepersonmineur
actions:
infofamille_edit:
controller_action: 'infofamilleEdit'
path: '/{id}/infofamille/edit'
role: CHILL_PERSON_EDIT
infofamille_view:
controller_action: 'infofamilleView'
path: '/{id}/infofamille/view'
role: CHILL_PERSON_VIEW
scolarite_edit:
controller_action: 'scolariteEdit'
path: '/{id}/scolarite/edit'
role: CHILL_PERSON_EDIT
scolarite_view:
controller_action: 'scolariteView'
path: '/{id}/scolarite/view'
role: CHILL_PERSON_VIEW
infomedicale_edit:
controller_action: 'infomedicaleEdit'
path: '/{id}/infomedicale/edit'
role: CHILL_PERSON_EDIT
infomedicale_view:
controller_action: 'infomedicaleView'
path: '/{id}/infomedicale/view'
role: CHILL_PERSON_VIEW
-
class: 'App\Entity\Security\Profile'
name: vendee_security_profile
base_path: '/admin/vendee/security/profile'
base_role: ROLE_ADMIN
form_class: 'App\Form\Security\ProfileType'
controller: 'App\Controller\SecurityProfileController'
actions:
index:
template: '/Security/Profile/index.html.twig'
role: ROLE_ADMIN
new:
role: ROLE_ADMIN
template: '/Security/Profile/new.html.twig'
edit:
role: ROLE_ADMIN
template: '/Security/Profile/edit.html.twig'

View File

@@ -0,0 +1,3 @@
twig:
globals:
responsive_debug: false

View File

@@ -2,9 +2,26 @@ doctrine_migrations:
migrations_paths:
# migrations for custom modules
'Application\Migrations': '%kernel.project_dir%/migrations'
# migrations for default chill modules
'Chill\Migrations\Main': '@ChillMainBundle/migrations'
'Chill\Migrations\Activity': '@ChillActivityBundle/migrations'
'Chill\Migrations\DocStore': '@ChillDocStoreBundle/migrations'
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
'Chill\Migrations\Ticket': '@ChillTicketBundle/migrations'
all_or_nothing:
true
services:
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'
storage:
table_storage:
table_name: 'migration_versions'

View File

@@ -1,20 +0,0 @@
doctrine_migrations:
migrations_paths:
# migrations for default chill modules
'Chill\Migrations\Main': '@ChillMainBundle/migrations'
'Chill\Migrations\Activity': '@ChillActivityBundle/migrations'
'Chill\Migrations\DocStore': '@ChillDocStoreBundle/migrations'
'Chill\Migrations\CustomFields': '@ChillCustomFieldsBundle/migrations'
'Chill\Migrations\Event': '@ChillEventBundle/migrations'
'Chill\Migrations\Person': '@ChillPersonBundle/migrations'
'Chill\Migrations\Task': '@ChillTaskBundle/migrations'
'Chill\Migrations\ThirdParty': '@ChillThirdPartyBundle/migrations'
'Chill\Migrations\DocGenerator': '@ChillDocGeneratorBundle/migrations'
'Chill\Migrations\AsideActivity': '@ChillAsideActivityBundle/migrations'
'Chill\Migrations\Calendar': '@ChillCalendarBundle/migrations'
'Chill\Migrations\Budget': '@ChillBudgetBundle/migrations'
all_or_nothing:
true
services:
'Doctrine\Migrations\Version\Comparator': 'Chill\MainBundle\Doctrine\Migrations\VersionComparator'

View File

@@ -7,6 +7,8 @@ framework:
verify_peer: false
verify_host: false
# DIRTY FIX un bug dans symfony4 empêche de récupérer un tableau de variables depuis .env
# cfr. https://github.com/symfony/symfony/issues/28599
trusted_hosts:
- '^(localhost|127.0.0.1|web)$'
- '%env(resolve:TRUSTED_HOSTS)%'
@@ -29,6 +31,10 @@ framework:
#error_controller: App\Controller\ErrorController::show
## sf4 check: ou à déplacer dans un chill.yaml
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
when@test:
framework:
test: true

View File

@@ -1,3 +0,0 @@
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'

View File

@@ -1,4 +0,0 @@
framework:
mailer:
envelope:
sender: '%env(NOTIFICATION_FROM_EMAIL)%'

View File

@@ -17,3 +17,11 @@ framework:
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarMessage': async
'Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage': async
'Chill\CalendarBundle\Messenger\Message\MSGraphChangeNotificationMessage': async
'Chill\MainBundle\Service\ShortMessage\ShortMessage': async
'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority

View File

@@ -1,13 +0,0 @@
framework:
messenger:
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRangeMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage': async
'Chill\CalendarBundle\Messenger\Message\CalendarMessage': async
'Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage': async
'Chill\CalendarBundle\Messenger\Message\MSGraphChangeNotificationMessage': async
'Chill\MainBundle\Service\ShortMessage\ShortMessage': async
'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority

View File

@@ -1,4 +1,9 @@
security:
access_decision_manager:
strategy: unanimous
allow_if_all_abstain: false
enable_authenticator_manager: true
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
password_hashers:
@@ -7,24 +12,66 @@ security:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers:
# providers added by chill-bundles recipes
# those providers are required to make chill working
chill_chain_provider:
chain:
providers: [chill_in_memory, chill_users]
chill_in_memory:
chain_provider:
chain :
providers: [in_memory, users]
in_memory:
memory:
users:
admin: { password: '%env(resolve:ADMIN_PASSWORD)%', roles: ['ROLE_ADMIN', 'ROLE_ALLOWED_TO_SWITCH', 'ROLE_USER'] }
chill_users:
users:
id: chill.main.user_provider
# end of providers added by chill-bundles recipes
# all other providers might be removed, unless you have specific needs
# TODO AFTER CHILL-BUNDLES RECIPES INSTALL: remove the user providers which are not used
encoders:
Chill\MainBundle\Entity\User: auto
Symfony\Component\Security\Core\User\User: plaintext
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
wopi:
pattern: ^/wopi
provider: chain_provider
stateless: true
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
main:
# remove during upgrade from symfony 4 to symfony 5 TODO check this
#anonymous: ~
provider: chain_provider
form_login:
csrf_parameter: _csrf_token
csrf_token_id: authenticate
#csrf_provider: security.csrf.token_manager
# remove during upgrade from symfony 4 to symfony 5 TODO check this
# logout_on_user_change: true
logout:
path: /logout
# uncomment to enable impersonate mode in Chill
# https://symfony.com/doc/current/security/impersonating_user.html
switch_user: true
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/saml/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/saml/metadata, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY }
# access for homepage, the homepage redirect admin to admin section
- { path: ^/$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
- { path: ^/homepage$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
# idem
- { path: ^/([a-z]+/)?homepage, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
# admin section, only for admin
- { path: ^/([a-z]+/)?admin, roles: ROLE_ADMIN }
# other pages, only for regular user (no admin)
- { path: ^/, roles: ROLE_USER }
when@test:
security:

View File

@@ -1,50 +0,0 @@
security:
access_decision_manager:
strategy: unanimous
allow_if_all_abstain: false
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
wopi:
pattern: ^/wopi
provider: chill_chain_provider
stateless: true
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
chill_main:
# remove during upgrade from symfony 4 to symfony 5 TODO check this
#anonymous: ~
provider: chill_chain_provider
form_login:
csrf_parameter: _csrf_token
csrf_token_id: authenticate
#csrf_provider: security.csrf.token_manager
# remove during upgrade from symfony 4 to symfony 5 TODO check this
# logout_on_user_change: true
logout:
path: /logout
# uncomment to enable impersonate mode in Chill
# https://symfony.com/doc/current/security/impersonating_user.html
switch_user: true
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY }
# access for homepage, the homepage redirect admin to admin section
- { path: ^/$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
- { path: ^/homepage$, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
# idem
- { path: ^/([a-z]+/)?homepage, roles: [ IS_AUTHENTICATED_REMEMBERED ] }
# admin section, only for admin
- { path: ^/([a-z]+/)?admin, roles: ROLE_ADMIN }
# other pages, only for regular user (no admin)
- { path: ^/, roles: ROLE_USER }

View File

@@ -0,0 +1,5 @@
---
chill_main:
available_languages:
- 'fr'
- 'en'

View File

@@ -1,5 +1,8 @@
---
# config/packages/test/security.yaml
security:
firewalls:
default:
http_basic: ~
role_hierarchy:
CHILL_MASTER_ROLE: [CHILL_INHERITED_ROLE_1]

View File

@@ -1,5 +1,18 @@
twig:
default_path: '%kernel.project_dir%/templates'
## In Symfony 5, bootstrap_5 theme is supported. But not yet in sf4 !!
# see sf5 https://symfony.com/doc/current/form/form_themes.html
# see sf4 https://symfony.com/doc/4.4/form/form_themes.html
#
# While waiting for the upgrade, we get the form theme file
# (https://github.com/symfony/symfony/tree/5.4/src/Symfony/Bridge/Twig/Resources/views/Form),
# put it in ChillMainBundle/Resources/views/Form/bootstrap5/
# and adapt it lightly.
#
form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig']
#form_themes: ['bootstrap_5_horizontal_layout.html.twig']
when@test:
twig:
strict_variables: true

View File

@@ -1,16 +0,0 @@
twig:
## In Symfony 5, bootstrap_5 theme is supported. But not yet in sf4 !!
# see sf5 https://symfony.com/doc/current/form/form_themes.html
# see sf4 https://symfony.com/doc/4.4/form/form_themes.html
#
# While waiting for the upgrade, we get the form theme file
# (https://github.com/symfony/symfony/tree/5.4/src/Symfony/Bridge/Twig/Resources/views/Form),
# put it in ChillMainBundle/Resources/views/Form/bootstrap5/
# and adapt it lightly.
#
form_themes: ['@ChillMain/Form/bootstrap5/bootstrap_5_horizontal_layout.html.twig']
when@dev:
twig:
globals:
responsive_debug: false

View File

@@ -11,9 +11,6 @@ framework:
fr: 'Suivi'
support_strategy: Chill\MainBundle\Workflow\RelatedEntityWorkflowSupportsStrategy
initial_marking: 'initial'
marking_store:
property: step
type: method
places:
initial:
metadata:

View File

@@ -0,0 +1,3 @@
chill_ticket_app:
resource: '@ChillTicketBundle/Controller/'
type: annotation

View File

@@ -41,7 +41,6 @@ if [ "${APP_ENV}" = "prod" ]; then
php /var/www/app/bin/console doctrine:migrations:status
php /var/www/app/bin/console doctrine:migrations:migrate -n
php /var/www/app/bin/console messenger:setup-transports
php /var/www/app/bin/console chill:db:sync-views
fi
fi

View File

@@ -7,7 +7,7 @@
"bootstrap": "5.2.3"
},
"scripts": {
"specs-build": "yaml-merge vendor/chill-project/chill-bundles/src/Bundle/ChillMainBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillPersonBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillCalendarBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml> templates/api/specs.yaml",
"specs-build": "yaml-merge vendor/chill-project/chill-bundles/src/Bundle/ChillMainBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillPersonBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillCalendarBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillDocStoreBundle/chill.api.specs.yaml vendor/chill-project/chill-bundles/src/Bundle/ChillTicketBundle/chill.api.specs.yaml> templates/api/specs.yaml",
"specs-validate": "swagger-cli validate templates/api/specs.yaml",
"specs": "yarn run specs-build && yarn run specs-validate"
}