Adds checks for mod permissions to delete posts in board
This commit is contained in:
parent
8c842362bb
commit
c838a10bce
8
post.php
8
post.php
|
@ -214,11 +214,15 @@ function handle_delete(){
|
|||
if (!openBoard($_POST['board']))
|
||||
error($config['error']['noboard']);
|
||||
|
||||
// Check if mod has permission to delete posts in this board
|
||||
if ($is_mod && !hasPermission($config['mod']['delete'], $board))
|
||||
error($config['error']['noaccess']);
|
||||
|
||||
// Check if banned
|
||||
checkBan($board['uri']);
|
||||
|
||||
// Check if deletion enabled
|
||||
if (!$config['allow_delete'])
|
||||
// Check if deletion is enabled
|
||||
if (!$is_mod && !$config['allow_delete'])
|
||||
error(_('Post deletion is not allowed!'));
|
||||
|
||||
if (empty($delete))
|
||||
|
|
Loading…
Reference in New Issue