Face unlock window steps aside while Apply asks for the password
CI / test (push) Canceled after 3m23s
CI / test (push) Canceled after 3m23s
After Apply the window kept the keyboard and the pointer and its dimmed card covered the screen, so a password dialog that isn't Chandra's own (another polkit agent's window) couldn't be reached. While Apply waits, the window now shows only a note at the top and takes no input. A refused or cancelled password brings it back with the snaps and marks kept (chandra-face camera restarts the camera instead of exiting) and says so. Test: snaps, Enter, the password dialog gets typing (Space no longer snaps underneath) and the Authenticate click, then the root step finishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
8 files changed
+150
-8
No files matched your search
+6
-2
@@ -669,6 +669,7 @@ def cmd_camera(cfg, user, label, out, cfg_path, no_elevate):
|
||||
about 12 a second; the box is -1s without one face), `snap ID W H LEN` + RGB (a kept snap,
|
||||
cropped to the face), `info` / `error` / `done` lines, `applied CODE` at the end of an apply.
|
||||
In (stdin lines): `snap`, `drop ID`, `apply REMOVE-IDS` (comma-separated, may be empty), `quit`.
|
||||
After a failed apply (no password, say) the camera starts again and the snaps are kept.
|
||||
The pictures stay in this process's memory: nothing is written to disk; only the embeddings
|
||||
of the snaps kept go to the root `apply`, through a pipe."""
|
||||
check_user(user)
|
||||
@@ -733,7 +734,10 @@ def cmd_camera(cfg, user, label, out, cfg_path, no_elevate):
|
||||
"remove": removes}
|
||||
code = run_apply(cfg, user, out, req, cfg_path, no_elevate)
|
||||
out.emit("applied", str(code))
|
||||
return code
|
||||
if code == 0:
|
||||
return 0
|
||||
# The password was refused or cancelled: back to the camera, snaps kept.
|
||||
cam = open_camera(cfg, loop=True)
|
||||
finally:
|
||||
if cam is not None:
|
||||
cam.close()
|
||||
@@ -793,7 +797,7 @@ def run_apply(cfg, user, out, req, cfg_path, no_elevate):
|
||||
sys.stdout.flush()
|
||||
code = p.wait()
|
||||
if not said:
|
||||
out.error("Nothing changed")
|
||||
out.error("Nothing changed: the administrator password wasn't given")
|
||||
return code or 1
|
||||
return code
|
||||
|
||||
|
||||
Reference in new issue
Block a user