From 0e7c46418371c035cc8a9c46e72616c508b2a788 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 17 Mar 2014 10:01:43 +0100 Subject: [PATCH] remove context in all security function. This Parameter is not used anymore. --- core/lib/Thelia/Core/Template/Loop/Auth.php | 3 +-- core/lib/Thelia/Core/Template/Smarty/Plugins/Security.php | 4 ++-- templates/frontOffice/default/account-password.html | 2 +- templates/frontOffice/default/account-update.html | 2 +- templates/frontOffice/default/account.html | 2 +- templates/frontOffice/default/address-update.html | 2 +- templates/frontOffice/default/address.html | 2 +- templates/frontOffice/default/badresponse.html | 2 +- templates/frontOffice/default/layout.tpl | 4 ++-- templates/frontOffice/default/order-delivery.html | 2 +- templates/frontOffice/default/order-invoice.html | 2 +- templates/frontOffice/default/order-placed.html | 2 +- 12 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Auth.php b/core/lib/Thelia/Core/Template/Loop/Auth.php index 667d5dfd2..7a6dec7f9 100644 --- a/core/lib/Thelia/Core/Template/Loop/Auth.php +++ b/core/lib/Thelia/Core/Template/Loop/Auth.php @@ -71,8 +71,7 @@ class Auth extends BaseLoop implements ArraySearchLoopInterface new TypeCollection( new EnumListType(array(AccessManager::VIEW, AccessManager::CREATE, AccessManager::UPDATE, AccessManager::DELETE)) ) - ), - Argument::createAnyTypeArgument('context', 'front', false) + ) ); } diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Security.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Security.php index 9db8e90fe..26f412b2c 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Security.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Security.php @@ -61,8 +61,8 @@ class Security extends AbstractSmartyPlugin if (! $this->securityContext->isGranted($roles, $resources, $modules, $accesses)) { $ex = new AuthenticationException( - sprintf("User not granted for roles '%s', to access resources '%s' with %s in context '%s'.", - implode(',', $roles), implode(',', $resources), implode(',', $accesses), $context + sprintf("User not granted for roles '%s', to access resources '%s' with %s.", + implode(',', $roles), implode(',', $resources), implode(',', $accesses) ) ); diff --git a/templates/frontOffice/default/account-password.html b/templates/frontOffice/default/account-password.html index 653ed9eef..9d0b592b7 100644 --- a/templates/frontOffice/default/account-password.html +++ b/templates/frontOffice/default/account-password.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} - {check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Body Class *} diff --git a/templates/frontOffice/default/account-update.html b/templates/frontOffice/default/account-update.html index 467d586f6..01c692094 100644 --- a/templates/frontOffice/default/account-update.html +++ b/templates/frontOffice/default/account-update.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} - {check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Body Class *} diff --git a/templates/frontOffice/default/account.html b/templates/frontOffice/default/account.html index a6fe50d84..55626509a 100644 --- a/templates/frontOffice/default/account.html +++ b/templates/frontOffice/default/account.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} - {check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Breadcrumb *} diff --git a/templates/frontOffice/default/address-update.html b/templates/frontOffice/default/address-update.html index 6add1d884..78ce6f1e7 100644 --- a/templates/frontOffice/default/address-update.html +++ b/templates/frontOffice/default/address-update.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} - {check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Body Class *} diff --git a/templates/frontOffice/default/address.html b/templates/frontOffice/default/address.html index 771d4aad5..9baf8c3e5 100644 --- a/templates/frontOffice/default/address.html +++ b/templates/frontOffice/default/address.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} - {check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Body Class *} diff --git a/templates/frontOffice/default/badresponse.html b/templates/frontOffice/default/badresponse.html index 47f5bb503..5dfd6b333 100755 --- a/templates/frontOffice/default/badresponse.html +++ b/templates/frontOffice/default/badresponse.html @@ -2,7 +2,7 @@ {* Security *} {block name="no-return-functions" prepend} -{check_auth context="front" role="CUSTOMER" login_tpl="login"} + {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Breadcrumb *} diff --git a/templates/frontOffice/default/layout.tpl b/templates/frontOffice/default/layout.tpl index a53d7ea2e..8aba0bb48 100644 --- a/templates/frontOffice/default/layout.tpl +++ b/templates/frontOffice/default/layout.tpl @@ -92,7 +92,7 @@ GNU General Public License : http://www.gnu.org/licenses/