diff --git a/src/Symfony/Component/HttpKernel/Exception/ForbiddenHttpException.php b/src/Symfony/Component/HttpKernel/Exception/ForbiddenHttpException.php deleted file mode 100644 index 21f3026ec4..0000000000 --- a/src/Symfony/Component/HttpKernel/Exception/ForbiddenHttpException.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * ForbiddenHttpException. - * - * @author Fabien Potencier - */ -class ForbiddenHttpException extends HttpException -{ - public function __construct($message = 'Forbidden', \Exception $previous = null) - { - parent::__construct($message, 403, $previous); - } -} diff --git a/src/Symfony/Component/HttpKernel/Security/Firewall/AccessListener.php b/src/Symfony/Component/HttpKernel/Security/Firewall/AccessListener.php index e03911d437..4b02cf2bfd 100644 --- a/src/Symfony/Component/HttpKernel/Security/Firewall/AccessListener.php +++ b/src/Symfony/Component/HttpKernel/Security/Firewall/AccessListener.php @@ -86,7 +86,7 @@ class AccessListener implements ListenerInterface } if (!$this->accessDecisionManager->decide($token, $attributes, $request)) { - throw new AccessDeniedException('Access is denied.'); + throw new AccessDeniedException(); } } } diff --git a/src/Symfony/Component/Security/Authorization/AccessDecisionManagerInterface.php b/src/Symfony/Component/Security/Authorization/AccessDecisionManagerInterface.php index 88066c3b59..ae1288ae53 100644 --- a/src/Symfony/Component/Security/Authorization/AccessDecisionManagerInterface.php +++ b/src/Symfony/Component/Security/Authorization/AccessDecisionManagerInterface.php @@ -3,8 +3,6 @@ namespace Symfony\Component\Security\Authorization; use Symfony\Component\Security\Authentication\Token\TokenInterface; -use Symfony\Component\Security\Exception\AccessDeniedException; -use Symfony\Component\Security\Exception\InsufficientAuthenticationException; /* * This file is part of the Symfony package. diff --git a/src/Symfony/Component/Security/Exception/AccessDeniedException.php b/src/Symfony/Component/Security/Exception/AccessDeniedException.php index 6a48d8983c..9dde809b5f 100644 --- a/src/Symfony/Component/Security/Exception/AccessDeniedException.php +++ b/src/Symfony/Component/Security/Exception/AccessDeniedException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Security\Exception; */ class AccessDeniedException extends \RuntimeException { - public function __construct($message = '', $code = 403, \Exception $previous = null) + public function __construct($message = 'Access Denied', \Exception $previous = null) { parent::__construct($message, 403, $previous); } diff --git a/src/Symfony/Component/Security/User/InMemoryUserProvider.php b/src/Symfony/Component/Security/User/InMemoryUserProvider.php index fbf0ad2d2f..89ede6af81 100644 --- a/src/Symfony/Component/Security/User/InMemoryUserProvider.php +++ b/src/Symfony/Component/Security/User/InMemoryUserProvider.php @@ -3,8 +3,6 @@ namespace Symfony\Component\Security\User; use Symfony\Component\Security\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Exception\AccessDeniedException; -use Symfony\Component\Security\Authentication\Token\UsernamePasswordToken; /* * This file is part of the Symfony package.