1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

add support for env var access of GROUP_ID & GROUP_NAME

This commit is contained in:
Hiroyasu Nishiyama 2022-01-25 21:04:43 +09:00
parent 0ad60013aa
commit 8b23d341b4

View File

@ -424,6 +424,17 @@ class Flow {
*/ */
getGroupEnvSetting(node, group, name) { getGroupEnvSetting(node, group, name) {
if (group) { if (group) {
if (name === "GROUP_NAME") {
return [{
val: group.name
}, null];
}
if (name === "GROUP_ID") {
return [{
val: group.id
}, null];
}
if (group.credentials === undefined) { if (group.credentials === undefined) {
group.credentials = credentials.get(group.id) || {}; group.credentials = credentials.get(group.id) || {};
} }