add Handler_Administrative

master
Andrew Dolgov 3 years ago
parent 33ea46c2bc
commit 0b7377238a

@ -0,0 +1,11 @@
<?php
class Handler_Administrative extends Handler_Protected {
function before($method) {
if (parent::before($method)) {
if (($_SESSION["access_level"] ?? 0) >= 10) {
return true;
}
}
return false;
}
}

@ -1,20 +1,9 @@
<?php
class Pref_System extends Handler_Protected {
class Pref_System extends Handler_Administrative {
private $log_page_limit = 15;
function before($method) {
if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
}
return true;
}
return false;
}
function csrf_ignore($method) {
$csrf_ignored = array("index");

@ -1,16 +1,5 @@
<?php
class Pref_Users extends Handler_Protected {
function before($method) {
if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
}
return true;
}
return false;
}
class Pref_Users extends Handler_Administrative {
function csrf_ignore($method) {
$csrf_ignored = array("index", "userdetails");

Loading…
Cancel
Save