Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security][listener] change priority of switchuser #12313

Merged
merged 1 commit into from Oct 24, 2014

Conversation

aitboudad
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Hi,
I have the following users:

  • Manager: Allowed to access to (/admin) and has a role ROLE_ALLOWED_TO_SWITCH
  • Partner: Allowed to access to (/partner)

When I attempt to switch to partner user I get "Access denied", well I think the switchuser listener must be registred before access listener.

@stof
Copy link
Member

stof commented Oct 24, 2014

IMO, this makes sense. Switching to a different user should indeed be done before validating the access with the current user.

@aitboudad can you fix the tests ? The fact that the order of listeners is not the same anymore is making them fail

@aitboudad
Copy link
Contributor Author

@stof done

@stof
Copy link
Member

stof commented Oct 24, 2014

👍

1 similar comment
@Tobion
Copy link
Member

Tobion commented Oct 24, 2014

👍

@fabpot
Copy link
Member

fabpot commented Oct 24, 2014

Thank you @aitboudad.

@fabpot fabpot merged commit 5f8047d into symfony:2.3 Oct 24, 2014
fabpot added a commit that referenced this pull request Oct 24, 2014
…dad)

This PR was merged into the 2.3 branch.

Discussion
----------

[Security][listener] change priority of switchuser

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Hi,
I have the following users:
  - Manager: Allowed to access to (/admin) and has a role ROLE_ALLOWED_TO_SWITCH
  - Partner: Allowed to access to (/partner)

When I attempt to switch to partner user I get "Access denied", well I think the switchuser listener must be registred before access listener.

Commits
-------

5f8047d [Security][listener] change priority of switchuser
@aitboudad aitboudad deleted the patch-1 branch October 24, 2014 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants