Closed mlabrum closed 10 years ago
This adds support for using symfony Expressions.
This class is pretty much a copy of https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php
This allows you to use expressions with the security extension http://symfony.com/doc/current/book/security.html#book-security-template-expression
{if '"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'|expression|is_granted } Hi Admin! {/if}
Merged. Thank you @mlabrum!
Added an example to the documentation: https://smartybundle.readthedocs.org/en/latest/extensions.html#complex-access-controls-with-expressions
This adds support for using symfony Expressions.
This class is pretty much a copy of https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Extension/ExpressionExtension.php
This allows you to use expressions with the security extension http://symfony.com/doc/current/book/security.html#book-security-template-expression