Skip to content

Commit a3d825f

Browse files
committed
fix: dont override secretsData if user is app admin
1 parent 0ac4441 commit a3d825f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ export const DeploymentHistoryConfigDiff = ({
8787
}
8888

8989
secretsData.value.forEach((data, index) => {
90-
if (configDatas[index].status !== 'fulfilled' || !configDatas[index].value) {
90+
if (
91+
configDatas[index].status !== 'fulfilled' ||
92+
!configDatas[index].value ||
93+
configDatas[index].value.result.isAppAdmin
94+
) {
9195
return
9296
}
9397
configDatas[index].value.result.secretsData = data.secretsData

src/Shared/Services/app.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ export const getCompareSecretsData = async (
8484
>)
8585

8686
comparisonItemResponse.forEach((resp) => {
87-
// FIXME: prakash said he will fix this
88-
results[resp.index ?? 0] = resp
87+
results[resp.index] = resp
8988
})
9089

9190
return results

0 commit comments

Comments
 (0)