I have created a custom module using the module builder. Can anybody please tell me how this module can be accessed only by the admin. I do not want non admin users to access the module.
I have created a custom module using the module builder. Can anybody please tell me how this module can be accessed only by the admin. I do not want non admin users to access the module.
You can create a specific Role to admin tha have access to this module
Daniel de Carvalho Passarini
"Fascinating" - Dr. Spock
Try to change or define Role according to your above needs.
Best regards,
SARFARAZ AHMED KHAN
Karachi, Pakistan
skype: genius_crystal
genius_crystal@hotmail.com
92-314-2595624
Use the Role Management or hide it be default for all other users.
Or add to the admin only list. The $adminOnlyList array exists in include/modules.php. You can do this in an upgrade-safe manner by creating a file like MyModuleName.php in custom\Extension\application\Ext\Include with the contents:
You'll then need to do a repair/rebuild all to get it to push to the modules.ext.php file in custom\application\Ext\Include.PHP Code:$adminOnlyList ['MyModuleName'] =array('all'=>1);
Co-Founder of: SugarOutfitters
Modules:
SecuritySuite (Teams)
Photo Module
Follow me on Twitter:eggsurplus
Your Personal Developer
By default the module is enabled for all the roles. So I created a role for which the specific module is disabled. It worked. But the problem is the admin need to add each of the users to the specified role to make it disabled.
I also tried the approach suggested by eggsurplus ,but that doesn't work.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks