[-] BO : BugFix : #PSTEST-1054 : Employees and permission updated

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14401 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-04-02 10:05:24 +00:00
parent a606f14f76
commit 3c8af49bdb
5 changed files with 117 additions and 10 deletions
@@ -421,6 +421,24 @@ class AdminEmployeesControllerCore extends AdminController
return parent::initContent();
}
public function ajaxProcessGetTabByIdProfile()
{
$id_profile = Tools::getValue('id_profile');
$tabs = Tab::getTabByIdProfile(0, $id_profile);
$this->tabs_list = array();
foreach ($tabs as $tab)
{
if (Tab::checkTabRights($tab['id_tab']))
{
$this->tabs_list[$tab['id_tab']] = $tab;
foreach (Tab::getTabByIdProfile($tab['id_tab'], $id_profile) as $children)
if (Tab::checkTabRights($children['id_tab']))
$this->tabs_list[$tab['id_tab']]['children'][] = $children;
}
}
die(Tools::jsonEncode($this->tabs_list));
}
}