From 31f954169a7aa449de39315752af60f9f4ed55e3 Mon Sep 17 00:00:00 2001 From: yena Date: Fri, 11 Oct 2024 17:30:59 +0200 Subject: [PATCH] fix intendation --- config/packages/security.yaml | 78 +++++++++-------------- config/services.yaml | 116 +++++++++++++--------------------- 2 files changed, 75 insertions(+), 119 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index f81af8ef..e343bd47 100755 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -161,50 +161,34 @@ security: # 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: '^/$', roles: PUBLIC_ACCESS } - - { path: '^/init', roles: PUBLIC_ACCESS } - - { path: '^/login', roles: PUBLIC_ACCESS } - - { path: '^/recovery', roles: PUBLIC_ACCESS } - - { path: '^/register', roles: PUBLIC_ACCESS } - - { path: '^/logout', roles: PUBLIC_ACCESS } - - { path: '^/2fa', roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } - - { path: '^/start', roles: ROLE_USER } - - { - path: '^/voucher', - roles: ROLE_USER, - allow_if: "!is_granted('ROLE_SUSPICIOUS')", - } - - { - path: '^/alias', - roles: ROLE_USER, - allow_if: "!is_granted('ROLE_SPAM')", - } - - { - path: '^/account', - roles: ROLE_USER, - allow_if: "!is_granted('ROLE_SPAM')", - } - - { - path: '^/openpgp', - roles: ROLE_USER, - allow_if: "!is_granted('ROLE_SPAM')", - } - - { path: '^/admin', roles: ROLE_DOMAIN_ADMIN } - - { - path: '^/api/keycloak', - ips: '%env(KEYCLOAK_API_IP_ALLOWLIST)%', - allow_if: "'%env(KEYCLOAK_API_ENABLED)%' == 'true' and is_granted('ROLE_KEYCLOAK')", - } - - { path: '^/api/keycloak', roles: ROLE_NO_ACCESS } - - { - path: '^/api/roundcube', - ips: '%env(ROUNDCUBE_API_IP_ALLOWLIST)%', - allow_if: "'%env(ROUNDCUBE_API_ENABLED)%' == 'true' and is_granted('ROLE_USER')", - } - - { path: '^/api/roundcube', roles: ROLE_NO_ACCESS } - - { - path: '^/api/dovecot', - ips: '%env(DOVECOT_API_IP_ALLOWLIST)%', - allow_if: "'%env(DOVECOT_API_ENABLED)%' == 'true' and is_granted('ROLE_DOVECOT')", - } - - { path: '^/api/dovecot', roles: ROLE_NO_ACCESS } + - { path: "^/$", roles: PUBLIC_ACCESS } + - { path: "^/init", roles: PUBLIC_ACCESS } + - { path: "^/login", roles: PUBLIC_ACCESS } + - { path: "^/recovery", roles: PUBLIC_ACCESS } + - { path: "^/register", roles: PUBLIC_ACCESS } + - { path: "^/logout", roles: PUBLIC_ACCESS } + - { path: "^/2fa", roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } + - { path: "^/start", roles: ROLE_USER } + - { path: "^/voucher", roles: ROLE_USER, allow_if: "!is_granted('ROLE_SUSPICIOUS')" } + - { path: "^/alias", roles: ROLE_USER, allow_if: "!is_granted('ROLE_SPAM')" } + - { path: "^/account", roles: ROLE_USER, allow_if: "!is_granted('ROLE_SPAM')" } + - { path: "^/openpgp", roles: ROLE_USER, allow_if: "!is_granted('ROLE_SPAM')" } + - { path: "^/admin", roles: ROLE_DOMAIN_ADMIN } + - { + path: "^/api/keycloak", + ips: "%env(KEYCLOAK_API_IP_ALLOWLIST)%", + allow_if: "'%env(KEYCLOAK_API_ENABLED)%' == 'true' and is_granted('ROLE_KEYCLOAK')", + } + - { path: "^/api/keycloak", roles: ROLE_NO_ACCESS } + - { + path: "^/api/roundcube", + ips: "%env(ROUNDCUBE_API_IP_ALLOWLIST)%", + allow_if: "'%env(ROUNDCUBE_API_ENABLED)%' == 'true' and is_granted('ROLE_USER')", + } + - { path: "^/api/roundcube", roles: ROLE_NO_ACCESS } + - { + path: "^/api/dovecot", + ips: "%env(DOVECOT_API_IP_ALLOWLIST)%", + allow_if: "'%env(DOVECOT_API_ENABLED)%' == 'true' and is_granted('ROLE_DOVECOT')", + } + - { path: "^/api/dovecot", roles: ROLE_NO_ACCESS } diff --git a/config/services.yaml b/config/services.yaml index 9f84b7eb..9222ca02 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -8,13 +8,15 @@ parameters: locales: 'en|de|es|fr|it|pt|nb|gsw' supported_locales: ['en', 'de', 'es', 'fr', 'it', 'pt', 'nb', 'gsw'] navbar_left: - - name: 'navbar_left.about-us.text' - url: 'navbar_left.about-us.link' + - + name: 'navbar_left.about-us.text' + url: 'navbar_left.about-us.link' + services: # default configuration for services in *this* file _defaults: - autowire: true # Automatically injects dependencies in your services. + autowire: true # Automatically injects dependencies in your services. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. # makes classes in src/ available to be used as services @@ -37,45 +39,45 @@ services: App\Builder\AliasCreatedMessageBuilder: arguments: - $appUrl: '%env(APP_URL)%' - $projectName: '%env(PROJECT_NAME)%' + $appUrl: "%env(APP_URL)%" + $projectName: "%env(PROJECT_NAME)%" App\Builder\RecoveryProcessMessageBuilder: arguments: - $appUrl: '%env(APP_URL)%' - $projectName: '%env(PROJECT_NAME)%' + $appUrl: "%env(APP_URL)%" + $projectName: "%env(PROJECT_NAME)%" App\Builder\WelcomeMessageBuilder: arguments: - $appUrl: '%env(APP_URL)%' - $projectName: '%env(PROJECT_NAME)%' + $appUrl: "%env(APP_URL)%" + $projectName: "%env(PROJECT_NAME)%" App\Command\UsersCheckPasswordCommand: arguments: - $mailCrypt: '%env(MAIL_CRYPT)%' - $mailLocation: '%env(DOVECOT_MAIL_LOCATION)%' - $mailUid: '%env(DOVECOT_MAIL_UID)%' - $mailGid: '%env(DOVECOT_MAIL_GID)%' + $mailCrypt: "%env(MAIL_CRYPT)%" + $mailLocation: "%env(DOVECOT_MAIL_LOCATION)%" + $mailUid: "%env(DOVECOT_MAIL_UID)%" + $mailGid: "%env(DOVECOT_MAIL_GID)%" App\Command\UsersMailCryptCommand: arguments: - $mailCrypt: '%env(MAIL_CRYPT)%' + $mailCrypt: "%env(MAIL_CRYPT)%" App\Command\UsersRegistrationMailCommand: arguments: - $defaultLocale: '%kernel.default_locale%' + $defaultLocale: "%kernel.default_locale%" App\Command\UsersRemoveCommand: arguments: - $mailLocation: '%env(DOVECOT_MAIL_LOCATION)%' + $mailLocation: "%env(DOVECOT_MAIL_LOCATION)%" App\Command\UsersResetCommand: arguments: - $mailLocation: '%env(DOVECOT_MAIL_LOCATION)%' + $mailLocation: "%env(DOVECOT_MAIL_LOCATION)%" App\Command\VoucherCreateCommand: arguments: - $appUrl: '%env(APP_URL)%' + $appUrl: "%env(APP_URL)%" App\EventListener\: resource: '../src/EventListener/*' @@ -84,8 +86,8 @@ services: App\EventListener\LocaleListener: arguments: - $defaultLocale: '%locale%' - $supportedLocales: '%supported_locales%' + $defaultLocale: "%locale%" + $supportedLocales: "%supported_locales%" App\Handler\: resource: '../src/Handler/*' @@ -109,22 +111,22 @@ services: App\Handler\MailHandler: arguments: - $from: '%env(SENDER_ADDRESS)%' - $name: '%env(APP_NAME)%' + $from: "%env(SENDER_ADDRESS)%" + $name: "%env(APP_NAME)%" App\Handler\UserRegistrationInfoHandler: arguments: - $to: '%env(NOTIFICATION_ADDRESS)%' + $to: "%env(NOTIFICATION_ADDRESS)%" App\Handler\RegistrationHandler: public: true arguments: - $registrationOpen: '%env(REGISTRATION_OPEN)%' + $registrationOpen: "%env(REGISTRATION_OPEN)%" $mailCrypt: '%env(MAIL_CRYPT)%' App\Handler\SuspiciousChildrenHandler: arguments: - $to: '%env(NOTIFICATION_ADDRESS)%' + $to: "%env(NOTIFICATION_ADDRESS)%" App\Handler\UserAuthenticationHandler: arguments: @@ -132,26 +134,26 @@ services: App\Handler\WkdHandler: arguments: - $wkdDirectory: '%env(WKD_DIRECTORY)%' - $wkdFormat: '%env(WKD_FORMAT)%' + $wkdDirectory: "%env(WKD_DIRECTORY)%" + $wkdFormat: "%env(WKD_FORMAT)%" App\Helper\PasswordUpdater: public: true App\EventListener\AliasCreationListener: arguments: - $sendMail: '%env(SEND_MAIL)%' - $defaultLocale: '%kernel.default_locale%' + $sendMail: "%env(SEND_MAIL)%" + $defaultLocale: "%kernel.default_locale%" App\EventListener\RecoveryProcessListener: arguments: - $sendMail: '%env(SEND_MAIL)%' - $defaultLocale: '%kernel.default_locale%' + $sendMail: "%env(SEND_MAIL)%" + $defaultLocale: "%kernel.default_locale%" App\EventListener\RegistrationListener: arguments: - $sendMail: '%env(SEND_MAIL)%' - $defaultLocale: '%kernel.default_locale%' + $sendMail: "%env(SEND_MAIL)%" + $defaultLocale: "%kernel.default_locale%" App\Builder\MenuBuilder: arguments: @@ -164,11 +166,11 @@ services: App\Security\KeycloakAccessTokenHandler: arguments: - $keycloakApiAccessToken: '%env(KEYCLOAK_API_ACCESS_TOKEN)%' + $keycloakApiAccessToken: "%env(KEYCLOAK_API_ACCESS_TOKEN)%" App\Security\DovecotAccessTokenHandler: arguments: - $dovecotApiAccessToken: '%env(DOVECOT_API_ACCESS_TOKEN)%' + $dovecotApiAccessToken: "%env(DOVECOT_API_ACCESS_TOKEN)%" App\Sender\WelcomeMessageSender: public: true @@ -185,12 +187,7 @@ services: class: App\Admin\UserAdmin public: true tags: - - { - name: sonata.admin, - manager_type: orm, - group: 'Mail', - label: 'User', - } + - { name: sonata.admin, manager_type: orm, group: "Mail", label: "User" } arguments: - ~ - App\Entity\User @@ -199,41 +196,26 @@ services: - [setPasswordUpdater, ['@App\Helper\PasswordUpdater']] - [setDomainGuesser, ['@App\Guesser\DomainGuesser']] - [setMailCryptKeyHandler, ['@App\Handler\MailCryptKeyHandler']] - - [setMailCryptVar, ['%env(MAIL_CRYPT)%']] + - [setMailCryptVar, ["%env(MAIL_CRYPT)%"]] userli.admin.domain: class: App\Admin\DomainAdmin public: true tags: - - { - name: sonata.admin, - manager_type: orm, - group: 'Mail', - label: 'Domain', - } + - { name: sonata.admin, manager_type: orm, group: "Mail", label: "Domain" } arguments: - ~ - App\Entity\Domain - ~ calls: - [setDomainCreator, ['@App\Creator\DomainCreator']] - - [ - setEventDispatcher, - [ - '@Symfony\Contracts\EventDispatcher\EventDispatcherInterface', - ], - ] + - [setEventDispatcher, ['@Symfony\Contracts\EventDispatcher\EventDispatcherInterface']] userli.admin.alias: class: App\Admin\AliasAdmin public: true tags: - - { - name: sonata.admin, - manager_type: orm, - group: 'Mail', - label: 'Alias', - } + - { name: sonata.admin, manager_type: orm, group: "Mail", label: "Alias" } arguments: - ~ - App\Entity\Alias @@ -245,12 +227,7 @@ services: class: App\Admin\VoucherAdmin public: true tags: - - { - name: sonata.admin, - manager_type: orm, - group: 'Mail', - label: 'Voucher', - } + - { name: sonata.admin, manager_type: orm, group: "Mail", label: "Voucher" } arguments: - ~ - App\Entity\Voucher @@ -269,12 +246,7 @@ services: class: App\Admin\ReservedNameAdmin public: true tags: - - { - name: sonata.admin, - manager_type: orm, - group: 'Mail', - label: 'Reserved Name', - } + - { name: sonata.admin, manager_type: orm, group: "Mail", label: "Reserved Name" } arguments: - ~ - App\Entity\ReservedName