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:
@@ -56,11 +56,11 @@ class RuleGroup extends Model
|
||||
*
|
||||
* @return RuleGroup
|
||||
*/
|
||||
public static function routeBinder(string $value): RuleGroup
|
||||
public static function routeBinder($guard, string $value): RuleGroup
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($guard->check()) {
|
||||
$ruleGroupId = intval($value);
|
||||
$ruleGroup = auth()->user()->ruleGroups()->find($ruleGroupId);
|
||||
$ruleGroup = $guard->user()->ruleGroups()->find($ruleGroupId);
|
||||
if (!is_null($ruleGroup)) {
|
||||
return $ruleGroup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user