From f6f7b0dced336c89e437f713fffa125a095fdb9d Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Fri, 28 Nov 2025 08:02:28 +0100 Subject: [PATCH] Add UserPerm.PUNISHMENTS Improve PunishmentType needed permissions --- CommonCore/SQL/src/de/steamwar/sql/Punishment.kt | 8 ++++---- CommonCore/SQL/src/de/steamwar/sql/UserPerm.kt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/Punishment.kt b/CommonCore/SQL/src/de/steamwar/sql/Punishment.kt index 4eafce0c..d2ad06ba 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Punishment.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/Punishment.kt @@ -129,8 +129,8 @@ class Punishment(id: EntityID) : IntEntity(id) { val userPerm: UserPerm, val multi: Boolean = false ) { - Ban("BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN", UserPerm.TEAM), - Mute("MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE", UserPerm.TEAM), + Ban("BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN", UserPerm.PUNISHMENTS), + Mute("MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE", UserPerm.PUNISHMENTS), NoSchemReceiving( "NOSCHEMRECEIVING_TEAM", "NOSCHEMRECEIVING_PERMA", @@ -153,7 +153,7 @@ class Punishment(id: EntityID) : IntEntity(id) { "NOSCHEMSUBMITTING_UNTIL", "UNNOSCHEMSUBMITTING_ERROR", "UNNOSCHEMSUBMITTING", - UserPerm.TEAM + UserPerm.CHECK ), NoDevServer( "NODEVSERVER_TEAM", @@ -179,7 +179,7 @@ class Punishment(id: EntityID) : IntEntity(id) { "UNNOTEAMSERVER", UserPerm.MODERATION ), - Note("NOTE_TEAM", null, null, null, null, UserPerm.TEAM, true); + Note("NOTE_TEAM", null, null, null, null, UserPerm.PUNISHMENTS, true); fun isMulti() = multi } diff --git a/CommonCore/SQL/src/de/steamwar/sql/UserPerm.kt b/CommonCore/SQL/src/de/steamwar/sql/UserPerm.kt index a49b141a..9a9d37cf 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/UserPerm.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/UserPerm.kt @@ -47,6 +47,7 @@ enum class UserPerm { RESTRICTED_MODS, COLOR_CHAT, TEAM, + PUNISHMENTS, TICKET_LOG, BUILD, CHECK,