mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
Fix starting a discussion without tags, without global startDiscussion perm
This commit is contained in:
committed by
Alexander Skvortsov
parent
c2e5c1008f
commit
fe4803a07c
@@ -107,6 +107,10 @@ class SaveTagsToDatabase
|
||||
}
|
||||
}
|
||||
|
||||
if (! $discussion->exists && $primaryCount === 0 && $secondaryCount === 0 && ! $actor->hasPermission('startDiscussion')) {
|
||||
throw new PermissionDeniedException;
|
||||
}
|
||||
|
||||
$this->validateTagCount('primary', $primaryCount);
|
||||
$this->validateTagCount('secondary', $secondaryCount);
|
||||
|
||||
|
Reference in New Issue
Block a user