Skip to content

Commit

Permalink
removed ForbiddenHttpException
Browse files Browse the repository at this point in the history
Both HttpKernel and Security define a 403 exception:

* Symfony\Component\HttpKernel\Exception\ForbiddenHttpException
* Symfony\Component\Security\Exception\AccessDeniedException

The one in HttpKernel has been removed in favor of the Security one.
  • Loading branch information
fabpot committed Dec 10, 2010
1 parent d036448 commit 1317760
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 31 deletions.

This file was deleted.

Expand Up @@ -86,7 +86,7 @@ public function handle(Event $event)
}

if (!$this->accessDecisionManager->decide($token, $attributes, $request)) {
throw new AccessDeniedException('Access is denied.');
throw new AccessDeniedException();
}
}
}
Expand Up @@ -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.
Expand Down
Expand Up @@ -18,7 +18,7 @@
*/
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);
}
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/Security/User/InMemoryUserProvider.php
Expand Up @@ -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.
Expand Down

0 comments on commit 1317760

Please sign in to comment.