diff --git a/inc/config.php b/inc/config.php index 284692ce..832afffb 100644 --- a/inc/config.php +++ b/inc/config.php @@ -70,6 +70,7 @@ define('ERROR_MISSEDAFIELD', 'Your browser didn\'t submit an input when it should have.', true); define('ERROR_REQUIRED', 'The %s field is required.', true); define('ERROR_INVALIDFIELD', 'The %s field was invalid.', true); + define('ERROR_NOACCESS', 'You don\'t have permission to do that.', true); // For resizing, max values define('THUMB_WIDTH', 200, true); diff --git a/mod.php b/mod.php index 744755c6..5695ad8b 100644 --- a/mod.php +++ b/mod.php @@ -65,6 +65,8 @@ ) ); } elseif(preg_match('/^\/new$/', $query)) { + if($mod['type'] != MOD_ADMIN) error(ERROR_NOACCESS); + // New board $body = '';