1
0
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:
David Sevilla Martín
2018-10-01 18:24:03 -04:00
committed by Franz Liedke
parent 2f3d9995d1
commit 711e775de7
2 changed files with 11 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ class Floodgate
*/
public function assertNotFlooding(User $actor)
{
if ($actor->can('postWithoutThrottle')) {
return;
}
if ($this->isFlooding($actor)) {
throw new FloodingException;
}