mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:45:56 +00:00
add Handler_Administrative
This commit is contained in:
11
classes/handler/administrative.php
Normal file
11
classes/handler/administrative.php
Normal file
@@ -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
|
<?php
|
||||||
|
|
||||||
class Pref_System extends Handler_Protected {
|
class Pref_System extends Handler_Administrative {
|
||||||
|
|
||||||
private $log_page_limit = 15;
|
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) {
|
function csrf_ignore($method) {
|
||||||
$csrf_ignored = array("index");
|
$csrf_ignored = array("index");
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
class Pref_Users extends Handler_Protected {
|
class Pref_Users extends Handler_Administrative {
|
||||||
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) {
|
function csrf_ignore($method) {
|
||||||
$csrf_ignored = array("index", "userdetails");
|
$csrf_ignored = array("index", "userdetails");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user