From 69cc3a8563e13b3e55c8fa74d4330e2f3cfa87a6 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Tue, 3 Apr 2012 15:14:09 +0000 Subject: [PATCH] [-] Project : #PSFV-781 - Profile and access cannot be managed by SHOP git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14432 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminAccessController.php | 7 ++++--- controllers/admin/AdminProfilesController.php | 13 +++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/controllers/admin/AdminAccessController.php b/controllers/admin/AdminAccessController.php index dd27d63d3..8ec7d2e14 100644 --- a/controllers/admin/AdminAccessController.php +++ b/controllers/admin/AdminAccessController.php @@ -35,9 +35,10 @@ class AdminAccessControllerCore extends AdminController public function __construct() { - $this->table = 'access'; + $this->table = 'access'; $this->className = 'Profile'; - $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = false; $this->context = Context::getContext(); // Blacklist AdminLogin @@ -235,6 +236,6 @@ class AdminAccessControllerCore extends AdminController */ public function getCurrentProfileId() { - return (isset($_GET['id_profile']) && !empty($_GET['id_profile']) && is_numeric($_GET['id_profile'])) ? (int)$_GET['id_profile'] : 1; + return (isset($_GET['id_profile']) && !empty($_GET['id_profile']) && is_numeric($_GET['id_profile'])) ? (int)$_GET['id_profile'] : 1; } } diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php index d41055feb..552541318 100644 --- a/controllers/admin/AdminProfilesController.php +++ b/controllers/admin/AdminProfilesController.php @@ -30,14 +30,15 @@ class AdminProfilesControllerCore extends AdminController public function __construct() { $this->context = Context::getContext(); - $this->table = 'profile'; - $this->className = 'Profile'; - $this->lang = true; + $this->table = 'profile'; + $this->className = 'Profile'; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->addRowActionSkipList('delete', array(1)); - $this->bulk_actions = array( + $this->bulk_actions = array( 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')) ); @@ -83,7 +84,7 @@ class AdminProfilesControllerCore extends AdminController public function postProcess() { - /* PrestaShop demo mode */ + /* PrestaShop demo mode */ if (_PS_MODE_DEMO_) { $this->errors[] = Tools::displayError('This functionality has been disabled.'); @@ -91,7 +92,7 @@ class AdminProfilesControllerCore extends AdminController } /* PrestaShop demo mode*/ - if (isset($_GET['delete'.$this->table]) && $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) + if (isset($_GET['delete'.$this->table]) && $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) $this->errors[] = $this->l('For security reasons, you cannot delete the Administrator profile'); else parent::postProcess();