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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.