Skip to content

Commit

Permalink
check user right for update, read on computers
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary-Clb committed Dec 7, 2023
1 parent 092ac94 commit 033bdd2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ajax/ack.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header("Content-Type: text/html; charset=UTF-8");


if (isset($_POST['hostid'])) {
$host = new Host();
$res_a = $host->acknowledgement($_POST['hostid'], $_POST['params']);
Expand Down
2 changes: 2 additions & 0 deletions ajax/cancelDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['downtimeid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/hostTimeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

include('../../../inc/includes.php');

Session::checkRight('computer', READ);

header("Content-Type: text/html; charset=UTF-8");

if (isset($_GET['period']) && isset($_GET['hostid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/sendCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['hostid'])) {
Expand Down
2 changes: 2 additions & 0 deletions ajax/setDowntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

include('../../../inc/includes.php');

Session::checkRight('computer', UPDATE);

header("Content-Type: text/html; charset=UTF-8");

if (isset($_POST['params'])) {
Expand Down
2 changes: 2 additions & 0 deletions front/host.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

include('../../../inc/includes.php');

Session::checkRight('computer', READ);

Html::header(
Host::getTypeName(),
$_SERVER['PHP_SELF'],
Expand Down

0 comments on commit 033bdd2

Please sign in to comment.