Describe the bug
If the GM calls a macro from the chat, the macro path should be considered trusted.
However, the macroPathTrusted parser property property is set to false regardless of who typed the macro.
To Reproduce
Steps to reproduce the behavior:
isMacroPathTrusted, such as transferVBL().You do not have permission to call the "transferVBL" function. Expected behavior
A GM should have permission to run all macros from chat.
MapTool Info
Desktop (please complete the following information):
Additional context
It's not clear to me why some macros verify permission through isMacroPathTrusted(), which other macros verify permission through isMacroTrusted().
Maybe we should stick to one permission method?
PR #1815 allows GM to call transferVBL from chat.
The functions remain divided on how trust is evaluated (isMacroPathTrusted vs isMacroTrusted).
The behaviour of isMacroPathTrusted is correct, for this to be true there can be no player editable macros in the chain, nor any typing involved by anyone.
No macro functions should use this as its only for indication in chat purposes (although that my be broken), they should all use isMacroTrusted
The behaviour of
isMacroPathTrustedis correct, for this to be true there can be no player editable macros in the chain, nor any typing involved by anyone.No macro functions should use this as its only for indication in chat purposes (although that my be broken), they should all use
isMacroTrusted
If I understand correctly, isMacroTrusted is only used for the say and togm macros, and should never be used to throw a permission exception. Is this correct?
isMacroTrusted -> Used to check if someone can run a macro function or not
isMacroPathTrusted -> Used to determine if certain markup should be added to chat output
PR #1816 fixes this issue by changing isMacroPathTrusted to isMacroTrusted for checking if someone can run a macro function or not.
Functions affected:
exportData()herolab.*()log.*()rest.*()transferVBL()Tested:
So this is a lesson in, picking the wrong function to call and then copy/pasting your work until someone stops you. :D
IF only someone told me when I did transferVBL back in 1.3.b89 lolz