In Tools - Options - Security - Macro Security, if the user change the security level, the new level will only take effect after restarting LibreOffice. However, LO does not warn about that after clicking OK or Apply. There should be a message telling the user that a restart is required. This is important when the user changes the security level from High to Low (in order to be able to execute a macro from a file). Just changing the level and after that trying to use the macro won't work.
Changing security level doesn't need a restart. It applies to all documents opened after the change, in the same session. Even simple File->Reload already uses new level - I use that all the time.
(In reply to Mike Kaganski from comment #1) > Changing security level doesn't need a restart. It applies to all documents > opened after the change, in the same session. Even simple File->Reload > already uses new level - I use that all the time. Indeed, I confirm that reloading the file will apply the new macro security settings. However, don't you think this should be told to the user somehow? So here is why I opened this ticket... In my classes, I create an ODS example file with many macros to help students understand the lecture. So when they open the file on the lab computers, their security level is always set to High. Then I tell the students to change the security level to Low, and all of them complain that it does not work (which makes sense, since they changed it to Low, pressed OK and nothing was said about needing to reload the file). To overcome this issue, I always told students to restart LO... now from Mike's message, I'll tell students to reload the file instead. However, either way, there's no way the user can know that (I myself did not know that). If OK is pressed and no warning is presented, the user will expect it to work right away.
I renamed the title based on Comment #1
I agree with Rafael something should change, because it always felt to me like something was missing or inconsistent with other requests to restart. I can see how users would expect to be able to press a button that triggers a macro right after changing the security settings. I always used to restart LO, not knowing a reload was enough. The need for a reload is not mentioned in the corresponding help page: https://help.libreoffice.org/24.8/en-US/text/shared/optionen/macrosecurity_sl.html UX/Design team, would an extra string in the dialog + another one in the help page suffice?
IMO, it only needs a note in the Macro Security dialog, like "takes effect on files opened after the change" (colored?) label shown at the moment of a change (similar to "Search key not found" message in Find/Replace dialog). No need in additional dialogs / infobars in documents. Or an infobar could be an option - like "The macro security settings were changed since opening of this document. They will only be active for the document after a reload. Do that now? [Reload]". But it's an overkill IMO.
I dislike the concept of changing a security level to once run an action. We better allow to execute the macro anyway. The confusion comes from the fact that most options are applied to the document. The function here is "Adjust the security level for executing macros and specify trusted macro developers.". Adding more explanations, eg. what executing a macro means, is not an improvement, IMO.
(In reply to Heiko Tietze from comment #6) > We better allow to execute the macro anyway. It is not an option. An admin could disallow users; and then the dialog would not allow changing the level, but your "allow to execute the macro anyway" would be a backdoor. > Adding more explanations, eg. what executing a macro means No one suggested to explain "what executing a macro means" up to now, it seems.
Prototype could be Firefox's “Warning: Potential Security Risk Ahead” bypass [1], which an admin can disable [2] in the expert options. [1] https://support.mozilla.org/en-US/kb/what-does-your-connection-is-not-secure-mean [2] https://medium.com/volosoft/how-to-disable-firefox-warning-potential-security-risk-ahead-f081fbf81a4f
What about we simply reload all opened files right after the security options are changed? This would be invisible to the user and would make the macros work.
(In reply to Rafael Lima from comment #9) I suggest even do it without saving all the unsaved changes ;-P
(In reply to Rafael Lima from comment #9) > What about we simply reload all opened files right after the security > options are changed? This would be invisible to the user and would make the > macros work. Invisibility is inappropriate of course (as Mike points out). But - why not give a prompt for reloading documents? That could explain why it may be important to reload. And the user could choose whether they want to (save and) reload everything or nothing (and perhaps individual files? Not sure.) (In reply to Mike Kaganski from comment #10) > I suggest even do it without saving all the unsaved changes ;-P What about prompting the user about a reload?
I disagree. When I work with many documents, and at some point, I open a specific document, and realize that it requires a different security level. I modify the level, and may want to reload that specific file. But I would hate to have a nagging prompt. The maximal tolerable level of nagging would be an infobar. My preferred solution would be an infotip in the security dialog. No intrusive prompts.
Maybe, when the user changes the value (ex. set level from High to Low) a confirmation window could ask if it’s really sure to apply the change, and inform at the same time that his validation requires a file reload ?
(In reply to Bdac from comment #13) > Maybe, when the user changes the value (ex. set level from High to Low) a > confirmation window could ask if it’s really sure to apply the change, and > inform at the same time that his validation requires a file reload ? Would be a bit more nagging then the following.. (In reply to Mike Kaganski from comment #12) > The maximal tolerable level of nagging would be an infobar. My preferred > solution would be an infotip in the security dialog. No intrusive prompts. which looks fine to me.
We discussed the topic in the design meeting. Both proposals, to show an infobar requesting the user to reload and a label in the macros security option dialog or the restart confirmation box sound like a reasonable solution. In any case we should inform the user about the need to reload.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6178387f7bcc35df9272978ec936f8b53c6da80d tdf#159985 Warn about the need to reload file after changing macro security level It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thanks for the patch, Rafael! I think it's a great balance between visibility and unobtrusiveness. Verified in: Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 53c5d570cab036b23f4969b858a648c8f0c24f93 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded In release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.8&type=revision&diff=745345&oldid=745086
Stéphane Guillou committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/b010f7c91670f60ab8c637b321507b67d1bc4a63 tdf#159985: need to reload file for macro security change