Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting createAccessDeniedException() method #3486

Merged
merged 4 commits into from
Feb 2, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating references to match doc format
klaussilveira committed Jan 17, 2014
commit 53f156c6fd104cb0d0719fcd4d66d5f32b522906
2 changes: 1 addition & 1 deletion book/security.rst
Original file line number Diff line number Diff line change
@@ -1084,7 +1084,7 @@ authorization from inside a controller::

.. _book-security-securing-controller-annotations:

The ``createAccessDeniedException()`` method creates a special ``AccessDeniedException``
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createAccessDeniedException()` method creates a special :class:`Symfony\\Component\\Security\\Core\Exception\\AccessDeniedException`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a versionadded block above this:

.. versionadded:: 2.5
    The ``createAccessDeniedException`` method was introduced in Symfony 2.5.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed that. Updated.

object, which ultimately triggers a 403 HTTP response inside Symfony.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And can you please wrap lines after the first word that crosses the 72nd character?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


Thanks to the SensioFrameworkExtraBundle, you can also secure your controller using annotations::