andreybolonin
Repos
389
Followers
42

Events

Created at 2 days ago
started
Created at 1 week ago
started
Created at 1 week ago
started
Created at 1 week ago
Created at 2 weeks ago
Created at 2 weeks ago
started
Created at 2 weeks ago
started
Created at 2 weeks ago
opened issue
[Security] Customization login url for many entry points in 6.2

Description

In symfony 5.4 I use two different routes for login different roles in ma app but I am try to upgrade to 6.2 and have trouble with this feature Any ideas how to fix this?

  1. try to split login page with /admin_login and /player_login
  1. with /login already work fine:

my security.yaml

#    enable_authenticator_manager: true
    role_hierarchy:
        ROLE_SUPPORT: ROLE_USER
        ROLE_ADMIN:   ROLE_USER
    # access_denied_url: /admin_login
    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    password_hashers:
        App\Entity\User: 'auto'
        App\Entity\Contact: 'auto'
    providers:
        db_provider:
            entity:
              class: App\Entity\User
              property: username
        player_provider:
            entity:
                class: App\Entity\Contact
                property: contactId
    firewalls:
        admin:
            pattern: ^/admin
            lazy: true
            provider: db_provider
#            remember_me:
#                secret: '%kernel.secret%'
#                lifetime: 604800 # 1 week in seconds
#                path: /admin
            form_login:
                login_path: admin_login
                check_path: admin_login
            logout:
                path: /admin/logout
#                invalidate_session: true
#                target: admin_login
#            entry_point: form_login

        player:
            pattern: ^/player
            provider: player_provider
            remember_me:
                secret: '%kernel.secret%'
                lifetime: 604800 # 1 week in seconds
                path: /player
            form_login:
                login_path: player_login
                check_path: player_login
            logout:
                path: player_logout
                invalidate_session: true
                target: player_login
            entry_point: form_login

    # 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: ^/admin_login, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/player_login, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/telegram, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin, roles: [ROLE_ADMIN, ROLE_USER, ROLE_SALES, ROLE_TOP, ROLE_SPT_EU, ROLE_SPT_CN, ROLE_SPT_CN_PRO, ROLE_SPT_PRO, ROLE_CN, ROLE_OP, ROLE_BETASUB, ROLE_PLAYER, ROLE_FIN, ROLE_SPT_JUN] }
        - { path: ^/player, roles: [ROLE_PLAYER, ROLE_SUBAFF] }
`

### Example

_No response_
                                    
Created at 3 weeks ago
issue comment
Rector stoppped to parse my files

@realtebo +1

Created at 1 month ago
issue comment
Dropping schema should drop L2 caches

+1

Created at 1 month ago
started
Created at 1 month ago
Created at 1 month ago
pull request opened
Allow Symfony 5 and 6
Created at 1 month ago

Replace RouterListener with RouterListener

Do not update route documents but set router context instead

Fix locale listener

Fix RouterListener locale handling

Merge pull request #5 from M4nu/router-listener

Router listener

Fix host locale uri matching

Merge pull request #6 from M4nu/host-locale-match

Fix host locale uri matching

Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
pull request opened
Update expressions.rst

Add complex example is_granted and/or is_granted

Created at 1 month ago

Update expressions.rst

add complex is_granted and is_granted example

Created at 1 month ago
opened issue
Up from 5.4 to 6.2

Description

I searched many links and PRs, but I dont understan how to replace on Symfony 6.2:

#[Security("is_granted('ROLE_ADMIN') or is_granted('ROLE_MANAGER')")]

On Symfony 6.2 sensio/framework-extra-bundle is abandoned.

Thx

Example

No response

Created at 2 months ago
Created at 2 months ago

fix generated path and filename (#50)

  • fix generated path and filename

  • fix extends

Support for Entities with constructor parameters (#44)

  • Update FixtureGenerator.php

This will allow to crate fixtures for classes, that expects constructor parameters e.g. FOS\UserBundle\Model\Group

  • Update FixtureGenerator.php

refactor of new instance creation and constructor params getter

  • Update FixtureGenerator.php

revert back my formatting settings

  • Update FixtureGenerator.php

fix bad Reflection type to ReflectionClass

  • Update FixtureGenerator.php

Update write method

Update .travis.yml (#52)

Fixed issue when entity does not have constructor (#54)

Fixes Symfony 4 compatibility. (#59)

  • Load bundle configuration in build method, fixes #55

  • This closes issue Webonaute/DoctrineFixturesGeneratorBundle#58 (Unknown Entity namespace alias 'App')

  • fix (command): delete the old unnecessary line

Created at 2 months ago