summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2014-12-12 17:24:25 +0100
committerNicolas Grekas <nicolas.grekas@gmail.com>2014-12-12 17:24:25 +0100
commit853b14753e0fffa101897454de95d912202c5604 (patch)
tree18997ab25c0bc5edd412eec234de710bf3408b54
parent9aa0464b8c4968c3ef8bb312d22885a068391737 (diff)
parenta4210450cdb42fecab92ebaf933a3e2bf1cb699b (diff)
downloadsymfony-security-853b14753e0fffa101897454de95d912202c5604.zip
symfony-security-853b14753e0fffa101897454de95d912202c5604.tar.gz
symfony-security-853b14753e0fffa101897454de95d912202c5604.tar.bz2
Merge branch '2.7'
* 2.7: (26 commits) [Form] fixed a maxlength overring on a guessing [Debug] Show only unique class candidates [FrameworkBundle] make GetSetMethodNormalizer available by default [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 Fixed deprecation version 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. ...
-rw-r--r--Core/Authentication/Provider/AuthenticationProviderInterface.php16
-rw-r--r--Core/Authorization/Voter/ExpressionVoter.php6
-rw-r--r--Core/SecurityContext.php2
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