mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
make sure all route binders use guard.
This commit is contained in:
@@ -38,9 +38,9 @@ class BudgetList implements BinderInterface
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public static function routeBinder(string $value, Route $route): Collection
|
||||
public static function routeBinder($guard, string $value, Route $route): Collection
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($guard->check()) {
|
||||
$list = [];
|
||||
$incoming = explode(',', $value);
|
||||
foreach ($incoming as $entry) {
|
||||
@@ -52,7 +52,7 @@ class BudgetList implements BinderInterface
|
||||
}
|
||||
|
||||
/** @var \Illuminate\Support\Collection $collection */
|
||||
$collection = auth()->user()->budgets()
|
||||
$collection = $guard->user()->budgets()
|
||||
->where('active', 1)
|
||||
->whereIn('id', $list)
|
||||
->get();
|
||||
|
||||
Reference in New Issue
Block a user