Jump to content

gloomybear

Members
  • Posts

    43
  • Joined

  • Last visited

Community Answers

  1. gloomybear's post in Restrict user to only some product tabs in BO was marked as the answer   
    I have found a solution myself. Posting as it may help others in future.
     
    Simplest solution is to overwrite AdminProductController with below code.
    class AdminProductsController extends AdminProductsControllerCore { public function __construct() { parent::__construct(); // restriction of tabs per user profile $this -> restrictTabs(); } // restriction of available tabs for some profiles private function restrictTabs() { //profile_id = 7 - Set profile ID which you want to restrict if ($this -> context -> employee -> id_profile == 7) { foreach ($this->available_tabs as $tab_key => $tab_value) { if (!($tab_key == 'Informations' or $tab_key == 'Seo')) { // tabs to leave unset($this -> available_tabs[$tab_key]); } } } } }
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More