This article may be visible to unauthenticated users after it is published. Do you still want to pro

Yuuki_524
Tera Contributor

Upon clicking the UI action Publish on a Knowledge Article record in Tokyo, there is a new confirmation box that pops up asking 'This article may be visible to unauthenticated users after it is published. Do you still want to proceed?' I want to suppress this as our Knowledge articles are all publicly visible. I do not find any reference to the dialogue in any of the scripting in the UI Action nor in the scripting it calls.

1件の返信1

iwai
Giga Sage

The script for the "Publish" UI Action contains the code that displays the message dialogue.

The UI Page "confirm_publish" is responsible for showing the message dialogue.

The decision to display the message or not is made by the "checkGuestUserHasAccess" function within the "KBAjaxSNC" (GlideAjax KBAjax) Script include.

 

[Japanese translation]

「公開」UI アクションのスクリプトには、メッセージ ダイアログを表示するコードが含まれています。

UI ページ「confirm_publish」は、メッセージ ダイアログの表示を担当します。

メッセージを表示するかどうかの決定は、「KBAjaxSNC」(GlideAjax KBAjax) スクリプト インクルード内の「checkGuestUserHasAccess」関数によって行われます。

 

function onPublishActionClicked() {
    if (g_form.getTableName() == "kb_knowledge_block")
        gsftSubmit(null, g_form.getFormElement(), 'publish_knowledge');
    else {
        var checkGuestAccess = new GlideAjax("KBAjax");
        checkGuestAccess.addParam("sysparm_type", "checkGuestUserHasAccess");
        checkGuestAccess.addParam("sysparm_id", g_form.getUniqueValue());
        checkGuestAccess.getXML(function(response) {
            var answer = '';
            if (response && response.responseXML && response.responseXML.documentElement)
                answer = response.responseXML.documentElement.getAttribute("answer") + '' == 'true' ? true : false;
            if (answer)
                renderModal();
            else
                gsftSubmit(null, g_form.getFormElement(), 'publish_knowledge');
        });

    }
}

function renderModal() {
    var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
    dialog = new dialogClass('confirm_publish');
    dialog.setTitle('Confirmation');
    dialog.setWidth(450);
    dialog.render();
}