parameters:
    pim_user.controller.user_rest.class: Akeneo\UserManagement\Bundle\Controller\Rest\UserController
    pim_user.controller.security_rest.class: Akeneo\UserManagement\Bundle\Controller\Rest\SecurityController
    pim_user.controller.user_group_rest.class: Akeneo\UserManagement\Bundle\Controller\Rest\UserGroupController

services:
    pim_user.controller.user_rest:
        public: true
        class: '%pim_user.controller.user_rest.class%'
        arguments:
            - '@security.token_storage'
            - '@pim_internal_api_serializer'
            - '@pim_user.repository.user'
            - '@pim_user.updater.user'
            - '@validator'
            - '@pim_user.saver.user'
            - '@pim_enrich.normalizer.violation'
            - '@pim_user.factory.user'
            - '@security.password_encoder'
            - '@event_dispatcher'
            - '@session'
            - '@doctrine.orm.entity_manager'
            - '@pim_user.remover.user'
            - '@pim_catalog.localization.factory.number'
            - '@translator'
            - '@oro_security.security_facade'

    pim_user.controller.security_rest:
        public: true
        class: '%pim_user.controller.security_rest.class%'
        arguments:
            - '@oro_security.security_facade'
            - '@oro_security.acl.annotation_provider'

    pim_user.controller.user_group_rest:
        public: true
        class: '%pim_user.controller.user_group_rest.class%'
        arguments:
            - '@pim_user.repository.group'

    pim_user.controller.user_role_rest:
        public: true
        class: 'Akeneo\UserManagement\Bundle\Controller\Rest\UserRoleController'
        arguments:
            - '@pim_user.repository.role'
            - '@serializer'
            - '@pim_user.context.user'

    pim_user.controller.user_group:
        public: true
        class: 'Akeneo\UserManagement\Bundle\Controller\GroupController'
        arguments:
            - '@doctrine.orm.entity_manager'
            - '@pim_user.remover.user_group'
            - '@pim_user.form.handler.group'
            - '@translator'
            - '@pim_user.form.group'
            - '@event_dispatcher'
            - '@session'
        calls:
            - [ 'setContainer', [ '@service_container' ] ]

    pim_user.controller.reset:
        public: true
        class: 'Akeneo\UserManagement\Bundle\Controller\ResetController'
        arguments:
            - '@pim_user.manager'
            - '@mailer'
            - '@session'
            - '@pim_user.form.handler.reset'
            - '@security.token_storage'
            - '@pim_user.form.reset'
            - '%mailer_url%'
        calls:
            - [ 'setContainer', [ '@service_container' ] ]

    pim_user.controller.role:
        public: true
        class: 'Akeneo\UserManagement\Bundle\Controller\RoleController'
        arguments:
            - '@pim_user.repository.role'
            - '@pim_user.remover.role'
            - '@oro_security.acl.sid_manager'
            - '@pim_user.form.handler.acl_role'
            - '@translator'
        calls:
            - [ 'setContainer', [ '@service_container' ] ]

    pim_user.controller.security:
        public: true
        class: 'Akeneo\UserManagement\Bundle\Controller\SecurityController'
        arguments:
            - '@security.authentication_utils'
            - '@security.csrf.token_manager'
            - '@security.logout_url_generator'
            - '%pim_user.login_form.action_route%'
            - '%pim_user.login_form.additional_hidden_fields%'

    Akeneo\UserManagement\Bundle\Controller\Rest\FindAllProfilesController:
        public: true
        class: Akeneo\UserManagement\Bundle\Controller\Rest\FindAllProfilesController
        arguments:
            - '@pim_user.repository.profile'
