diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-10 20:38:49 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-12-10 20:38:49 +1100 |
| commit | 88c4ef787e2ca0a954cfe41f60cb58eee461412b (patch) | |
| tree | b70ab1c7aec59cb6ff53b918f95bc62498c75634 | |
| parent | 6d2813857efa308ed295048f047ea45b698ac093 (diff) | |
Simple permission handling
| -rw-r--r-- | inc/config.php | 1 | ||||
| -rw-r--r-- | mod.php | 2 |
2 files changed, 3 insertions, 0 deletions
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); @@ -65,6 +65,8 @@ ) ); } elseif(preg_match('/^\/new$/', $query)) { + if($mod['type'] != MOD_ADMIN) error(ERROR_NOACCESS); + // New board $body = ''; |
