-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Labels
Milestone
Description
Lines 1502 to 1507 in 68070df
if ($msgOptions['approved']) { | |
$board->num_posts++; | |
$board->save(); | |
} else { | |
$board->unapproved_posts++; | |
$board->save(); |
This logic here triggers a permission error due to SMf\Board::save() checking permissions
Lines 505 to 507 in 68070df
public function save(array $boardOptions = []): void | |
{ | |
User::$me->isAllowedTo('manage_boards'); |
@Sesquipedalian, The best fix is to let save() ignore permission checks. But we should be careful about what we allow them to be saved when skipping a permission check. Or we do a separate SMF\Board::increase('msg', approved: true);
that can still issue this in a logical sense.
This was introduced in #8502