Skip to content

Commit

Permalink
Missing semicolons and one space
Browse files Browse the repository at this point in the history
  • Loading branch information
colinfrei authored and weaverryan committed Oct 27, 2011
1 parent b6caa85 commit f3462fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions book/security.rst
Expand Up @@ -723,14 +723,14 @@ Securing by IP
~~~~~~~~~~~~~~

Certain situations may arise when you may need to restrict access to a given
route based on IP. This is particularly relevant in the case of :ref:`Edge Side Includes<edge-side-includes>`
(ESI), for example, which utilize a route named "_internal". When
ESI is used, the _internal route is required by the gateway cache to enable
different caching options for subsections within a given page. This route
comes with the ^/_internal prefix by default in the standard edition (assuming
route based on IP. This is particularly relevant in the case of :ref:`Edge Side Includes<edge-side-includes>`
(ESI), for example, which utilize a route named "_internal". When
ESI is used, the _internal route is required by the gateway cache to enable
different caching options for subsections within a given page. This route
comes with the ^/_internal prefix by default in the standard edition (assuming
you've uncommented those lines from the routing file).

Here is an example of how you might secure this route from outside access:
Here is an example of how you might secure this route from outside access:

.. configuration-block::

Expand Down Expand Up @@ -759,7 +759,7 @@ Here is an example of how you might secure this route from outside access:
Securing by Channel
~~~~~~~~~~~~~~~~~~~

Much like securing based on IP, requiring the use of SSL is as simple as
Much like securing based on IP, requiring the use of SSL is as simple as
adding a new access_control entry:

.. configuration-block::
Expand All @@ -783,7 +783,7 @@ adding a new access_control entry:
'access_control' => array(
array('path' => '^/cart/checkout', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY', 'requires_channel' => 'https'),
),
.. _book-security-securing-controller:

Securing a Controller
Expand All @@ -795,7 +795,7 @@ authorization from inside a controller:

.. code-block:: php
use Symfony\Component\Security\Core\Exception\AccessDeniedException
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
// ...
public function helloAction($name)
Expand Down Expand Up @@ -1550,7 +1550,7 @@ the ``isGranted`` method of the security context:
public function indexAction()
{
// show different content to admin users
if($this->get('security.context')->isGranted('ADMIN')) {
if ($this->get('security.context')->isGranted('ADMIN')) {
// Load admin content here
}
// load other regular content here
Expand Down
4 changes: 2 additions & 2 deletions cookbook/security/securing_services.rst
Expand Up @@ -5,7 +5,7 @@ In the security chapter, you can see how to :ref:`secure a controller<book-secur
by requesting the ``security.context`` service from the Service Container
and checking the current user's role::

use Symfony\Component\Security\Core\Exception\AccessDeniedException
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
// ...

public function helloAction($name)
Expand Down Expand Up @@ -108,7 +108,7 @@ The injected service can then be used to perform the security check when the

namespace Acme\HelloBundle\Newsletter;

use Symfony\Component\Security\Core\Exception\AccessDeniedException
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\SecurityContextInterface;
// ...

Expand Down

0 comments on commit f3462fd

Please sign in to comment.