diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/BuiltInPermissionServices.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/BuiltInPermissionServices.kt index e0c6f26ac..9a7279545 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/BuiltInPermissionServices.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/BuiltInPermissionServices.kt @@ -12,13 +12,10 @@ package net.mamoe.mirai.console.permission import net.mamoe.mirai.console.data.AutoSavePluginConfig import net.mamoe.mirai.console.data.PluginDataExtensions.withDefault import net.mamoe.mirai.console.data.value -import net.mamoe.mirai.console.data.valueFromKType import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.CopyOnWriteArrayList import kotlin.reflect.KClass import kotlin.reflect.KType -import kotlin.reflect.KTypeProjection -import kotlin.reflect.KVariance import kotlin.reflect.full.createType @@ -91,7 +88,7 @@ internal object BuiltInPermissionService : AbstractConcurrentPermissionService

get() = PermissionImpl::class - override val permissions: MutableMap get() = config.permissions + override val permissions: MutableMap = ConcurrentHashMap() @Suppress("UNCHECKED_CAST") override val grantedPermissionsMap: MutableMap> @@ -115,17 +112,6 @@ internal object BuiltInPermissionService : AbstractConcurrentPermissionService

- by valueFromKType>( - MutableMap::class.createType( - listOf( - KTypeProjection(KVariance.INVARIANT, PermissionId::class.createType()), - KTypeProjection(KVariance.INVARIANT, permissionType), - ) - ), - ConcurrentHashMap() - ) - public val grantedPermissionMap: MutableMap> by value>>(ConcurrentHashMap()) .withDefault { CopyOnWriteArrayList() }