8000 minor #15143 unify default AccessDeniedExeption message (xabbuh) · symfony/symfony@148c7db · GitHub
[go: up one dir, main page]

Skip to content

Commit 148c7db

Browse files
committed
minor #15143 unify default AccessDeniedExeption message (xabbuh)
This PR was merged into the 2.6 branch. Discussion ---------- unify default AccessDeniedExeption message | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15099 | License | MIT | Doc PR | Commits ------- 87e7709 unify default AccessDeniedExeption message
2 parents e36e831 + 87e7709 commit 148c7db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ protected function addFlash($type, $message)
119119
* @param mixed $attributes The attributes
120120
* @param mixed $object The object
121121
*
122-
* @throws \LogicException
123122
* @return bool
123+
*
124+
* @throws \LogicException
124125
*/
125126
protected function isGranted($attributes, $object = null)
126127
{
@@ -230,7 +231,7 @@ public function createNotFoundException($message = 'Not Found', \Exception $prev
230231
*
231232
* @return AccessDeniedException
232233
*/
233-
public function createAccessDeniedException($message = 'Access Denied', \Exception $previous = null)
234+
public function createAccessDeniedException($message = 'Access Denied.', \Exception $previous = null)
234235
{
235236
return new AccessDeniedException($message, $previous);
236237
}
@@ -344,7 +345,7 @@ public function get($id)
344345
}
345346

346347
/**
347-
* Checks the validity of a CSRF token
348+
* Checks the validity of a CSRF token.
348349
*
349350
* @param string $id The id used when generating the token
350351
* @param string $token The actual token sent with the request that should be validated

src/Symfony/Component/Security/Core/Exception/AccessDeniedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class AccessDeniedException extends \RuntimeException
2020
{
21-
public function __construct($message = 'Access Denied', \Exception $previous = null)
21+
public function __construct($message = 'Access Denied.', \Exception $previous = null)
2222
{
2323
parent::__construct($message, 403, $previous);
2424
}

0 commit comments

Comments
 (0)
0