Repository navigation
feat(viewer): show and edit the admin registers, the audit category map and the access delay (#6643) - #6692
Open
rubentalstra wants to merge 50 commits into
Open
feat(viewer): show and edit the admin registers, the audit category map and the access delay (#6643)#6692rubentalstra wants to merge 50 commits into
rubentalstra wants to merge 50 commits into
Conversation
A new Access policy page in the console group draws the controller's ACCESS_POLICY in force by section, each coded value with its rubric and code; its Versions tab lists every version and opens any one read-only; an administrator edits the whole policy in the code editor, saved with If-Match naming the version read (If-None-Match: * for the first). While none is committed the page says nothing is tightened; a 403 and an admin API that is off are drawn as such. The recorder of the replayed CDR provisions its user with the four arguments scim-provision.sh takes, takes its container name from the environment, and seeds two versions of the policy under a write_access_policy grant its own test ceiling admits; the e2e lane seeds the same for its journey.
…ave words The access policy editor, Edit as a new version and the party editors share Unsaved, editor_line, save_as_words and reload_words in pages::common, and Access policy words an attribute as Configuration does; the book page names its audience.
…hic class (#6644) The allow line for the AQL the viewer sends the CDR matches each FROM root AQL defines, EHR and the demographic classes, so the roles and grants queries pass and any other string that starts with SELECT is still read.
…carer (#6646) An EHR's Care tab lists its subject's care relationships, live ones by default and ended ones on request; a party's Care page shows the same for a PERSON with the form that adds one, and the subjects in a carer's care, paged in the session; a relationship's page shows its versions and changes its role or period, ends it today or deletes it, each with If-Match. The recorder seeds the subject's PERSON with three care relationships and the provider ORGANISATION the dev binding names.
pages::common may not grow past its recorded length, so the editor helpers move to a module of their own.
…ap and the access delay (#6643) The Access policy area has a tab for each admin register: the version in force drawn by its members, the history back to version 0, any version opened read-only, and an editor saving with If-Match. The recorder commits a version of the access delay over the default.
rubentalstra
enabled auto-merge
November 26, 2026 12:59
…ver a version pages::editor::document_form docks the decision bar and draws the refusal, the code editor and its findings; the access policy editor takes it, and Access policy reads an instant through one pages::policy::instant.
…ink and one relationship URL
…he care journey an end date The EHR now draws six tabs, so FerroUI shows a select in place of the row on a phone; the journey's care relationship needs an end, since the e2e access policy holds no relationship_validity default for an open one.
# Conflicts: # app/ferroehr-viewer/locales/policy/en/policy.ftl # app/ferroehr-viewer/locales/shell/en/shell.ftl # app/ferroehr-viewer/src/locale/policy.rs # app/ferroehr-viewer/src/pages/policy/mod.rs # app/ferroehr-viewer/src/routes.rs # app/ferroehr-viewer/src/shell.rs # app/ferroehr-viewer/tests/fixtures/cdr/manifest.json # app/ferroehr-viewer/tests/fixtures/cdr/recording.json # app/ferroehr-viewer/tests/it/e2e_docs_shots.rs # app/ferroehr-viewer/tests/it/ssr_app.rs # scripts/viewer-record.sh # website/book/src/viewer/access-control.md # website/book/src/viewer/index.md
…must be written with an end
…ey ends the relationship
…tionships # Conflicts: # app/ferroehr-viewer/src/bff/mod.rs
# Conflicts: # app/ferroehr-viewer/src/locale.rs # scripts/checks/stray-literals.allow
…registers # Conflicts: # app/ferroehr-viewer/src/bff/mod.rs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6643
This branch builds on #6687 (#6646), which builds on #6683 and #6669. It carries their commits until they merge. Review only the commits after #6687.
The Access policy area gains a tab for each admin register: Audit categories (
audit-categories) and Access delay (access-delay). Both readGET {ext}/admin/registers/{register}and/history. No openEHR specification governs the registers: this is FerroEHR's own design.Register tab: the version in force with its committer and commit time. Version 0 says it is the default no one committed. The document is drawn by its members:
enabled,categories,max_delay;shipped_map,national,templates,archetypes, each template or archetype with its categories ornone.The whole document follows the members.
History: every version, newest first, ending with version 0. Each opens read-only at
?version=Nwith a notice and no edit.Edit the register (
/access-policy/registers/{register}/edit) replaces the document in the code editor and saves withIf-Matchnaming the version opened. A400or412is drawn beside the editor in the CDR's words, with the document kept and a reload offered after a conflict.Refusals: a
403says the account may not read the register. A405says the admin API is off, so this cannot be read here; that message is now worded for the whole Access policy area.The recorder commits a version of the access delay over the default, so the history holds two versions.
Tests
ssr_app::registersruns over the re-recorded CDR. It covers the access delay drawn by its members with its history and the default, an older version opened read-only, the category map's default, a save over version 0 that the CDR refuses with412(recorded live), and the403and405, as stubs.e2e_registers(a browser journey) reads the access delay and its history, then saves the document as the next version and finds that version shown.Docs
viewer/access-control.mdhas an admin registers section.6643-viewer-admin-registers.added.md.