diff options
author | Simon Rettberg | 2018-02-12 18:09:08 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-12 18:09:08 +0100 |
commit | 6d6c65db4a41c952689fa01cfbf31b424b817929 (patch) | |
tree | 8a7050b8fe2386c80d91400c1b29279ee421b36f /modules-available/statistics/page.inc.php | |
parent | slx-fixes.js/default.css: Fix disabled cursor-style (diff) | |
download | slx-admin-6d6c65db4a41c952689fa01cfbf31b424b817929.tar.gz slx-admin-6d6c65db4a41c952689fa01cfbf31b424b817929.tar.xz slx-admin-6d6c65db4a41c952689fa01cfbf31b424b817929.zip |
[statistics] Rename permissions a bit
Diffstat (limited to 'modules-available/statistics/page.inc.php')
-rw-r--r-- | modules-available/statistics/page.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 5fe4ebfa..e89180ed 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -170,7 +170,7 @@ class Page_Statistics extends Page $uuid = Request::post('uuid', '', 'string'); $locationid = Database::queryFirst('SELECT locationid FROM machine WHERE machineuuid = :uuid', array('uuid' => $uuid))['locationid']; - if (User::hasPermission("note", $locationid)) { + if (User::hasPermission("machine.note", $locationid)) { $text = Request::post('content', '', 'string'); if (empty($text)) { $text = null; @@ -207,7 +207,7 @@ class Page_Statistics extends Page $res = Database::simpleQuery('SELECT machineuuid, locationid FROM machine WHERE machineuuid IN (:ids)', compact('ids')); $ids = array_flip($ids); $delete = []; - $allowedLocations = User::getAllowedLocations("delete"); + $allowedLocations = User::getAllowedLocations("machine.delete"); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { if (in_array($row['locationid'], $allowedLocations)) { unset($ids[$row['machineuuid']]); @@ -629,7 +629,7 @@ class Page_Statistics extends Page . " $join WHERE $where $sort", $args); $rows = array(); $singleMachine = 'none'; - $deleteAllowedLocations = User::getAllowedLocations("delete"); + $deleteAllowedLocations = User::getAllowedLocations("machine.delete"); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { if ($singleMachine === 'none') { $singleMachine = $row['machineuuid']; @@ -1002,7 +1002,7 @@ class Page_Statistics extends Page )); } // Notes - $client["notesAllowed"] = User::hasPermission("note", $client["locationid"]); + $client["notesAllowed"] = User::hasPermission("machine.note", $client["locationid"]); Render::addTemplate('machine-notes', $client); } |