// removing group_module_restriction table to set every restrictions in an only table : module_group
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10936 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -327,16 +327,13 @@ class AdminGroupsController extends AdminController
|
||||
protected function updateRestrictions()
|
||||
{
|
||||
$id_group = Tools::getValue('id_group');
|
||||
$unauth_modules = Tools::getValue('modulesBoxUnauth');
|
||||
$auth_modules = Tools::getValue('modulesBoxAuth');
|
||||
$return = true;
|
||||
if ($id_group)
|
||||
Group::truncateModulesRestrictions((int)$id_group);
|
||||
|
||||
$shops = Shop::getShops(true, null, true);
|
||||
if (is_array($auth_modules))
|
||||
$return &= Group::addModulesRestrictions($id_group, $auth_modules, 1);
|
||||
if (is_array($unauth_modules))
|
||||
$return &= Group::addModulesRestrictions($id_group, $unauth_modules, 0);
|
||||
$return &= Group::addModulesRestrictions($id_group, $auth_modules, $shops);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user