forked from science-ation/science-ation
Authenticate and check for superuser on all /super pages
This commit is contained in:
parent
ce9bb827ef
commit
5207e193fc
@ -23,7 +23,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
|
||||
//make sure backup/restore folder exists, and htaccess it to deny access
|
||||
if(!file_exists("../data/backuprestore"))
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
|
||||
send_header("Conferences Setup",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
|
||||
send_header("Science In A Box Super Configuration",
|
||||
array('Committee Main' => 'committee_main.php')
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
send_header("Language Packs",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'System Setup' => 'super/index.php')
|
||||
|
@ -22,6 +22,8 @@
|
||||
?>
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require("../user.inc.php");
|
||||
superuser_required();
|
||||
|
||||
$level=0;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
require_once("../config_editor.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
send_header("Year Rollover",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'System Setup' => 'super/index.php')
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'config');
|
||||
superuser_required();
|
||||
|
||||
send_header("SFIAB/SOIAB Super Configuration",
|
||||
array('Committee Main' => 'committee_main.php')
|
||||
|
@ -25,7 +25,7 @@
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
require_once("../config_editor.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
|
||||
//get the category, and if nothing is chosen, default to Global
|
||||
if($_GET['category']) $category=$_GET['category'];
|
||||
|
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require("../common.inc.php");
|
||||
require_once("../user.inc.php");
|
||||
user_auth_required('committee', 'super');
|
||||
superuser_required();
|
||||
send_header("Version Checker",
|
||||
array('Committee Main' => 'committee_main.php',
|
||||
'System Setup' => 'super/index.php')
|
||||
|
12
user.inc.php
12
user.inc.php
@ -658,4 +658,16 @@ function user_fair_login($u)
|
||||
$_SESSION['fairs_id'] = $u['fairs_id'];// == 'yes') ? true : false;
|
||||
}
|
||||
|
||||
function superuser_required() {
|
||||
//first, they have to be logged in
|
||||
user_auth_required();
|
||||
|
||||
//next, they need superuser
|
||||
if($_SESSION['superuser']!="yes") {
|
||||
send_header("Superuser access required");
|
||||
send_footer();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user