mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
Expand tests and fix various small issues in strict comparison.
This commit is contained in:
@@ -116,7 +116,7 @@ class Account extends Model
|
||||
{
|
||||
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class Attachment extends Model
|
||||
{
|
||||
if (auth()->check()) {
|
||||
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class Bill extends Model
|
||||
public static function routeBinder(Bill $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class Budget extends Model
|
||||
public static function routeBinder(Budget $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class Category extends Model
|
||||
public static function routeBinder(Category $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class Rule extends Model
|
||||
public static function routeBinder(Rule $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class RuleGroup extends Model
|
||||
public static function routeBinder(RuleGroup $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class Tag extends Model
|
||||
public static function routeBinder(Tag $value)
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ($value->user_id === auth()->user()->id) {
|
||||
if (intval($value->user_id) === auth()->user()->id) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user