Repository navigation
feat(browser): open unreadable local folders as administrator - #1837
Conversation
Folders the user can't read or enter show a lock icon. Opening one switches the tab to its admin:// form, where GVfs asks polkit for administrator access. Permission errors offer Open as Administrator in the error dialog and on the column and pane error pages. A dismissed or refused polkit prompt is silent. Admin listings show an Administrator breadcrumb root and a notice that changes are made as root. Refs #1836
GVfs's admin backend has no trash operation but reports can-trash, so admin columns report Trash as unavailable up front. Delete opens the local permanent-delete confirmation with the reason, the sidebar Trash refuses drops from admin folders, copies and merges into them record no Trash-based undo, a confirmed Replace overwrites a file in place, and Merge is not offered there. Refs #1836
Files in admin folders get no thumbnails, so root-only images never land in the user's thumbnail cache. Open, Open With and the Open With shortcut explain that other apps can't open them instead: GVfs grants the admin mount only to the process that asked for it. Refs #1836
Metadata fills patch bound rows without rebinding them, so a folder the fill finds unreadable now swaps to the lock icon and its accessible description in Columns, List and Icons. A click in Columns opens a folder, so it goes through the same administrator redirect as Enter. Refs #1836
ReviewMerged Fixed: the merge brought two new Reviewed the full diff against the updated Tests: every test the PR adds exercises observable behaviour (error mapping, metadata marking on a 000 folder, activation routes, undo policy, URI escaping, mount-error classification, delete confirmation, restore exclusion, the QA description wait); none removed. Comments: all added comments explain GVfs/polkit constraints or non-obvious policy; none removed. Non-blocking notes
Local verification (review worktree on the merged head)
CI: the PR is a draft, so the |
…ss node; regenerate indexes Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23ABVQmsKTvBAiWPnosE
Description
Strata can now open local folders the user can't read, such as a backup tool's root-owned folder on an external drive, through GVfs's
admin://backend, as GNOME Files does. Polkit asks for the password, and Strata itself never runs as root.folder-lock) and are described as "Folder that requires administrator access". The background metadata fill learns this withaccess(2), and bound rows refresh in place in all three views.admin://form. That means the click that opens folders, Enter, → or the context menu's Open. Validation runs the first admin operation, so polkit prompts while the current folder is still open.PERMISSION_DENIED, both when mounting and on each operation. Strata treats that as "not authorized" and stays silent. It never shows its own password form foradmin://.admin://. The button is offered only where GIO supports the scheme, and never in the system file chooser.access::can-trashbut has no trash operation, so admin columns report Trash as unavailable up front:~/.cache/thumbnails.docs/administrator-access.md, with the Trash, keyboard and 10xer docs and the README updated. New strings are translated into all twelve languages.Known limitations
GVolumeMonitorandg_file_find_enclosing_mountdon't see it.Visual evidence
N/A: agents can't attach images. The lock icon, Administrator breadcrumb and notice are described above.
How to test
sudo mkdir /run/media/$USER/<drive>/backups && sudo chmod 700 /run/media/$USER/<drive>/backups.backupsshows a lock icon.backupsand cancel the polkit prompt.backupswith ↓/↑.Expected result:
admin:///run/media/$USER/<drive>/backups, with an Administrator breadcrumb root and the "Browsing as administrator" notice.Related issue
Closes #1836