Page 1 of 1

Hide modules

Posted: Thu Feb 26, 2015 10:21 pm
by nektar
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!!!

Re: Hide modules

Posted: Fri Feb 27, 2015 4:57 am
by IP_CAM
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/

Re: Hide modules

Posted: Fri Feb 27, 2015 2:40 pm
by nektar
As i explained earlier, this group members cant use any other modules in Extension list, but they can vuew them all.

Re: Hide modules

Posted: Fri Feb 27, 2015 3:57 pm
by pprmkr
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.
To hide modules from list where user does not have acces permission.

Edit admin/controller/extension/module.php

Find:

Code: Select all

$extension = basename($file, '.php');
Add after:

Code: Select all

				if (!$this->user->hasPermission('access', 'module/'.$extension)) {
					continue;
				}
You can do the same with payment, shipping and total.

Re: Hide modules

Posted: Fri Feb 27, 2015 4:10 pm
by pprmkr
vQmod to hide modules, feeds, totals, shipping, payment if user does not have acces permission.

Re: Hide modules

Posted: Fri Feb 27, 2015 6:03 pm
by nektar
Thx guys.

I will give it a try this afternoon, when i get back to office and keep you informed.

Hope this VQmod works with opencart 1.5.64 and with future upgrade to ver 2.

Re: Hide modules

Posted: Sun Mar 01, 2015 6:47 pm
by nektar
pprmkr I havent tried the code but it should work.

I preffered the VQMod. I works as expected!!!

Where can we find this VQMod in order to upgrade it later for Opencart ver 2?

THanks again for the support!

Re: Hide modules

Posted: Sun Mar 01, 2015 9:59 pm
by pprmkr
OCMod for version 2.0.0.*

Re: Hide modules

Posted: Tue Mar 03, 2015 2:35 am
by nektar
WOW u r great mate.

Thx!

Re: Hide modules

Posted: Fri Mar 31, 2017 3:08 pm
by wonderland
I was wondering how I could make this work for OC 2.3?
I tried editing the original file by changing the path from

Code: Select all

admin/controller/extension/module.php
to

Code: Select all

admin/controller/extension/extension/module.php
But it just hides all modules, no matter the permissions.

Re: Hide modules

Posted: Fri Mar 31, 2017 4:27 pm
by nektar
Of course it does. you changed the path of the folders so it looks there admin/controller/extension/extension/module.php where there are no modules.

Re: Hide modules

Posted: Fri Mar 31, 2017 5:23 pm
by wonderland
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

Code: Select all

admin/controller/extension/module.php

Re: Hide modules

Posted: Sat Aug 04, 2018 12:03 am
by mehrshid
pprmkr wrote:
Sun Mar 01, 2015 9:59 pm
OCMod for version 2.0.0.*
It working fine also with OC 3.0.2
But a question : Is there any way to hide an extension in extension list?

Re: Hide modules

Posted: Thu Dec 12, 2019 7:04 pm
by Renecek
doesn't work with OC 3.0.2.0.
Any update please?

Re: Hide modules

Posted: Fri Dec 13, 2019 1:53 am
by xxvirusxx
Renecek wrote:
Thu Dec 12, 2019 7:04 pm
doesn't work with OC 3.0.2.0.
Any update please?