Skip to content

removed non-MIT/BSDlicensed code from Symfony SE #2561

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

Merged
merged 1 commit into from
May 3, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ method of the ``AppKernel`` class::
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
5 changes: 0 additions & 5 deletions bundles/map.rst.inc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
* :doc:`SensioFrameworkExtraBundle </bundles/SensioFrameworkExtraBundle/index>`
* :doc:`SensioGeneratorBundle </bundles/SensioGeneratorBundle/index>`
* `JMSSecurityExtraBundle`_
* `JMSDiExtraBundle`_
* :doc:`DoctrineFixturesBundle </bundles/DoctrineFixturesBundle/index>`
* :doc:`DoctrineMigrationsBundle </bundles/DoctrineMigrationsBundle/index>`
* :doc:`DoctrineMongoDBBundle </bundles/DoctrineMongoDBBundle/index>`

.. _`JMSSecurityExtraBundle`: http://jmsyst.com/bundles/JMSSecurityExtraBundle/1.2
.. _`JMSDiExtraBundle`: http://jmsyst.com/bundles/JMSDiExtraBundle/1.1
1 change: 0 additions & 1 deletion quick_tour/the_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ a single ``Bundle`` class that describes it::
new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
22 changes: 0 additions & 22 deletions quick_tour/the_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,28 +207,6 @@ Going to the ``http://localhost/app_dev.php/demo/secured/hello``
URL will automatically redirect you to the login form because this resource is
protected by a ``firewall``.

You can also force the action to require a given role by using the ``@Secure``
annotation on the controller::

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use JMS\SecurityExtraBundle\Annotation\Secure;

/**
* @Route("/hello/admin/{name}", name="_demo_secured_hello_admin")
* @Secure(roles="ROLE_ADMIN")
* @Template()
*/
public function helloAdminAction($name)
{
return array('name' => $name);
}

Now, log in as ``user`` (who does *not* have the ``ROLE_ADMIN`` role) and
from the secured hello page, click on the "Hello resource secured" link.
Symfony2 should return a 403 HTTP status code, indicating that the user
is "forbidden" from accessing that resource.

.. note::

The Symfony2 security layer is very flexible and comes with many different
Expand Down