-
Notifications
You must be signed in to change notification settings - Fork 75
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
introduce CacheableVoterInterface to reduce amounts of calls #228
Conversation
Looks like the integration tests really don't like it and seem to be stuck in an endless loop. |
I added code like that to more than a dozen Voters across multiple projects 🤷 Can you restart them and if that doesn't help: how can I run them locally? |
Restarted, but it looks stuck again. You can run the integration tests locally from the |
Ups, missed the app directory, thanks. Will test and report back! |
Okay, the test showed thar the Voter receives a Request object during login as type and therefor it was stuck in a loop. I am not familiar enough with the internals of the security system, so I don't know if any other type might be valid as well, such as the User or Token. Is it safe to only accept Should make no big difference performance wise, as attributes are checked first anyway: What do you say? |
The |
Agree 👍 changed. Thanks for you input. |
Nice! Would you please rebase onto to target branch. I just solved these coding standards errors. So we should get a proper result for your PR then. |
done |
Thank you for contributing! 🙇 Released as v7.3.0. |
Closes #227
Description
See #227 as well.
Adds the
Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface
which dramatically reduces the amount of calls to the 2FA specific Voter.