Release 2.48 (#5789)
This commit is contained in:
42
src/Twig/SecurityPolicy/DefaultPolicy.php
Normal file
42
src/Twig/SecurityPolicy/DefaultPolicy.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Twig\SecurityPolicy;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Attribute\Exclude;
|
||||
use Twig\Sandbox\SecurityPolicyInterface;
|
||||
|
||||
/**
|
||||
* @deprecated since 2.47.0 - use StrictPolicy instead
|
||||
*/
|
||||
#[Exclude]
|
||||
final class DefaultPolicy implements SecurityPolicyInterface
|
||||
{
|
||||
private SecurityPolicyInterface $securityPolicy;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->securityPolicy = new StrictPolicy();
|
||||
}
|
||||
|
||||
public function checkSecurity($tags, $filters, $functions): void
|
||||
{
|
||||
$this->securityPolicy->checkSecurity($tags, $filters, $functions);
|
||||
}
|
||||
|
||||
public function checkMethodAllowed($obj, $method): void
|
||||
{
|
||||
$this->securityPolicy->checkMethodAllowed($obj, $method);
|
||||
}
|
||||
|
||||
public function checkPropertyAllowed($obj, $property): void
|
||||
{
|
||||
$this->securityPolicy->checkPropertyAllowed($obj, $property);
|
||||
}
|
||||
}
|
||||
42
src/Twig/SecurityPolicy/ExportPolicy.php
Normal file
42
src/Twig/SecurityPolicy/ExportPolicy.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Twig\SecurityPolicy;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Attribute\Exclude;
|
||||
use Twig\Sandbox\SecurityPolicyInterface;
|
||||
|
||||
/**
|
||||
* @deprecated since 2.47.0 - use StrictPolicy instead
|
||||
*/
|
||||
#[Exclude]
|
||||
final class ExportPolicy implements SecurityPolicyInterface
|
||||
{
|
||||
private SecurityPolicyInterface $securityPolicy;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->securityPolicy = new StrictPolicy();
|
||||
}
|
||||
|
||||
public function checkSecurity($tags, $filters, $functions): void
|
||||
{
|
||||
$this->securityPolicy->checkSecurity($tags, $filters, $functions);
|
||||
}
|
||||
|
||||
public function checkMethodAllowed($obj, $method): void
|
||||
{
|
||||
$this->securityPolicy->checkMethodAllowed($obj, $method);
|
||||
}
|
||||
|
||||
public function checkPropertyAllowed($obj, $property): void
|
||||
{
|
||||
$this->securityPolicy->checkPropertyAllowed($obj, $property);
|
||||
}
|
||||
}
|
||||
42
src/Twig/SecurityPolicy/InvoicePolicy.php
Normal file
42
src/Twig/SecurityPolicy/InvoicePolicy.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Twig\SecurityPolicy;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Attribute\Exclude;
|
||||
use Twig\Sandbox\SecurityPolicyInterface;
|
||||
|
||||
/**
|
||||
* @deprecated since 2.47.0 - use StrictPolicy instead
|
||||
*/
|
||||
#[Exclude]
|
||||
final class InvoicePolicy implements SecurityPolicyInterface
|
||||
{
|
||||
private SecurityPolicyInterface $securityPolicy;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->securityPolicy = new StrictPolicy();
|
||||
}
|
||||
|
||||
public function checkSecurity($tags, $filters, $functions): void
|
||||
{
|
||||
$this->securityPolicy->checkSecurity($tags, $filters, $functions);
|
||||
}
|
||||
|
||||
public function checkMethodAllowed($obj, $method): void
|
||||
{
|
||||
$this->securityPolicy->checkMethodAllowed($obj, $method);
|
||||
}
|
||||
|
||||
public function checkPropertyAllowed($obj, $property): void
|
||||
{
|
||||
$this->securityPolicy->checkPropertyAllowed($obj, $property);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user