Every user in my game who doesn't own the token gets an error popup "User ... lacks permission to update Token..." whenever I place a token.
I tracked it down with the debugger, and it's because it tries to set the flag "elevationMeasurement" without permission.
I modified the drawTokenHook function inside Token.js so that it checks for ownership in the if check:
if ( !token.document.getFlag(MODULE_ID, ALGORITHM) && token.document.isOwner) { ... }
That fixed it.
Keep in mind, that I'm using my own, custom system, which might modify some other logic which might cause this.
Every user in my game who doesn't own the token gets an error popup "User ... lacks permission to update Token..." whenever I place a token.
I tracked it down with the debugger, and it's because it tries to set the flag "elevationMeasurement" without permission. I modified the
drawTokenHook
function insideToken.js
so that it checks for ownership in theif
check:if ( !token.document.getFlag(MODULE_ID, ALGORITHM) && token.document.isOwner) { ... }
That fixed it.Keep in mind, that I'm using my own, custom system, which might modify some other logic which might cause this.