From e7ae68760283767eca44fd34245bc6f3ab715bda Mon Sep 17 00:00:00 2001 From: Will Toozs Date: Mon, 27 Nov 2023 18:48:12 +0100 Subject: [PATCH] fixup logic --- lib/auth/backends/ChainBackend.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/auth/backends/ChainBackend.ts b/lib/auth/backends/ChainBackend.ts index 9a95df54b..150d0937f 100644 --- a/lib/auth/backends/ChainBackend.ts +++ b/lib/auth/backends/ChainBackend.ts @@ -153,8 +153,10 @@ export default class ChainBackend extends BaseBackend { return Object.keys(policyMap).map(key => { const policyRes: any = { isAllowed: policyMap[key].isAllowed, - action: policyMap[key].action, }; + if (policyMap[key].action) { + policyRes.action = policyMap[key].action; + } if (typeof policyMap[key].isImplicit === 'boolean') { policyRes.isImplicit = policyMap[key].isImplicit; }