diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2014-12-12 17:23:01 +0100 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2014-12-12 17:23:01 +0100 |
commit | a4210450cdb42fecab92ebaf933a3e2bf1cb699b (patch) | |
tree | bcd1e21030fadd7c74e976ef5c5ecac37235bd04 | |
parent | 84d8e737d03979475eacb87a1239170fc6eab50e (diff) | |
parent | 89deef8fb9e2d53ca9cc6cdef277052db4c9587d (diff) | |
download | symfony-security-a4210450cdb42fecab92ebaf933a3e2bf1cb699b.zip symfony-security-a4210450cdb42fecab92ebaf933a3e2bf1cb699b.tar.gz symfony-security-a4210450cdb42fecab92ebaf933a3e2bf1cb699b.tar.bz2 |
Merge branch '2.6' into 2.7
* 2.6: (24 commits)
[Form] fixed a maxlength overring on a guessing
[Debug] Show only unique class candidates
[SecurityBundle] Firewall providers building - code cleaning
[Filesystem] symlink use RealPath instead LinkTarget
[DependencyInjection] Remove duplicate declaration in PhpDumper
terminals are not interactive on Travis
Revert "[DependencyInjection] backport perf optim"
[WebProfiler] Tweaked ajax requests toolbar css reset
[WebProfilerBundle] replaced pattern to path attribute in routes definitions.
fix phpdoc's alignment
Fix missing addExpressionLanguageProvider (used by service container to add expression providers)
Fixed the AuthenticationProviderInterface alignment
Fixed the proxy-manager version constraint
Fix missing space in label_attr
fix DumpDataCollectorTest after CS changes
avoid risky tests
Fixed typo in SecurityContext PHPDoc
[FrameworkBundle][Template name] avoid error message for the shortcut notation.
[DependencyInjection] perf optim: call dirname() at most 5x
[DependencyInjection] backport perf optim
...
-rw-r--r-- | Core/Authentication/Provider/AuthenticationProviderInterface.php | 16 | ||||
-rw-r--r-- | Core/Authorization/Voter/ExpressionVoter.php | 6 | ||||
-rw-r--r-- | Core/SecurityContext.php | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/Core/Authentication/Provider/AuthenticationProviderInterface.php b/Core/Authentication/Provider/AuthenticationProviderInterface.php index 8007234..adad258 100644 --- a/Core/Authentication/Provider/AuthenticationProviderInterface.php +++ b/Core/Authentication/Provider/AuthenticationProviderInterface.php @@ -24,12 +24,12 @@ use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterfac */ interface AuthenticationProviderInterface extends AuthenticationManagerInterface { - /** - * Checks whether this provider supports the given token. - * - * @param TokenInterface $token A TokenInterface instance - * - * @return bool true if the implementation supports the Token, false otherwise - */ - public function supports(TokenInterface $token); + /** + * Checks whether this provider supports the given token. + * + * @param TokenInterface $token A TokenInterface instance + * + * @return bool true if the implementation supports the Token, false otherwise + */ + public function supports(TokenInterface $token); } diff --git a/Core/Authorization/Voter/ExpressionVoter.php b/Core/Authorization/Voter/ExpressionVoter.php index 3263803..98b8f50 100644 --- a/Core/Authorization/Voter/ExpressionVoter.php +++ b/Core/Authorization/Voter/ExpressionVoter.php @@ -15,6 +15,7 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface; use Symfony\Component\Security\Core\Authorization\ExpressionLanguage; use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; use Symfony\Component\ExpressionLanguage\Expression; use Symfony\Component\HttpFoundation\Request; @@ -43,6 +44,11 @@ class ExpressionVoter implements VoterInterface $this->roleHierarchy = $roleHierarchy; } + public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) + { + $this->expressionLanguage->registerProvider($provider); + } + /** * {@inheritdoc} */ diff --git a/Core/SecurityContext.php b/Core/SecurityContext.php index 1f46cd6..545d4cb 100644 --- a/Core/SecurityContext.php +++ b/Core/SecurityContext.php @@ -41,7 +41,7 @@ class SecurityContext implements SecurityContextInterface private $authorizationChecker; /** - * For backwords compatibility, the signature of sf <2.6 still works + * For backwards compatibility, the signature of sf <2.6 still works * * @param TokenStorageInterface|AuthenticationManagerInterface $tokenStorage * @param AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker |