fix: acl test

This commit is contained in:
Chareice 2024-01-11 10:47:49 +08:00
parent 7b6469fa3d
commit b7a837d84d
No known key found for this signature in database

View File

@ -69,7 +69,7 @@ export class ACLAvailableStrategy {
const namespace = this.getNamespace(resourceName);
if (Object.prototype.hasOwnProperty.call(this.actionsAsObject?.[namespace], actionName)) {
if (Object.prototype.hasOwnProperty.call(this.actionsAsObject?.[namespace] || {}, actionName)) {
const predicateName = this.actionsAsObject[namespace][actionName];
if (predicateName) {
return lodash.cloneDeep(predicate[predicateName]);