Skip to content
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

Update ForbidBannedUser.php #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

serderovsh
Copy link

No description provided.

@serderovsh
Copy link
Author

Или как вариант, можно создать конфигурационный файл, куда можно прописать путь до страницы бана!

@antonkomarev
Copy link
Member

antonkomarev commented Apr 8, 2019

@serderovsh Я не хотел добавлять конфиг для Middleware, потому что проще создать их копию в app/Http/Middleware и под себя переписать логику. Что собственно обычно и делаю, потому что в одном проекте мне нужен редирект забаненного на определённую страницу, на другом невозможность вообще что либо делать, на третьем нужно убить сессию.

@antonkomarev
Copy link
Member

I agree with your PR, but I need more time to think about it. From name ForbidBannedUser it's more obvious that some kind of error page will be shown (for example 403 as you propose), but this is breaking change and couldn't be introduced only in next major version.
For now I recommend to copy-paste middleware to your application and change the logic.

@serderovsh
Copy link
Author

serderovsh commented Apr 8, 2019

@antonkomarev, Я так у себя в проекте и сделал.
Просто у default Middleware бесконечный редирект в случае бана, поэтому создал PR.

@maxillarious
Copy link

maxillarious commented Jun 3, 2020

@antonkomarev Is there any way:

When the user clicks a button, an unban link will be sent to that user's email address.

When the user clicks on the unban link or button it triggers a controller which trigger's this
$user->unban which unbans the user.

Thank you, Unable to pull a request.

@antonkomarev
Copy link
Member

@maxillarious this question is not related to this PR in any way, I've extracted it to separate issue: #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants