Skip to content

Commit

Permalink
Merge pull request #509 from AudiovisualMetadataPlatform/AMP-3142_acI…
Browse files Browse the repository at this point in the history
…temSearch

AMP-3142: fix bug in ac service permittedActions
  • Loading branch information
yingfeng-iu authored Apr 29, 2024
2 parents 5d36939 + cc649a6 commit f026e5c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/service/access-control-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit f026e5c

Please sign in to comment.