hotfix for news page accessible by all users
This commit is contained in:
parent
279971cd19
commit
4eaa2c8d37
@ -3,6 +3,12 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
|
// Check user to ensure they are admin
|
||||||
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
header("HTTP/1.1 404 Page not found");
|
||||||
|
die("404 Page not found");
|
||||||
|
}
|
||||||
|
|
||||||
// Include markdown library
|
// Include markdown library
|
||||||
use \Michelf\Markdown;
|
use \Michelf\Markdown;
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,12 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
|
// Check user to ensure they are admin
|
||||||
|
if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
||||||
|
header("HTTP/1.1 404 Page not found");
|
||||||
|
die("404 Page not found");
|
||||||
|
}
|
||||||
|
|
||||||
// Include markdown library
|
// Include markdown library
|
||||||
use \Michelf\Markdown;
|
use \Michelf\Markdown;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user