mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Also fix rule group.
This commit is contained in:
parent
5ac88623ed
commit
20941dedd3
@ -12,6 +12,7 @@ namespace FireflyIII\Http\Controllers;
|
||||
use Auth;
|
||||
use FireflyIII\Http\Requests;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use View;
|
||||
|
||||
/**
|
||||
@ -49,4 +50,11 @@ class RuleController extends Controller
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RuleGroup $ruleGroup
|
||||
*/
|
||||
public function editRuleGroup(RuleGroup $ruleGroup) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,9 @@
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Auth;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class RuleGroup
|
||||
@ -45,4 +47,19 @@ class RuleGroup extends Model
|
||||
{
|
||||
return $this->hasMany('FireflyIII\Models\Rule');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RuleGroup $value
|
||||
*
|
||||
* @return Rule
|
||||
*/
|
||||
public static function routeBinder(RuleGroup $value)
|
||||
{
|
||||
if (Auth::check()) {
|
||||
if ($value->user_id == Auth::user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
throw new NotFoundHttpException;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user