Skip to content

UserNotificationHandler: fix messagebox type mismatches & missing details

The port to AskUserActionInterface in commit 5f7fe050 missed out that the enum AskUserActionInterface::MessageDialogType is not a 1:1 map of the enum used by the workers (SlaveBase/WorkerBase::MessageBoxType), other than JobUiDelegateExtension::MessageBoxType.

Instead a manual mapping is needed.

The port to AskUserActionInterface also missed out to support the hack introduced to allow workers passing details for message box types of WarningContinueCancelDetailed (initially introduced for privilege confirmation dialogs).

While JobUiDelegateExtension had no argument for details in its requestMessageBox() API and the same hack as used with the SlaveBase messageBox() API was done, passing details via metadata in a special entry called "privilege_conf_details", AskUserActionInterface though has a details argument in its requestUserMessageBox() call, so SlaveInterface now just has to cache the string and pass it on with the next request for a messagebox of type WarningContinueCancelDetailed.

Also updating the TODOs related to the hack with a consistent id pointing to a central place explaining the hack and how to improve things.

Merge request reports