mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-06-14 19:46:11 +00:00
Compare commits
4 Commits
develop-20
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e75c24b45 | ||
|
|
677e952b45 | ||
|
|
ff5a7a8d22 | ||
|
|
f6af04ff4b |
@@ -28,6 +28,7 @@ use FireflyIII\Handlers\Observer\DeletedAccountObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
@@ -82,7 +83,7 @@ class Account extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function accountMeta(): HasMany
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Handlers\Observer\DeletedAttachmentObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -80,7 +81,7 @@ class Attachment extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Handlers\Observer\AvailableBudgetObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -81,7 +82,7 @@ class AvailableBudget extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function transactionCurrency(): BelongsTo
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Handlers\Observer\BillObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -100,7 +101,7 @@ class Bill extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -68,7 +69,7 @@ class Budget extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -27,6 +27,7 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Casts\SeparateTimezoneCaster;
|
||||
use FireflyIII\Handlers\Observer\BudgetLimitObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -70,7 +71,7 @@ class BudgetLimit extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function budget(): BelongsTo
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Handlers\Observer\DeletedCategoryObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -70,7 +71,7 @@ class Category extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Casts\SeparateTimezoneCaster;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@@ -61,7 +62,7 @@ class InvitedUser extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
|
||||
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -54,7 +55,7 @@ class LinkType extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function transactionJournalLinks(): HasMany
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -60,7 +61,7 @@ class ObjectGroup extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Models;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Handlers\Observer\PiggyBankObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -84,7 +85,7 @@ class PiggyBank extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function account(): BelongsTo
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@@ -96,7 +97,7 @@ class Preference extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
|
||||
@@ -30,6 +30,7 @@ use FireflyIII\Handlers\Observer\DeletedRecurrenceObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -94,7 +95,7 @@ class Recurrence extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Handlers\Observer\DeletedRuleObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -72,7 +73,7 @@ class Rule extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function ruleActions(): HasMany
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Handlers\Observer\DeletedRuleGroupObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -72,7 +73,7 @@ class RuleGroup extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function rules(): HasMany
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Handlers\Observer\DeletedTagObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -74,7 +75,7 @@ class Tag extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
@@ -64,7 +65,7 @@ class TransactionCurrency extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function budgetLimits(): HasMany
|
||||
|
||||
@@ -27,6 +27,7 @@ use FireflyIII\Handlers\Observer\DeletedTransactionGroupObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -83,7 +84,7 @@ class TransactionGroup extends Model
|
||||
}
|
||||
Log::debug('Found no group.');
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function transactionJournals(): HasMany
|
||||
|
||||
@@ -30,6 +30,7 @@ use FireflyIII\Handlers\Observer\DeletedTransactionJournalObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Attributes\Scope;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
@@ -111,7 +112,7 @@ class TransactionJournal extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function attachments(): MorphMany
|
||||
|
||||
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -61,7 +62,7 @@ class TransactionJournalLink extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function destination(): BelongsTo
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace FireflyIII\Models;
|
||||
|
||||
use FireflyIII\Enums\TransactionTypeEnum;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -50,7 +51,7 @@ class TransactionType extends Model
|
||||
public static function routeBinder(self|string $value): self
|
||||
{
|
||||
if (!auth()->check()) {
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
if ($value instanceof self) {
|
||||
$value = (string) $value->type;
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
@@ -69,7 +70,7 @@ class UserGroup extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Handlers\Observer\DeletedWebhookObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -152,7 +153,7 @@ class Webhook extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Models;
|
||||
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -60,7 +61,7 @@ class WebhookAttempt extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function webhookMessage(): BelongsTo
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Models;
|
||||
use FireflyIII\Handlers\Observer\DeletedWebhookMessageObserver;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -65,7 +66,7 @@ class WebhookMessage extends Model
|
||||
}
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException();
|
||||
throw new AuthenticationException();
|
||||
}
|
||||
|
||||
public function webhook(): BelongsTo
|
||||
|
||||
Reference in New Issue
Block a user