forked from leftypol/leftypol
Adds checks for mod permissions to delete posts in board
This commit is contained in:
parent
1bd809b9f0
commit
a3dee77f47
1 changed files with 6 additions and 2 deletions
8
post.php
8
post.php
|
@ -213,12 +213,16 @@ function handle_delete(){
|
||||||
// Check if board exists
|
// Check if board exists
|
||||||
if (!openBoard($_POST['board']))
|
if (!openBoard($_POST['board']))
|
||||||
error($config['error']['noboard']);
|
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
|
// Check if banned
|
||||||
checkBan($board['uri']);
|
checkBan($board['uri']);
|
||||||
|
|
||||||
// Check if deletion enabled
|
// Check if deletion is enabled
|
||||||
if (!$config['allow_delete'])
|
if (!$is_mod && !$config['allow_delete'])
|
||||||
error(_('Post deletion is not allowed!'));
|
error(_('Post deletion is not allowed!'));
|
||||||
|
|
||||||
if (empty($delete))
|
if (empty($delete))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue