mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 01:38:49 -05:00
update: allow editors to bypass metadata rate limiter
This commit is contained in:
@@ -114,7 +114,12 @@ class SimilarTorrentController extends Controller
|
||||
/** @var Carbon $lastUpdated */
|
||||
$lastUpdated = cache()->get($cacheKey);
|
||||
|
||||
abort_if($lastUpdated !== null && $lastUpdated->addDay()->isFuture() && !$request->user()->group->is_modo, 403);
|
||||
abort_if(
|
||||
$lastUpdated !== null
|
||||
&& $lastUpdated->addDay()->isFuture()
|
||||
&& !($request->user()->group->is_modo || $request->user()->group->is_editor),
|
||||
403
|
||||
);
|
||||
|
||||
cache()->put($cacheKey, now(), now()->addDay());
|
||||
|
||||
@@ -127,7 +132,12 @@ class SimilarTorrentController extends Controller
|
||||
/** @var Carbon $lastUpdated */
|
||||
$lastUpdated = cache()->get($cacheKey);
|
||||
|
||||
abort_if($lastUpdated !== null && $lastUpdated->addDay()->isFuture() && !$request->user()->group->is_modo, 403);
|
||||
abort_if(
|
||||
$lastUpdated !== null
|
||||
&& $lastUpdated->addDay()->isFuture()
|
||||
&& !($request->user()->group->is_modo || $request->user()->group->is_editor),
|
||||
403
|
||||
);
|
||||
|
||||
cache()->put($cacheKey, now(), now()->addDay());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user