Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit d4f62f8

Browse files
committed
Support new accessarea file-based structure
1 parent 9b64765 commit d4f62f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HashidsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function unhashId($value)
5858
*/
5959
protected function shouldBeHashed(): bool
6060
{
61-
$accessareas = (array) $this->obscure + app('accessareas')->where('is_obscured', true)->pluck('slug')->toArray();
61+
$accessareas = app('accessareas')->active()->obscured()->keys()->when($this->obscure, fn($collection) => $collection->merge(collect($this->obscure)->intersect(app('accessareas')->active()->keys()))->unique())->toArray();
6262

6363
return in_array(request()->accessarea(), $accessareas) && in_array($this->getRouteKeyName(), config('cortex.foundation.obscure.hashed_keys'));
6464
}

0 commit comments

Comments
 (0)