https://linen.dev logo
#general
Title
# general
b

Balog Tamás

10/10/2023, 1:41 PM
Hi! There is a note in the Webhooks and Callbacks documentation that says "_Webhook templates currently do not support system or environment variables."_ What does this actually mean in terms of the Java and JSON DSLs (or Handlebars if that's the case)?
t

Tom

10/10/2023, 1:46 PM
It just means that you can’t access system or env vars via Handlebars templating in the webhook fields that support it. This might actually be obsolete now that webhooks has moved to the core, so worth giving it a try.
b

Balog Tamás

10/10/2023, 1:54 PM
Thanks. I'll give it a try then.
t

Tom

10/10/2023, 1:55 PM
Please let me know what you find out, because if it’s changed I’ll delete that from the docs
b

Balog Tamás

10/10/2023, 1:55 PM
Sure, I'll send you my findings.
t

Tom

10/10/2023, 1:55 PM
Thanks
b

Balog Tamás

10/10/2023, 2:42 PM
I tried the
systemValue
Handlebars helper with a system property in the method field, and after calling
Webhooks.applyTemplating()
on the
WebhookDefinition
the method field value becomes
[ERROR: Access to my.custom.property is denied]
.
t

Tom

10/10/2023, 3:10 PM
Did you permit that property to be used in your startup configuration?
b

Balog Tamás

10/10/2023, 4:07 PM
I was not aware that that was needed. Let me look into that part.
As I see,
Webhooks
is always initialized with TemplateEngine.defaultTemplateEngine(), thus the
TemplateEngine
it uses is always initialized with null
permittedSystemKeys
. and never permits any keys.
t

Tom

10/11/2023, 7:25 AM
Ah, I thought I’d updated it to use injection. We can change that in the next release, then this will work.]
👍 1