Show context in polkit prompt

This commit is contained in:
David Heinemeier Hansson
2026-07-17 17:45:29 -07:00
parent 28d853402e
commit 73e5968c64
3 changed files with 47 additions and 1 deletions
+11
View File
@@ -11,6 +11,17 @@ assert(polkit.promptLooksFingerprint('Swipe your finger'), 'polkit detects finge
assert(polkit.promptLooksFingerprint('fprintd verification'), 'polkit detects fprint prompts')
assert(!polkit.promptLooksFingerprint('Password:'), 'polkit ignores password prompts')
assertEqual(
polkit.authorizationLabel("Authentication is needed to run `/usr/bin/true' as the super user"),
"Authorize running '/usr/bin/true'",
'polkit shortens the standard pkexec message'
)
assertEqual(
polkit.authorizationLabel('Authentication is required to change system settings'),
'Authentication is required to change system settings',
'polkit preserves custom authorization messages'
)
assert(
polkit.fingerprintFirstFromPamConfig(`
# comment