Commit Graph

8814 Commits

Author SHA1 Message Date
Jordie
a28de54405 Ban system and interface update (#41176)
Spiritual successor and extension to #17798, an almost entire rebuild of the SQL ban system backend and interface.
Bantypes are removed per #8584 and #6174. All bans are now 'role bans', server bans are when a ban's role is server. Admin bans are a column, meaning it's possible to ban admins from jobs.
Bans now have only an expiry datetime, duration is calculated from this when queried.
unbanned column is removed as it's superfluous, checking unban status is now done through checking unban_datetime. unban_round_id column added. Each ip and computerid columns rearranged so ip is always first, like in other tables. Bans now permit a null ckey, ip and computerid.

Ban checking is split into two procs now is_banned_from() does a check if a ckey is banned from one or more roles and returns true or false. This effectively replaces jobban_isbanned() used in simple if() statements. If connected a client's ban cache is checked rather than querying the DB. This makes it possible for a client connected to two or more servers to ignore any bans made on one server until their ban cache is rebuilt on the others. Could be avoided with cross-server calls to update ban caches or just the removal of the ban cache but as is I've done neither since I think it's enough of an edge case to not be worth it.
The second proc is is_banned_from_with_details(), this queries the DB for a role ban on a player's ckey, ip or CID and returns the details. This replaces direct queries in IsBanned.dm and the preferences menu.

The legacy ban system is removed.

The interfaces for banning, unbanning and editing bans have been remade to require less clicking and easier simultaneous operations. The banning and jobban panel are combined. They also store player connection details when opened so a client disconnecting no longer stops a ban being placed.

New banning panel:
Key, IP and CID can all be toggled to allow excluding them from a ban.
Checking Use IP and CID from last connection lets you enter only a ckey and have the DB fill these fields in for you, if possible.
Temporary bans have a drop-menu which lets you select between seconds, minutes, hours, days, weeks, months and years so you don't need to calculate how many minutes a long ban would be. The ban is still converted into minutes on the DB however.
Checking any of the head roles will check both of the boxes for you.
The red role box indicates there is already a ban on that role for this ckey. You can apply additional role bans to stack them.

New unbanning panel:
Unbanning panel is now separate from the banning panel but otherwise functionally the same.

Ban editing panel:
Actually just a modified banning panel, all the features from it work the same here.
You can now edit almost all parameters of a ban instead of just the reason.
You can't edit severity as it's not really part of the ban.
The panels have been tested but I've not been able to get my local server to be accessible so ban functionality isn't properly confirmed. Plenty of testing will be required as I'd rather not break bans.

cl
admin: Ban interface rework. The banning and unbanning panels have received a new design which is easier to use and allows multiple role bans to be made at once.
prefix: Ban search and unbanning moved to unbanning panel, which is now a separate panel to the old banning panel.
/cl
2018-12-04 20:48:17 +01:00
yogstation13-bot
7913aab7ba Automatic changelog generation #3746 [ci skip] 2018-12-04 02:32:39 +01:00
yogstation13-bot
162475553e Automatic changelog generation #3732 [ci skip] 2018-12-03 15:14:59 +01:00
yogstation13-bot
1cbf1f1dff Automatic changelog generation #3721 [ci skip] 2018-12-03 15:14:10 +01:00
yogstation13-bot
9f2fcd92e0 Automatic changelog generation #3736 [ci skip] 2018-12-03 15:12:32 +01:00
yogstation13-bot
0406edcee0 Automatic changelog generation #3740 [ci skip] 2018-12-03 14:57:56 +01:00
yogstation13-bot
5fa790dd2d Automatic changelog generation #3731 [ci skip] 2018-12-02 21:00:35 +01:00
yogstation13-bot
197b1784fd Automatic changelog generation #3725 [ci skip] 2018-12-02 18:10:25 +01:00
yogstation13-bot
92d3803494 Automatic changelog generation #3728 [ci skip] 2018-12-02 17:22:21 +01:00
yogstation13-bot
416a97b11b Automatic changelog generation #3727 [ci skip] 2018-12-02 16:50:34 +01:00
yogstation13-bot
cf5cf281fd Automatic changelog generation #3726 [ci skip] 2018-12-02 16:40:51 +01:00
yogstation13-bot
f06f6225bf Automatic changelog generation #3724 [ci skip] 2018-12-02 16:36:26 +01:00
yogstation13-bot
9d8e19551c Automatic changelog generation #3717 [ci skip] 2018-12-02 14:10:05 +01:00
yogstation13-bot
6802be484b Automatic changelog generation #3659 [ci skip] 2018-12-02 13:53:39 +01:00
yogstation13-bot
94f46e6ced Automatic changelog generation #3691 [ci skip] 2018-12-02 13:52:49 +01:00
yogstation13-bot
55c18ac23a Automatic changelog generation #3715 [ci skip] 2018-12-02 13:43:43 +01:00
yogstation13-bot
69f810e7a1 Automatic changelog generation #3714 [ci skip] 2018-12-02 13:42:34 +01:00
yogstation13-bot
78d2df1051 Automatic changelog generation #3713 [ci skip] 2018-12-02 13:41:39 +01:00
yogstation13-bot
c2c99d8e61 Automatic changelog generation #3712 [ci skip] 2018-12-02 13:40:11 +01:00
yogstation13-bot
59795e765d Automatic changelog generation #3711 [ci skip] 2018-12-02 13:38:53 +01:00
yogstation13-bot
2290d2966e Automatic changelog generation #3710 [ci skip] 2018-12-02 13:37:11 +01:00
yogstation13-bot
c0bffd5d5c Automatic changelog generation #3707 [ci skip] 2018-12-02 00:46:46 +01:00
yogstation13-bot
776b0648a8 Automatic changelog generation #3705 [ci skip] 2018-12-01 23:46:41 +01:00
yogstation13-bot
ed28923963 Automatic changelog generation #3703 [ci skip] 2018-12-01 20:41:02 +01:00
yogstation13-bot
101aceee9e Automatic changelog generation #3701 [ci skip] 2018-12-01 16:56:01 +01:00
yogstation13-bot
fe09443a03 Automatic changelog generation #3699 [ci skip] 2018-12-01 12:07:17 +01:00
yogstation13-bot
5a261faa31 Automatic changelog generation #3693 [ci skip] 2018-12-01 00:24:14 +01:00
yogstation13-bot
1983e51d5a Automatic changelog generation #3697 [ci skip] 2018-12-01 00:22:40 +01:00
yogstation13-bot
134087df3d Automatic changelog generation #3695 [ci skip] 2018-11-30 23:39:58 +01:00
yogstation13-bot
698bc62b1f Automatic changelog generation #3692 [ci skip] 2018-11-30 22:43:41 +01:00
yogstation13-bot
36fd411f3a Automatic changelog generation #3690 [ci skip] 2018-11-30 19:46:25 +01:00
yogstation13-bot
ea58e62094 Automatic changelog generation #3688 [ci skip] 2018-11-30 12:24:22 +01:00
yogstation13-bot
01a591b587 Automatic changelog generation #3687 [ci skip] 2018-11-30 12:23:57 +01:00
yogstation13-bot
cbc792d3b2 Automatic changelog generation #3686 [ci skip] 2018-11-30 12:23:27 +01:00
yogstation13-bot
f45d6df229 Automatic changelog generation #3668 [ci skip] 2018-11-29 17:24:23 +01:00
yogstation13-bot
1b90caaee6 Automatic changelog generation #3675 [ci skip] 2018-11-29 16:10:49 +01:00
yogstation13-bot
63a2e989a4 Automatic changelog generation #3674 [ci skip] 2018-11-29 16:06:17 +01:00
yogstation13-bot
5675ed4394 Automatic changelog generation #3673 [ci skip] 2018-11-29 16:00:26 +01:00
yogstation13-bot
2610ea5905 Automatic changelog generation #3670 [ci skip] 2018-11-29 15:59:08 +01:00
yogstation13-bot
0c8765719e Automatic changelog generation #3669 [ci skip] 2018-11-29 15:57:39 +01:00
yogstation13-bot
02a72f57a1 Automatic changelog generation #3564 [ci skip] 2018-11-29 02:50:10 +01:00
yogstation13-bot
2f37d0ad57 Automatic changelog generation #3651 [ci skip] 2018-11-29 02:31:02 +01:00
yogstation13-bot
be8acaada4 Automatic changelog generation #3658 [ci skip] 2018-11-29 02:05:51 +01:00
yogstation13-bot
0866db32cc Automatic changelog generation #3637 [ci skip] 2018-11-27 12:51:04 +01:00
yogstation13-bot
4f8a6282fa Automatic changelog generation #3648 [ci skip] 2018-11-27 12:49:48 +01:00
yogstation13-bot
8112835ef0 Automatic changelog generation #3650 [ci skip] 2018-11-27 12:19:03 +01:00
yogstation13-bot
5d4fd9697b Automatic changelog generation #3652 [ci skip] 2018-11-27 12:17:59 +01:00
yogstation13-bot
035a38d8b0 Automatic changelog generation #3644 [ci skip] 2018-11-27 08:40:41 +01:00
yogstation13-bot
74d8b01914 Automatic changelog generation #3633 [ci skip] 2018-11-25 18:52:37 +01:00
yogstation13-bot
2db1b6d2ec Automatic changelog generation #3636 [ci skip] 2018-11-25 18:52:18 +01:00