enhancement
major
minor
defect
critical
major
minor
major
#30064
Administration of the React UI: login messages (messages shown at login, with their validity)
Split off #30047. Follow-up to #29767; related: #29108.
Context
The React UI is managed via `admin/admin.view.xml` in `tl-layout-view`; feature modules contribute sections through same-path overlays (see the developer article on `view-layer/overlays`). The login messages from `com.top_logic.addons.loginmessages ` can only be managed in the classic UI.
Feature
An administration view for the messages displayed at login, along with their validity, in the React administration. Requires a React module (or a view in an existing module) that depends on the add-on.
Verification
tl-demo-react (/view/, root / root1234), Administration; create a valid message, log out, and log back in.
Solution
The React interface previously did not display any login messages at all: The display is a classic LoginHook (LoginMessagesHook.handleLogin(MainLayout, ...)), and the React interface’s login process (LoginAction) only had hard-coded intermediate steps.
- Configurable chain of login steps (com.top_logic.layout.view): Between password verification (or passwordless passkey login) and the completion of the login, a sequence of steps (LoginStep) runs, configured in the application configuration LoginStepsConfig (named entries; a module adds a step via `config:position ` in its `*.config.xml`). LoginFlow executes the applicable steps; its state resides in the window’s sub-session, never on a channel. Password changes and two-factor authentication (OTP, setup, passkey) are steps in this chain; a verifying step can only be completed by its own action, for the account in question. <dialog-step view="..." condition="account -> ..."> and <continue-login/> make a step fully configurable; the condition is based on trusted configuration and is evaluated without a security check.
- Add-on com.top_logic.addons.loginmessages: TL-Script functions loginMessagesDue(account) (active, valid, unconfirmed, or no longer confirmed messages), loginMessagesDisplay(account) (the due messages as HTML with embedded images, without model validation like the classic display, since the window still belongs to the anonymous user during login) and loginMessagesConfirm(display) (confirms exactly the messages displayed in the account’s personal configuration).
- New module `com.top_logic.addons.loginmessages.view'(configuration only): "login-messages" login step after two-factor authentication with a dialog (clicking OK confirms and continues the login); Administration view under System → Login Messages (table, form with message as formatted text, Create, Delete, “Have user confirm again”). Integrated into tl-demo-react.
- StructuredTextUtil.getCodeWithInlinedImages (tl-layout-wysiwyg) reads HTML instead of XML and writes well-formed XHTML; previously, formatted text from the React editor containing images failed due to this issue (including in PDF export).
- TestViewScriptFunctions (test sources from tl-layout-view) verifies that the TL script functions called in views actually exist.