permissions: add perms for plugin loading (#10184)

Adds permission management for loading plugins

---------

Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
This commit is contained in:
Vaxry 2025-04-29 18:59:43 +02:00 committed by GitHub
parent 2118440488
commit 5bd7ff884d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 416 additions and 91 deletions

View file

@ -1789,18 +1789,7 @@ void CConfigManager::handlePluginLoads() {
return;
bool pluginsChanged = false;
auto failedPlugins = g_pPluginSystem->updateConfigPlugins(m_declaredPlugins, pluginsChanged);
if (!failedPlugins.empty()) {
std::stringstream error;
error << "Failed to load the following plugins:";
for (const auto& path : failedPlugins) {
error << "\n" << path;
}
g_pHyprError->queueCreate(error.str(), CHyprColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
}
g_pPluginSystem->updateConfigPlugins(m_declaredPlugins, pluginsChanged);
if (pluginsChanged) {
g_pHyprError->destroy();