Time for action – adding the realm permission functions
You're going to register two realms, one realm allows the viewing of the enhanced information, the other one allows the creation of this information. You're going to use the files from Example 1 for this part.
Open the
setup.php
from thecbEnhancedInfo
directory.Go to the end of the first function named
plugin_cbEnhancedInfo_install
.There's a comment displayed:
/* The realm permissions are missing here --->*/ /* <--- */
Between these two errors, enter the following line:
api_plugin_register_realm('cbEnhancedInfo', '', 'Plugin - cbEnhancedInfo - View Information', 2701);
This line will register the permission realm which allows a user to view the enhanced information on the tree-view page.
After the code you just entered, add the following lines:
api_plugin_register_realm('cbEnhancedInfo', 'cbEnhancedInfo_listInformation.php,cbEnhancedInfo_addInformation.php', 'Plugin - cbEnhancedInfo...