Download the PHP package guilro/protection-proxy-bundle without Composer
On this page you can find all versions of the php package guilro/protection-proxy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download guilro/protection-proxy-bundle
More information about guilro/protection-proxy-bundle
Files in guilro/protection-proxy-bundle
Download guilro/protection-proxy-bundle
More information about guilro/protection-proxy-bundle
Files in guilro/protection-proxy-bundle
Vendor guilro
Package protection-proxy-bundle
Short Description Protection proxy generator for Symfony2
License MIT
Homepage https://github.com/Guilro/GuilroProtectionProxyBundle
Package protection-proxy-bundle
Short Description Protection proxy generator for Symfony2
License MIT
Homepage https://github.com/Guilro/GuilroProtectionProxyBundle
Please rate this library. Is it a good library?
Informations about the package protection-proxy-bundle
GuilroProtectionProxyBundle
Current version : 0.1.4
Installation
Add this bundle to your composer.json
file:
Register the bundle in app/AppKernel.php:
Usage
You have to configure the protected classes and methods (for the moment in config.yml).
Typicall usage in your controllers and views:
- If 'attribute' is set, when using the generated proxy, original methods
getTitle()
andsetAuthor()
of$comment
will only be really executed if$securityContext->isGranted('attribute', $comment)
returnstrue
. - If 'expression' is set, when using the generated proxy, original methods will only be really executed if
$securityContext->isGranted(new Expression($expression), $comment)
returnstrue
. - If both are set, both test are performed.
- If
$securityContext->isGranted()
returns false, the original method will not be executed. It will returnnull
, ordeny_value
if set. - If the original method returns an object of a pretected class, it will return the raw object or its protected proxy depending on
return_proxy
setting. Default for this setting isfalse
.
If you use attributes other than roles, you should probably implements your own Voter in order to grant access or not to users.
All versions of protection-proxy-bundle with dependencies
PHP Build Version
Package Version
Requires
ocramius/proxy-manager Version
0.5.*
symfony/security-bundle Version ~2.4
symfony/expression-language Version ~2.4
symfony/dependency-injection Version ~2.4
symfony/config Version ~2.4
symfony/http-kernel Version ~2.4
symfony/security-bundle Version ~2.4
symfony/expression-language Version ~2.4
symfony/dependency-injection Version ~2.4
symfony/config Version ~2.4
symfony/http-kernel Version ~2.4
The package guilro/protection-proxy-bundle contains the following files
Loading the files please wait ....