Flip the request requirements

This commit is contained in:
David Bomba 2022-11-14 11:08:13 +11:00
parent 43525c79db
commit 700ba00c21

View File

@ -26,7 +26,7 @@ class UpdateAccountRequest extends Request
*/ */
public function authorize() public function authorize()
{ {
return (auth()->user()->isAdmin() || auth()->user()->isOwner()) && ($this->account->id == auth()->user()->account_id); return (auth()->user()->isAdmin() || auth()->user()->isOwner()) && ($this->account->id == auth()->user()->token()->account_id);
} }
/** /**