Custom Module specific for User role

Hi i just create a custom module and part of this module will display a new menu, this work perfectly under Admin user, but for order user like physician (user). the menu is not visible.

The way i set to display the menu is via openemr.bootstrap : $submenu->acl_req = [“user”];
i also try to have the arry as emty to display in all role, but still the same new menu is not visible to other user. I also try to disable and enable again the module still no luck.

Thanks,
Casper

Hi @casper
Remember that any submenus ACL permission level needs to be the same or a lesser level than the top level holding the sub menu.

You can refer to our library/classes/Installer.class.php to see what we install for default ACL’s.
You may find my menu (multi level) for faxsms module at interface/modules/custom_modules/oe-module-faxsms/openemr.bootstrap.php around L-58 an useful example.

Hope this helps…

Hi @sjpadgett ohh your the one who created the faxsms module. Yes is is the reference i used to solve the problem, since when enabling your module the Twilio Messaging menu is also visible for user/physician role.

My mistake is i use “user” while the correct is “patients” :slight_smile:

This is already resolve.

Thanks
Casper