mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Auto commit for release 'develop' on 2024-05-13
This commit is contained in:
@@ -28,23 +28,16 @@ use FireflyIII\User;
|
||||
|
||||
class AccountPolicy
|
||||
{
|
||||
|
||||
/**
|
||||
* TODO needs better authentication.
|
||||
*
|
||||
* @param User $user
|
||||
* @param Account $account
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function view(User $user, Account $account): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
return auth()->check() && $user->id === $account->user_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Everybody can do this, but selection should limit to user.
|
||||
*
|
||||
@@ -53,6 +46,7 @@ class AccountPolicy
|
||||
public function viewAny(): bool
|
||||
{
|
||||
return true;
|
||||
|
||||
return auth()->check();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user