Use API pluginMethod SetEditingRestrictions to restrict editing, but the status of the toolbar is not updated

Use API pluginMethod SetEditingRestrictions to restrict editing, but the status of the toolbar is not updated.
For example, after using the method to set the limit editing scope to fill in the form, the toolbar is still in the clickable state, and the document in the protected mode is set in advance. After using the api method to cancel the protection, the toolbar is still in the uneditable state.
I need the api method to cancel the editing restriction after the departure event, but in the current case, the toolbar still cannot be edited after the cancellation. Therefore, I consider to use api method to limit the editing form when the entire document is loaded, so that api method is used before and after the entire document is loaded, but the loading of the entire document is slower than that of the embedded page. I hope you can give me some help

Hello @xiaoxi

Let me know version of Document Server and how exactly you are setting up restrictions and disabling them.

If possible, record a video demo for better visual understanding of this description as I cannot either replicate the behavior or see what is meant.

    var asc = window.frames[0].g_asc_plugins.api;
    asc.pluginMethod_SetEditingRestrictions('forms');

    var asc = window.frames[0].g_asc_plugins.api;
    asc.pluginMethod_SetEditingRestrictions('none');

As you can see, I used the above code to operate in the protected mode of the document, and the simple use of the code operation did not change the disabled state of the toolbar. I considered setting the document directly to protected mode, so that the toolbar is gray and unclickable when entering the edit page, but unprotected mode by calling the code through the event did not make the toolbar disabled. Whether the disabled status of the toolbar is associated only with protected buttons in the toolbar

Well, this is expected behavior. Not quite sure what you mean by protected/unprotected mode, but SetEditingRestrictions method has nothing to do with protection and used from a plugin only.