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.

  1. Open the setup.php from the cbEnhancedInfo directory.
  2. Go to the end of the first function named plugin_cbEnhancedInfo_install.
  3. There's a comment displayed:
       /* The realm permissions are missing here --->*/
       /* <--- */
  4. Between these two errors, enter the following line:
        api_plugin_register_realm('cbEnhancedInfo',
                   '',
                   'Plugin - cbEnhancedInfo - View Information',
                   2701);
  5. This line will register the permission realm which allows a user to view the enhanced information on the tree-view page.
  6. After ...

Get Cacti 0.8 Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.