Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions shell/shell.qml
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,15 @@ ShellRoot {
return shell.pluginRegistry.installedPlugins[id] || null
}

// File-based bar widgets get this facade instead of createScopedPluginShell.
// PluginShellApi.serviceFor() is unconditionally null unless _serviceLookup
// is set, so own-service panels silently no-op without it (#11949).
var api = pluginShellApiComponent.createObject(null, {
pluginId: target,
barConfig: shell.publicBarConfig(),
_serviceLookup: function(requestedId) {
return shell.pluginServiceFor(target, requestedId)
},
_summon: function(requestedId, payloadJson) {
if (!owns(requestedId)
&& !shell.pluginCloneMaySummon(currentManifest(), requestedId)) return false
Expand Down
5 changes: 5 additions & 0 deletions test/shell.d/plugin-auth-boundary-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ qml_matches "$shell_qml" 'allowOwnService *&& *shell\.pluginOwnsTarget\( *key, *
fail "cloned widgets cannot use a source id to reach their own service"
pass "service facades resolve enabled clones without widening replacement-bar access"

tr '\n\r\t' ' ' <<<"$bar_entry_shell" |
grep -Eq '_serviceLookup: *function\( *requestedId *\) *\{ *return shell\.pluginServiceFor\( *target, *requestedId *\)' ||
fail "bar-entry PluginShellApi does not wire service lookup for the hosted plugin"
pass "bar-entry PluginShellApi wires service lookup for the hosted plugin"

require_compositor "plugin authentication boundary runtime test"

if ! command -v quickshell >/dev/null 2>&1; then
Expand Down