Auto commit for release 'develop' on 2024-05-13

This commit is contained in:
github-actions
2024-05-13 05:10:16 +02:00
parent 04fe5d1fc4
commit cb5d856769
48 changed files with 271 additions and 398 deletions

View File

@@ -23,22 +23,17 @@ declare(strict_types=1);
namespace FireflyIII\Policies;
use FireflyIII\Models\Account;
use FireflyIII\User;
class UserPolicy
{
/**
* TODO needs better authentication.
*
* @param User $user
* @param Account $account
*
* @return bool
*/
public function view(User $user, User $user1): bool
{
return true;
return auth()->check() && $user->id === $account->user_id;
}
@@ -50,11 +45,14 @@ class UserPolicy
public function viewAny(): bool
{
return true;
return auth()->check();
}
public function viewAccounts(User $user): bool
{
return true;
return auth()->check();
}
}