Post by nektar » Thu Feb 26, 2015 10:21 pm

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!!!

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by IP_CAM » Fri Feb 27, 2015 4:57 am

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/

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by nektar » Fri Feb 27, 2015 2:40 pm

As i explained earlier, this group members cant use any other modules in Extension list, but they can vuew them all.

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by pprmkr » Fri Feb 27, 2015 3:57 pm

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.

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by pprmkr » Fri Feb 27, 2015 4:10 pm

vQmod to hide modules, feeds, totals, shipping, payment if user does not have acces permission.

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by nektar » Fri Feb 27, 2015 6:03 pm

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.

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by nektar » Sun Mar 01, 2015 6:47 pm

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!

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by pprmkr » Sun Mar 01, 2015 9:59 pm

OCMod for version 2.0.0.*

Attachments


User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by nektar » Tue Mar 03, 2015 2:35 am

WOW u r great mate.

Thx!

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by wonderland » Fri Mar 31, 2017 3:08 pm

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.

New member

Posts

Joined
Wed Jun 15, 2011 8:25 pm

Post by nektar » Fri Mar 31, 2017 4:27 pm

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.

New member

Posts

Joined
Wed Jul 24, 2013 12:03 am

Post by wonderland » Fri Mar 31, 2017 5:23 pm

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

New member

Posts

Joined
Wed Jun 15, 2011 8:25 pm

Post by mehrshid » Sat Aug 04, 2018 12:03 am

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?

Newbie

Posts

Joined
Sat Aug 04, 2018 12:01 am

Post by Renecek » Thu Dec 12, 2019 7:04 pm

doesn't work with OC 3.0.2.0.
Any update please?

New member

Posts

Joined
Thu Dec 10, 2015 7:12 pm

Post by xxvirusxx » Fri Dec 13, 2019 1:53 am

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

Attachments


My converted modules | Buy me a beer | Contact me on Skype


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO
Who is online

Users browsing this forum: No registered users and 15 guests