Forbidden after registration
hi all, my App Panel look like this:
and inside model
User
i use MustVerifyEmail
why after registration i obtain a 403 Forbidden page and even after i click on email verification ?
thanks11 Replies
Have you setup the canAcceePanel on the user model
if its production env, you should implement FilamentUser on User model and create canAccessPanel method
yes i have a
canAccessPanel
method. here it is :
And for the option being hit, what is the response? Is it false as that would cause your 403
i've just put dd here:
and that was hitted. But if i delete dd i obtain 403 Forbidden. Another info: after i click the email confirmation link i obtain a 403 Forbidden
Do DD
return $this->email == $this->hasVerifiedEmail() && $this->hasRole('agency');
is it false by any chance.
just done, this is false yes
There is your problem. So dump on each till you see what the cause is as filament is working, your checks are doing what they are coded to do.
but after registration i suppose that would be false. But the werid thing is after click the "email verification" button
yes, maybe i have to present the user a custom thank you page after registration telling him to check his mailbox.
But after email verification is very strange....anyway check better and give you a feedback
Welcome
to make the things work. I do this: