Skip to content

Commit

Permalink
fix intendation
Browse files Browse the repository at this point in the history
  • Loading branch information
y3n4 committed Oct 11, 2024
1 parent a15dfb3 commit 31f9541
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 119 deletions.
78 changes: 31 additions & 47 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
116 changes: 44 additions & 72 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/*'
Expand All @@ -84,8 +86,8 @@ services:

App\EventListener\LocaleListener:
arguments:
$defaultLocale: '%locale%'
$supportedLocales: '%supported_locales%'
$defaultLocale: "%locale%"
$supportedLocales: "%supported_locales%"

App\Handler\:
resource: '../src/Handler/*'
Expand All @@ -109,49 +111,49 @@ 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:
$passwordHasherFactory: '@security.password_hasher_factory'

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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 31f9541

Please sign in to comment.