mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Add permission to bypass throttling
This commit is contained in:
committed by
Franz Liedke
parent
2f3d9995d1
commit
711e775de7
@@ -33,6 +33,10 @@ class Floodgate
|
||||
*/
|
||||
public function assertNotFlooding(User $actor)
|
||||
{
|
||||
if ($actor->can('postWithoutThrottle')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->isFlooding($actor)) {
|
||||
throw new FloodingException;
|
||||
}
|
||||
|
Reference in New Issue
Block a user