From cc649a64060da989c65119036387c3ee1f2919bd Mon Sep 17 00:00:00 2001 From: yingfeng Date: Mon, 29 Apr 2024 11:19:21 -0400 Subject: [PATCH] AMP-3142: fix bug in ac service permittedActions --- src/service/access-control-service.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/service/access-control-service.js b/src/service/access-control-service.js index f83897e1..1b1c10d1 100644 --- a/src/service/access-control-service.js +++ b/src/service/access-control-service.js @@ -54,12 +54,8 @@ export default class AccessControlService extends BaseService { let unitId; let uEntity = JSON.parse(sessionStorage.getItem("unitEntity")); if (uEntity && uEntity.currentUnit) { - unitId = uEntity.unitList.filter( - (unit) => unit.id === uEntity.currentUnit - )[0].id; - } - if (unitId) { - return self.acUnitsActions.filter((ua) => ua.unitId === unitId)[0].actions; + unitId = uEntity.currentUnit; + return self.acUnitsActions.filter((ua) => ua.unitId == unitId)[0].actions; } }