-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable admin? #329
Comments
add a middleware which will check your field and then add this to middleware group or admin config |
Would you mind to detail that? I'm not so good in middlewares... |
you can generate middleware with artisan, and inside just check using your facade (in my case it's AdminAuth) if your user field is_active is false and return abort(403) or redirect, or whatever you want |
This is what I've tried, and I'm getting redirect loop after trying to login with disabled user...
|
I've got custom Admin model (v3) that has is_active field. I can edit admins nicely using the admin forms. Question is: how do I add check for is_active = 1 to login process? I want to be able to disable some admins without deleting them...
The text was updated successfully, but these errors were encountered: