更改权限

This commit is contained in:
雅诺狐
2025-09-21 13:09:29 +08:00
parent bd94ce1ce5
commit df809b6dc3
8 changed files with 235 additions and 660 deletions

View File

@@ -548,11 +548,13 @@ class PluginManagementPlugin(BasePlugin):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# 注册权限节点
permission_api.register_permission_node(
"plugin.management.admin",
"插件管理:可以管理插件和组件的加载、卸载、启用、禁用等操作",
"plugin_management",
False,
async def on_plugin_loaded(self):
await permission_api.register_permission_node(
"plugin.management.admin",
"插件管理:可以管理插件和组件的加载、卸载、启用、禁用等操作",
"plugin_management",
False,
)
def get_plugin_components(self) -> List[Tuple[PlusCommandInfo, Type[PlusCommand]]]: