diff --git a/src/govoplan_access/backend/api/v1/auth.py b/src/govoplan_access/backend/api/v1/auth.py index 6cc1ead..7708d03 100644 --- a/src/govoplan_access/backend/api/v1/auth.py +++ b/src/govoplan_access/backend/api/v1/auth.py @@ -991,6 +991,14 @@ def update_profile( if payload.ui_preferences is None: next_settings["ui"] = UserUiPreferences().model_dump() else: + if ( + payload.ui_preferences.navigation is not None + and payload.ui_preferences.navigation.locked + ): + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, + detail="Personal navigation preferences cannot lock entries.", + ) next_ui = _user_ui_preferences(next_settings).model_dump() next_ui.update(payload.ui_preferences.model_dump(exclude_unset=True)) next_settings["ui"] = UserUiPreferences.model_validate(next_ui).model_dump() diff --git a/src/govoplan_access/backend/manifest.py b/src/govoplan_access/backend/manifest.py index 84a0493..306e5c2 100644 --- a/src/govoplan_access/backend/manifest.py +++ b/src/govoplan_access/backend/manifest.py @@ -639,6 +639,27 @@ ACCESS_DOCUMENTATION: tuple[DocumentationTopic, ...] = ( "verification": "The administration table shows the expected active credential count, last-use timestamp, revision, and audit events without exposing secret material.", }, ), + DocumentationTopic( + id="access.reference.personal-navigation", + title="Personalize the side rail", + summary="Users can reorder or hide available navigation entries without changing access or other users' workspaces.", + body=( + "Open Settings and use the workspace navigation editor to move or show available entries. Personal order and visibility take precedence over tenant and system preferences. Entries locked by a system or tenant administrator remain visible, and a user cannot create a lock. Choosing the inherited order removes the personal layer. Module entitlement, View policy, and permissions continue to decide which destinations are available, so changing navigation never grants access." + ), + layer="configured", + documentation_types=("user", "admin"), + audience=("user", "tenant_admin", "system_admin"), + order=85, + related_modules=("admin", "tenancy", "views"), + links=( + DocumentationLink(label="Workspace settings", href="/settings?section=workspace", kind="runtime"), + ), + metadata={ + "kind": "reference", + "help_contexts": ["core.settings.workspace"], + "outcome": "The user's side rail reflects the personal preference while locked and inaccessible entries remain governed by higher-level policy.", + }, + ), DocumentationTopic( id="access.workflow.manage-sessions", title="Review and revoke account sessions",