-
Notifications
You must be signed in to change notification settings - Fork 30
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
Global bans and ban editing #854
Conversation
Blocked on #852 being merged. Once that's good-to-go, this will be too. |
4030861
to
8d089d6
Compare
81c0121
to
2edc797
Compare
9aac3ea
to
50d5f56
Compare
2edc797
to
d8b79c2
Compare
4b272b3
to
685eaa3
Compare
d8b79c2
to
06ce428
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question and in-line review comment. But I also went to test this locally and /internal.php/bans/set
just spat out several pages of PHP warnings; may be worth looking into? Otherwise things LGTM.
Here's what I have after some grepping:
This is from trying to create a new ban. |
Adds a "global" flag to the ban UI, though in practice this is just UI sugar for a nullable domain column. If domain is null, then the ban applies globally. If it's a domain ID, the ban applies in that domain only. Also adds a new ban type flag which is granted to tool roots only to allow setting global bans. Fixes #853
This is done as UI sugar around an unban followed by an immediate ban. This helps maintain the ban history for investigation of what happened to certain requests. Fixes #641
4daa0eb
to
2084e16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM and local testing revealed only a minor issue which I think can be deferred to a follow-up PR: The log for replacing a ban is not sent to IRC, so when a ban is replaced, it appears to IRC that a new ban has been set without affecting the old ban at all. The in-tool logs correctly reflect the replacement, however. I assume this is because \Waca\Pages\PageBan::replace()
doesn't issue a notification for the replacement after logging it. Also as a follow-up, I wonder if it would be beneficial to include the new ban ID as a comment for the ban replaced log entry?
(Note that message 3 got included twice in my screenshot below, somehow.)
Log entries which touch multiple objects are currently represented as multiple log entries in other places in the tool. A good example of this is sending a reservation. I don't like that approach, but it's also a larger change. #607 is related here. |
Implements global bans and ban editing