///////
This commit is contained in:
1 parent
9a0e3ca81e
commit
2cde72d5a4
2 files changed
+12
-5
No files matched your search
@@ -1296,7 +1296,7 @@ class AdminControllerCore extends Controller
|
|||||||
$current_id = Tab::getCurrentParentId();
|
$current_id = Tab::getCurrentParentId();
|
||||||
foreach ($tabs as $index => $tab)
|
foreach ($tabs as $index => $tab)
|
||||||
{
|
{
|
||||||
if ($tab['class_name'] == 'AdminStock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0)
|
if (($tab['class_name'] == 'AdminStock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0) || $tab['class_name'] == 'AdminCarrierWizard')
|
||||||
{
|
{
|
||||||
unset($tabs[$index]);
|
unset($tabs[$index]);
|
||||||
continue;
|
continue;
|
||||||
@@ -1336,7 +1336,7 @@ class AdminControllerCore extends Controller
|
|||||||
foreach ($sub_tabs as $index2 => $sub_tab)
|
foreach ($sub_tabs as $index2 => $sub_tab)
|
||||||
{
|
{
|
||||||
// class_name is the name of the class controller
|
// class_name is the name of the class controller
|
||||||
if (Tab::checkTabRights($sub_tab['id_tab']) === true && (bool)$sub_tab['active'])
|
if (Tab::checkTabRights($sub_tab['id_tab']) === true && (bool)$sub_tab['active'] && $sub_tab['class_name'] != 'AdminCarrierWizard')
|
||||||
{
|
{
|
||||||
$sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']);
|
$sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']);
|
||||||
$sub_tabs[$index2]['current'] = ($sub_tab['class_name'].'Controller' == get_class($this));
|
$sub_tabs[$index2]['current'] = ($sub_tab['class_name'].'Controller' == get_class($this));
|
||||||
@@ -2996,4 +2996,4 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,12 +89,19 @@ class AdminCarrierWizardControllerCore extends AdminController
|
|||||||
|
|
||||||
public function renderView()
|
public function renderView()
|
||||||
{
|
{
|
||||||
|
$access = Profile::getProfileAccess($this->context->employee->id_profile, Tab::getIdFromClassName('AdminCarrierWizard'));
|
||||||
|
|
||||||
$this->initWizard();
|
$this->initWizard();
|
||||||
|
|
||||||
if (Tools::getValue('id_carrier'))
|
if (Tools::getValue('id_carrier') && $access['edit'])
|
||||||
$carrier = $this->loadObject();
|
$carrier = $this->loadObject();
|
||||||
else
|
elseif ($access['add'])
|
||||||
$carrier = new Carrier();
|
$carrier = new Carrier();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->errors[] = Tools::displayError('You do not have permission to use this wizard.');
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl_view_vars = array(
|
$this->tpl_view_vars = array(
|
||||||
'enableAllSteps' => Validate::isLoadedObject($carrier),
|
'enableAllSteps' => Validate::isLoadedObject($carrier),
|
||||||
|
|||||||
Reference in new issue
Block a user