diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt index 1482c2d3f..c75d6de2e 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/command/CommandOwner.kt @@ -10,7 +10,7 @@ package net.mamoe.mirai.console.command import net.mamoe.mirai.console.command.CommandManager.INSTANCE.unregisterAllCommands -import net.mamoe.mirai.console.permission.BasePermission +import net.mamoe.mirai.console.permission.AncestorPermission import net.mamoe.mirai.console.permission.ExperimentalPermission import net.mamoe.mirai.console.permission.PermissionId import net.mamoe.mirai.console.permission.PermissionIdNamespace @@ -40,7 +40,8 @@ public interface CommandOwner : PermissionIdNamespace { */ internal object ConsoleCommandOwner : CommandOwner { @ExperimentalPermission - override val basePermission: PermissionId get() = BasePermission.id + override val basePermission: PermissionId + get() = AncestorPermission.id @ExperimentalPermission override fun permissionId(id: String): PermissionId = PermissionId("console", id) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/AbstractConcurrentPermissionService.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/AbstractConcurrentPermissionService.kt index 5bfd5f14d..8b3ccd7c6 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/AbstractConcurrentPermissionService.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/AbstractConcurrentPermissionService.kt @@ -23,7 +23,7 @@ public abstract class AbstractConcurrentPermissionService
: Perm
protected abstract fun createPermission(
id: PermissionId,
description: String,
- base: PermissionId = BasePermission.id
+ base: PermissionId = AncestorPermission.id
): P
override fun get(id: PermissionId): P? = permissions[id]
diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt
index 2abbeae7c..3385f4cc9 100644
--- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt
+++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/permission/Permission.kt
@@ -29,7 +29,7 @@ public interface Permission {
* 所有权限的父权限.
*/
@ExperimentalPermission
-public object BasePermission :
+public object AncestorPermission :
Permission {
override val id: PermissionId = PermissionId("*", "*")
override val description: String get() = "The parent of any permission"
@@ -52,5 +52,5 @@ public fun Permission.parentsWithSelfSequence(): Sequence {
public fun register(
id: PermissionId,
description: String,
- base: PermissionId = BasePermission.id
+ base: PermissionId = AncestorPermission.id
): P
///////////////////////////////////////////////////////////////////////////