fix plugin auth_level

This commit is contained in:
InfinityPacer
2024-06-20 17:44:55 +08:00
parent 6392ee627f
commit 9f0ed49d43
2 changed files with 9 additions and 0 deletions

View File

@ -158,6 +158,11 @@ class PluginManager(metaclass=Singleton):
if pid and plugin_id != pid:
continue
try:
# 如果插件具有认证级别且当前认证级别不足,则不进行实例化
if hasattr(plugin, "auth_level"):
plugin.auth_level = plugin.auth_level
if self.siteshelper.auth_level < plugin.auth_level:
continue
# 存储Class
self._plugins[plugin_id] = plugin
# 未安装的不加载