Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
#788168
I created and enabled a simple plugin following the wiki steps. However, I can not limit access to the plugin by user profiles, even though I do not enable permission, as illustrated below.
Any idea what that might be? Use community version 3.1.2.
screen2.png
screen2.png (7.95 KiB) Viewed 4190 times
screen1.png
screen1.png (207.62 KiB) Viewed 4190 times
Att, Marcos Almeida
By zainab
#789225
Hello marcosfpa,

After creating the Role and Permissions as instructed in the wiki, you need to add a check in the menu file for your permissions to work correctly.

If extending the ProcessMaker Menu, then the file would be located within the folder of your plugin, with the name of menuPluginName.php.
If you are developing a plugin that adds a link to the cases menu in the home tab, then the file would be located inside your plugin’s folder, with the name of menuCasesPluginName.php.
You need to add the following code, of course you will need to change the name of the Permission:
Code: Select all
global $G_TMP_MENU;
global $RBAC;
if ($RBAC->userCanAccess('MY_PERMISSION_NAME') == 1) {
    $G_TMP_MENU->AddIdRawOption('PLUGIN_ID', 'url', 'Text for the menu');
}
If you add the above code, your plugin will now correctly display only for the users that have your plugins Permission assigned to their role.

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]