NoopSecurityHandler.php 701 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Sonata project.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Security\Handler;
  11. use Sonata\AdminBundle\Admin\AdminInterface;
  12. class NoopSecurityHandler implements SecurityHandlerInterface
  13. {
  14. /**
  15. * {@inheritDoc}
  16. */
  17. public function isGranted(AdminInterface $admin, $attributes, $object = null)
  18. {
  19. return true;
  20. }
  21. /**
  22. * {@inheritDoc}
  23. */
  24. public function buildSecurityInformation(AdminInterface $admin)
  25. {
  26. return array();
  27. }
  28. }