centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
574 stars 240 forks source link

Actions based on ACL not available in custom view more actions menu (Schedule immediate check for host) #8509

Open anthoc opened 4 years ago

anthoc commented 4 years ago
centreon-widget-hostgroup-monitoring-19.10.0-1.el7.centos.noarch
centreon-widget-grid-map-19.10.0-1.el7.centos.noarch
centreon-widget-global-health-19.10.0-1.el7.centos.noarch
centreon-plugin-Hardware-Ups-Standard-Rfc1628-Snmp-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Databases-Mysql-20200204-093915.el7.centos.noarch
centreon-connector-perl-19.10.1-1.el7.centos.x86_64
centreon-trap-19.10.10-1.el7.centos.noarch
centreon-database-19.10.10-1.el7.centos.noarch
centreon-plugin-Network-Cisco-Standard-Snmp-20200204-093915.el7.centos.noarch
centreon-plugin-Operatingsystems-Linux-Snmp-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ftp-20200204-093915.el7.centos.noarch
centreon-clib-19.10.0-6.el7.centos.x86_64
centreon-broker-core-19.10.3-1.el7.centos.x86_64
centreon-broker-cbd-19.10.3-1.el7.centos.x86_64
centreon-pp-manager-19.10.0-5.el7.centos.noarch
centreon-widget-host-monitoring-19.10.1-1.el7.centos.noarch
centreon-widget-servicegroup-monitoring-19.10.0-1.el7.centos.noarch
centreon-widget-service-monitoring-19.10.2-1.el7.centos.noarch
centreon-widget-live-top10-cpu-usage-19.10.0-1.el7.centos.noarch
centreon-widget-live-top10-memory-usage-19.10.0-1.el7.centos.noarch
centreon-widget-engine-status-19.10.0-1.el7.centos.noarch
centreon-broker-cbmod-19.10.3-1.el7.centos.x86_64
centreon-plugin-Applications-Monitoring-Centreon-Poller-20200204-093915.el7.centos.noarch
centreon-license-manager-19.10.1-3.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Map4-Jmx-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Protocol-Ldap-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Database-20200204-093915.el7.centos.noarch
centreon-engine-extcommands-19.10.13-1.el7.centos.x86_64
centreon-connector-ssh-19.10.1-1.el7.centos.x86_64
centreon-engine-19.10.13-1.el7.centos.x86_64
centreon-perl-libs-19.10.10-1.el7.centos.noarch
centreon-poller-centreon-engine-19.10.10-1.el7.centos.noarch
centreon-base-config-centreon-engine-19.10.10-1.el7.centos.noarch
centreon-19.10.10-1.el7.centos.noarch
centreon-broker-19.10.3-1.el7.centos.x86_64
centreon-broker-storage-19.10.3-1.el7.centos.x86_64
centreon-widget-graph-monitoring-19.10.0-1.el7.centos.noarch
centreon-widget-httploader-19.10.0-1.el7.centos.noarch
centreon-widget-tactical-overview-19.10.1-1.el7.centos.noarch
centreon-plugin-Hardware-Printers-Generic-Snmp-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Protocol-Dns-20200204-093915.el7.centos.noarch
centreon-plugin-Operatingsystems-Windows-Snmp-20200204-093915.el7.centos.noarch
centreon-license-manager-common-19.10.1-3.el7.centos.noarch
centreon-auto-discovery-server-19.10.2-2.el7.centos.noarch
centreon-plugin-Applications-Monitoring-Centreon-Central-20200204-093915.el7.centos.noarch
centreon-plugin-Applications-Protocol-Http-20200204-093915.el7.centos.noarch
centreon-engine-daemon-19.10.13-1.el7.centos.x86_64
centreon-connector-19.10.1-1.el7.centos.x86_64
centreon-common-19.10.10-1.el7.centos.noarch
centreon-web-19.10.10-1.el7.centos.noarch
centreon-release-19.10-1.el7.centos.noarch

Operating System

CentOS Linux release 7.7.1908 (Core)

Browser used

Google Chrome 80.0.3987.149 (Build officiel) (64 bits) Same Behaviour on Firefox 74.0 (32-bit)

Steps to Reproduce

Hello

I created ACL with limited actions for limited user: image I activated "more actions" menu in the customer view of limited users

Describe the received result

The two following actions are not displayed in the more actions menu of the custom view:

But it is dissplayed for the following two actions:

It is not an ACL configuration error, because with the same user if i check the more actions list from the Monitoring menu, everything is there: image

Describe the expected result

The following actions should be available in the more actions menu of the custom view:

Thank you very much in advance.

anthoc commented 4 years ago

Actually, even if i am logged as admin I can't see these actions from custom view either.

anthoc commented 4 years ago

I figured it out by modifying the following files :

/usr/share/centreon/www/widgets/host-monitoring/src/action.php :

/* host: schedule check */
                case 90 :
                    $command = "SCHEDULE_HOST_CHECK;%s;" . time();
                    break;
                case 91 :
                    $command = "SCHEDULE_FORCED_HOST_CHECK;%s;" . time();
                    break;

/usr/share/centreon/www/widgets/host-monitoring/src/action.php :

if ($canDoAction || $centreon->user->access->checkAction("host_schedule_check")) {
    $actions .= "<option value='90'>"._("Host: Schedule Immediate Check")."</option>";
}
if ($canDoAction || $centreon->user->access->checkAction("host_schedule_forced_check")) {
    $actions .= "<option value='91'>"._("Host: Schedule Immediate Check (Forced)")."</option>";
}
anthoc commented 3 years ago

Hello,

I am just checking if there is any update on this request ? I just updated our server to 21.04 and I had to modify the files manually. Thank you very much :)