fix: a notification's Configure button no longer opens system settings
The kernel memory killer's "Memory Shortage Avoided" notice carried a Configure button that ran kcmshell6 and opened KDE's whole Notifications settings under the teacher's account. Reproduced in the lab. Plasma draws that button without consulting the Kiosk policy, but kcmshell6 and System Settings do: every settings module Debian 13's Plasma 6.3 installs (90) is now refused in the classroom's immutable kdeglobals, so the same click shows only "disabled by the system administrator". The clock's Configure Digital Clock goes with plasma/allow_configure_when_locked=false; Configure Audio Devices disappears on its own; the disabled window's Help button opened KDE Help Center, which the package now conflicts with (plasma-desktop only recommends it). The maintenance terminal runs outside the classroom's configuration and still opens every module, verified. converged-check fails if any module on a machine is ever left unrestricted: 126 passed in the lab. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3855989029
commit
cd798a33a1
@@ -370,6 +370,26 @@ check "device.conf carries the setting" 1 \
|
||||
"$(in_lab 'grep -c "^WONDERINK_ENABLED=" /etc/ekklesia-classroom/device.conf || true')"
|
||||
check "and it defaults to on" true \
|
||||
"$(in_lab 'sed -n "s/^WONDERINK_ENABLED=//p" /etc/ekklesia-classroom/device.conf')"
|
||||
# THE TEACHER CANNOT OPEN SYSTEM SETTINGS, AND THE MAINTENANCE TERMINAL CAN.
|
||||
# Every settings module this machine has must be refused in the classroom's
|
||||
# cascade — a notification's Configure button opens whichever one it names —
|
||||
# and none may be refused in the cascade the maintenance terminal uses.
|
||||
teacher_cascade() { in_lab "XDG_CONFIG_DIRS=/etc/ekklesia-classroom/xdg:/etc/xdg kreadconfig6 --file kdeglobals --group 'KDE Control Module Restrictions' --key $1 --default true 2>/dev/null"; }
|
||||
modules=$(in_lab 'find /usr/lib/x86_64-linux-gnu/qt6/plugins -path "*kcms*" -name "*.so" | sed "s#.*/##; s#\.so\$##" | sort')
|
||||
open_modules=$(for m in $modules; do [[ "$(teacher_cascade "$m")" == false ]] || echo "$m"; done | tr '\n' ' ')
|
||||
check "every settings module is refused to the teacher (unrestricted: ${open_modules:-none})" 0 \
|
||||
"$(wc -w <<< "$open_modules")"
|
||||
check "the notification settings the Configure button opens are among them" false \
|
||||
"$(teacher_cascade kcm_notifications)"
|
||||
check "but not to the maintenance terminal" true \
|
||||
"$(in_lab "XDG_CONFIG_DIRS=/etc/xdg kreadconfig6 --file kdeglobals --group 'KDE Control Module Restrictions' --key kcm_notifications --default true 2>/dev/null")"
|
||||
check "which still starts outside the classroom's configuration" 1 \
|
||||
"$(in_lab 'grep -c "XDG_CONFIG_DIRS=/etc/xdg konsole" /usr/local/bin/classroom-admin-terminal || true')"
|
||||
check "a locked panel offers no widget settings" false \
|
||||
"$(in_lab "XDG_CONFIG_DIRS=/etc/ekklesia-classroom/xdg:/etc/xdg kreadconfig6 --file kdeglobals --group 'KDE Action Restrictions' --key plasma/allow_configure_when_locked --default true 2>/dev/null")"
|
||||
check "and no help center is installed to open from a Help button" 0 \
|
||||
"$(in_lab 'dpkg -l khelpcenter 2>/dev/null | grep -c "^ii" || true')"
|
||||
|
||||
# One line the setting switches, since 0.2.3's one-setting-per-application
|
||||
# layout: var WONDERINK = true|false. This asked for the older marker
|
||||
# until 0.2.6.1 and so failed on every lab run in between.
|
||||
|
||||
Reference in New Issue
Block a user