Hello.
I have a user group called Operators.
I need to give access to these users to a specific module in Extensions. BUT i dont want them to see all the other modules that are installed.
So far their access was denied to the Extensions list. When i gave them permissions for the specific module they still couldnt access it nor the Extensions list. I then tried and gave them access to /module and /manager (access and modify) but this way they could see all the installed modules.
How can i hide all the modules I dont want them to see and only show them the specific module?
OpenCart version i use 1.5.64
Thanks in advance!!!
I have a user group called Operators.
I need to give access to these users to a specific module in Extensions. BUT i dont want them to see all the other modules that are installed.
So far their access was denied to the Extensions list. When i gave them permissions for the specific module they still couldnt access it nor the Extensions list. I then tried and gave them access to /module and /manager (access and modify) but this way they could see all the installed modules.
How can i hide all the modules I dont want them to see and only show them the specific module?
OpenCart version i use 1.5.64
Thanks in advance!!!
Did you 'group them' and set 'set' their access rights in the 'Admin / System / User / Usergroups / Whatever' ?
You probably can't make everything invisible, but at least not 'usable', but I'm not sure about this 'visible', since I never tried it yet...
Ernie
bigmax.ch/shop/
You probably can't make everything invisible, but at least not 'usable', but I'm not sure about this 'visible', since I never tried it yet...
Ernie
bigmax.ch/shop/
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
To hide modules from list where user does not have acces permission.nektar wrote:I need to give access to these users to a specific module in Extensions. BUT i dont want them to see all the other modules that are installed.
Edit admin/controller/extension/module.php
Find:
Code: Select all
$extension = basename($file, '.php');
Code: Select all
if (!$this->user->hasPermission('access', 'module/'.$extension)) {
continue;
}
vQmod to hide modules, feeds, totals, shipping, payment if user does not have acces permission.
OCMod for version 2.0.0.*
I was wondering how I could make this work for OC 2.3?
I tried editing the original file by changing the path from
to
But it just hides all modules, no matter the permissions.
I tried editing the original file by changing the path from
Code: Select all
admin/controller/extension/module.php
Code: Select all
admin/controller/extension/extension/module.php
It points to the same file and targets the same code line as in original mod though. If I understand correctly OC 2.3 changed module layout and file structure a little bit.
Besides, in the newest OC version there is no module.php file in the original modification path
Besides, in the newest OC version there is no module.php file in the original modification path
Code: Select all
admin/controller/extension/module.php
LE: Edit: Added @pprmkr code from page 2
Last edited by xxvirusxx on Mon Jan 25, 2021 11:27 pm, edited 1 time in total.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Should work
Edit: Added @pprmkr code from page 2
Edit: Added @pprmkr code from page 2
Attachments
Last edited by xxvirusxx on Mon Jan 25, 2021 11:19 pm, edited 1 time in total.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
I think involve more code.
At this moment extensions are counted by total numbers of php files
Then heading_title is displayed by total numbers of files, and not based of user permissions
I will think of a possibility to count only files based on user permissions.
At this moment extensions are counted by total numbers of php files
Code: Select all
$files = glob(DIR_APPLICATION . 'controller/extension/' . $extension . '/*.php', GLOB_BRACE);
Code: Select all
'text' => $this->language->get('extension')->get('heading_title') . ' (' . count($files) .')',
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Who is online
Users browsing this forum: No registered users and 140 guests