]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Stable to master (#42599)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 23 Jan 2026 14:34:23 +0000 (15:34 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Jan 2026 14:34:23 +0000 (15:34 +0100)
commit29b7fc4463c81a6d7d258d97e538652836509735
tree09c491039bb6b626e137047e76aadb233aa27f57
parentfacd7da3942f8304d5b73f7fa9d7a70cd3eff42d
Stable to master (#42599)

Ban database refactor (#42495)

* Ban DB refactor seems to work at a basic level for PostgreSQL

* New ban creation API

Supports all the new functionality (multiple players/addresses/hwids/roles/rounds per ban).

* Make the migration irreversible

* Re-implement ban notifications

The server ID check is no longer done as admins may want to place bans spanning multiple rounds irrelevant of the source server.

* Fix some split query warnings

* Implement migration on SQLite

* More comments

* Remove required from ban reason

SS14.Admin changes would like this

* More missing AsSplitQuery() calls

* Fix missing ban type filter

* Fix old CreateServerBan API with permanent time

* Fix department and role ban commands with permanent time

* Re-add banhits navigation property

Dropped this on accident, SS14.Admin needs it.

* More ban API fixes.

* Don't fetch ban exemption info for role bans

Not relevant, reduces query performance

* Regenerate migrations

* Fix adminnotes command for players that never connected

Would blow up handling null player records. Not a new bug introduced by the refactor, but I ran into it.

* Great shame... I accidentally committed submodule update...

* Update GDPR scripts

* Fix sandbox violation

* Fix bans with duplicate info causing DB exceptions

Most notably happened with role bans, as multiple departments may include the same role.
65 files changed:
Content.Client/Administration/UI/BanList/BanListEui.cs
Content.Client/Administration/UI/BanList/Bans/BanListControl.xaml.cs
Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml.cs
Content.Client/Administration/UI/BanList/IBanListLine.cs
Content.Client/Administration/UI/BanList/RoleBans/RoleBanListControl.xaml.cs
Content.Client/Administration/UI/BanList/RoleBans/RoleBanListLine.xaml.cs
Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs
Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml.cs
Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
Content.IntegrationTests/Tests/Commands/PardonCommand.cs
Content.Server.Database/Migrations/Postgres/20260120200503_BanRefactor.Designer.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Postgres/20260120200503_BanRefactor.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Postgres/PostgresServerDbContextModelSnapshot.cs
Content.Server.Database/Migrations/Sqlite/20260120200455_BanRefactor.Designer.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Sqlite/20260120200455_BanRefactor.cs [new file with mode: 0644]
Content.Server.Database/Migrations/Sqlite/SqliteServerDbContextModelSnapshot.cs
Content.Server.Database/Model.Ban.cs [new file with mode: 0644]
Content.Server.Database/Model.cs
Content.Server.Database/ModelPostgres.cs
Content.Server.Database/ModelSqlite.cs
Content.Server/Administration/BanList/BanListEui.cs
Content.Server/Administration/BanPanelEui.cs
Content.Server/Administration/Commands/BanCommand.cs
Content.Server/Administration/Commands/BanListCommand.cs
Content.Server/Administration/Commands/DepartmentBanCommand.cs
Content.Server/Administration/Commands/OpenAdminNotesCommand.cs
Content.Server/Administration/Commands/PardonCommand.cs
Content.Server/Administration/Commands/RoleBanCommand.cs
Content.Server/Administration/Commands/RoleBanListCommand.cs
Content.Server/Administration/Managers/BanManager.Notification.cs
Content.Server/Administration/Managers/BanManager.cs
Content.Server/Administration/Managers/IBanManager.cs
Content.Server/Administration/Notes/AdminNotesEui.cs
Content.Server/Administration/Notes/AdminNotesExtensions.cs
Content.Server/Administration/Notes/AdminNotesManager.cs
Content.Server/Administration/Notes/IAdminNotesManager.cs
Content.Server/Administration/PlayerPanelEui.cs
Content.Server/Administration/Systems/BwoinkSystem.cs
Content.Server/Connection/ConnectionManager.cs
Content.Server/Database/BanDef.cs [new file with mode: 0644]
Content.Server/Database/BanMatcher.cs
Content.Server/Database/DatabaseRecords.cs
Content.Server/Database/EFCoreExtensions.cs [new file with mode: 0644]
Content.Server/Database/ServerBanDef.cs [deleted file]
Content.Server/Database/ServerDbBase.cs
Content.Server/Database/ServerDbManager.cs
Content.Server/Database/ServerDbPostgres.cs
Content.Server/Database/ServerDbSqlite.cs
Content.Server/Database/ServerRoleBanDef.cs [deleted file]
Content.Server/Database/ServerRoleUnbanDef.cs [deleted file]
Content.Server/Database/UnbanDef.cs [moved from Content.Server/Database/ServerUnbanDef.cs with 72% similarity]
Content.Server/IP/IPAddressExt.cs
Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs
Content.Shared.Database/Bans.cs [new file with mode: 0644]
Content.Shared/Administration/BanList/BanListEuiState.cs
Content.Shared/Administration/BanList/SharedBan.cs [new file with mode: 0644]
Content.Shared/Administration/BanList/SharedServerBan.cs [deleted file]
Content.Shared/Administration/BanList/SharedServerRoleBan.cs [deleted file]
Content.Shared/Administration/BanList/SharedUnban.cs [moved from Content.Shared/Administration/BanList/SharedServerUnban.cs with 81% similarity]
Content.Shared/Administration/Notes/SharedAdminNote.cs
Content.Shared/Players/MsgRoleBans.cs
Resources/Locale/en-US/job/role-ban-command.ftl
Resources/engineCommandPerms.yml
Tools/dump_user_data.py
Tools/erase_user_data.py