Forum

Thread tagged as: Error, Api, Add-on-development

Hiddens apps appearing in the sidebar

Hi,

I've noticed that some of our utility apps are appearing in the sidebar despite the last parameter of the register_app() method being true. These apps are locked down from being accessed with redirects but this is a little problematic when clients can see them in the menu.

Here is the admin.php of our monitoring app which appears in the sidebar as Heartbeat:

<?php

if($CurrentUser->logged_in() && $CurrentUser->roleMasterAdmin()) {
    $this->register_app('root_heartbeat', 'Heartbeat', 1, 'Site status monitor', '1.0.1', true);
    $this->require_version('root_heartbeat', 2);

    $this->add_setting('root_heartbeat_uid', 'Site UID', 'text', '', false, 'The UID is used to identify the report author and is used along with the signature to verify authenticity.');
    $this->add_setting('root_heartbeat_signature', 'Site Key', 'text', '', false, 'The signature key is created using the master server and verifies reports are authentic.');
    $this->add_setting('root_heartbeat_master_server', 'Master server', 'text', '', false, 'The master server host to send report data.');

    include(__DIR__ . '/vendor/autoload.php');
}

Is there something I have missed?

James Wigger

James Wigger 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you able to hide them in the menu manager?

Yes, this works in the menu manager, including permissions based ones, but standard Perch does not include the menu manager.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, this has been fixed for the next release.

Excellent, great stuff :)