From 556305b4acad19b7b3c770a05f03016deb894bf6 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 11 Feb 2011 11:45:49 +0100 Subject: [PATCH] Fixed the default value of the access denied url The custom error page is now disabled by default as this would throw an exception if the /access_denied url does not match a route. This commit also remove the old parameter for this url which is not used anymore in the code. Moved the default value to the Configuration class --- .../DependencyInjection/Configuration.php | 2 +- .../Resources/config/security.xml | 22 ++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Configuration.php index 35c9e3afec..624f2d4b15 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Configuration.php @@ -49,7 +49,7 @@ class Configuration $rootNode = $tb->root('security:config', 'array'); $rootNode - ->scalarNode('access_denied_url')->end() + ->scalarNode('access_denied_url')->defaultNull()->end() ->scalarNode('session_fixation_strategy')->cannotBeEmpty()->defaultValue('migrate')->end() ; diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml index 29b7d49bc3..c4fc63c5c9 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml +++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml @@ -10,8 +10,6 @@ Symfony\Component\Security\Core\User\AccountChecker - null - Symfony\Component\Security\Core\Encoder\EncoderFactory Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder @@ -23,7 +21,7 @@ Symfony\Component\Security\Core\Authentication\Token\RememberMeToken Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager - + Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy migrate @@ -31,9 +29,7 @@ affirmative false true - - /access_denied - + Symfony\Component\Security\Core\Authorization\Voter\RoleVoter Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter @@ -57,20 +53,20 @@ - + %security.authentication.trust_resolver.anonymous_class% %security.authentication.trust_resolver.rememberme_class% - + %security.authentication.session_strategy.strategy% - + - + @@ -93,17 +89,17 @@ - + - + - +