feat(plugin-perms): enforce per-user plugin permissions on dispatch (VS-6) #20
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/plugin-permissions-vs-6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes the gap between the persistence layer (already wired) and the dispatch path (admin-only gate) for plugin permissions.
Changes
plugin_dispatch_allowed(state, user, is_admin, plugin_name): site-admin bypass, then permission intersection check againstuser.pluginPermissions.ControlIn::Plugindispatch arm: replaces the rawif !is_adminearly-return with the new gate; denied callers get aresult:"denied"ack.GetPluginPermissionsandSetPluginPermissions.PluginCatalog::for_test(manifests)test helper.Test plan
cargo test -p meshcentral-web --lib plugin_dispatch_allowed(5/5 passing).cargo check -p meshcentral-webclean.setpluginpermissions, confirm they can now invoke a Plugin that declares it.Closes VS-6.