Add UserPerm.PUNISHMENTS

Improve PunishmentType needed permissions
This commit is contained in:
2025-11-28 08:02:28 +01:00
parent 5bdbf5dff4
commit f6f7b0dced
2 changed files with 5 additions and 4 deletions
@@ -129,8 +129,8 @@ class Punishment(id: EntityID<Int>) : 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<Int>) : IntEntity(id) {
"NOSCHEMSUBMITTING_UNTIL",
"UNNOSCHEMSUBMITTING_ERROR",
"UNNOSCHEMSUBMITTING",
UserPerm.TEAM
UserPerm.CHECK
),
NoDevServer(
"NODEVSERVER_TEAM",
@@ -179,7 +179,7 @@ class Punishment(id: EntityID<Int>) : 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
}
@@ -47,6 +47,7 @@ enum class UserPerm {
RESTRICTED_MODS,
COLOR_CHAT,
TEAM,
PUNISHMENTS,
TICKET_LOG,
BUILD,
CHECK,