Simple permission handling

This commit is contained in:
Savetheinternet 2010-12-10 20:38:49 +11:00
parent 6d2813857e
commit 88c4ef787e
2 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,7 @@
define('ERROR_MISSEDAFIELD', 'Your browser didn\'t submit an input when it should have.', true); 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_REQUIRED', 'The %s field is required.', true);
define('ERROR_INVALIDFIELD', 'The %s field was invalid.', 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 // For resizing, max values
define('THUMB_WIDTH', 200, true); define('THUMB_WIDTH', 200, true);

View File

@ -65,6 +65,8 @@
) )
); );
} elseif(preg_match('/^\/new$/', $query)) { } elseif(preg_match('/^\/new$/', $query)) {
if($mod['type'] != MOD_ADMIN) error(ERROR_NOACCESS);
// New board // New board
$body = ''; $body = '';