Skip to content

Commit 8e1dc54

Browse files
committed
Merge branch 'develop' into panic-fixes-1
2 parents 3625c5a + bd9d4f7 commit 8e1dc54

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ADD ./vendor/github.com/Microsoft/ /go/src/github.com/devtron-labs/devtron/vendo
1414
RUN GOOS=linux make build
1515

1616
# uncomment this post build arg
17-
FROM ubuntu:22.04@sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95 as devtron-all
17+
FROM ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 as devtron-all
1818

1919
RUN apt update && \
2020
apt install ca-certificates git curl -y && \
@@ -43,4 +43,4 @@ RUN chmod +x /git-ask-pass.sh
4343

4444
USER devtron
4545

46-
CMD ["./devtron"]
46+
CMD ["./devtron"]

DockerfileEA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ADD ./vendor/github.com/Microsoft/ /go/src/github.com/devtron-labs/devtron/vendo
1313

1414
RUN GOOS=linux make build-all
1515

16-
FROM ubuntu:22.04@sha256:1b8d8ff4777f36f19bfe73ee4df61e3a0b789caeff29caa019539ec7c9a57f95 as devtron-ea
16+
FROM ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 as devtron-ea
1717

1818
RUN apt update && \
1919
apt install ca-certificates curl -y && \

pkg/pipeline/CdHandler.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,12 @@ func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerViewForEnvironment(re
10561056
appObjectArr = append(appObjectArr, object[0])
10571057
envObjectArr = append(envObjectArr, object[1])
10581058
}
1059-
appResults, envResults := request.CheckAuthBatch(token, appObjectArr, envObjectArr)
1059+
1060+
// filter out pipelines for unauthorized apps but not envs
1061+
appResults, _ := request.CheckAuthBatch(token, appObjectArr, envObjectArr)
10601062
for _, pipeline := range pipelines {
10611063
appObject := objects[pipeline.Id][0]
1062-
envObject := objects[pipeline.Id][1]
1063-
if !(appResults[appObject] && envResults[envObject]) {
1064+
if !(appResults[appObject]) {
10641065
// if user unauthorized, skip items
10651066
continue
10661067
}

pkg/pipeline/DeploymentPipelineConfigService.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,21 +1183,23 @@ func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironment(request res
11831183
appObjectArr = append(appObjectArr, object[0])
11841184
envObjectArr = append(envObjectArr, object[1])
11851185
}
1186-
appResults, envResults := request.CheckAuthBatch(token, appObjectArr, envObjectArr)
1187-
//authorization block ends here
1186+
1187+
// filter out pipelines for unauthorized apps but not envs
1188+
appResults, _ := request.CheckAuthBatch(token, appObjectArr, envObjectArr)
1189+
11881190
span.End()
11891191
var pipelines []*bean.CDPipelineConfigObject
11901192
authorizedPipelines := make(map[int]*bean.CDPipelineConfigObject)
11911193
for _, dbPipeline := range cdPipelines.Pipelines {
11921194
appObject := objects[dbPipeline.Id][0]
1193-
envObject := objects[dbPipeline.Id][1]
1194-
if !(appResults[appObject] && envResults[envObject]) {
1195+
if !(appResults[appObject]) {
11951196
//if user unauthorized, skip items
11961197
continue
11971198
}
11981199
pipelineIds = append(pipelineIds, dbPipeline.Id)
11991200
authorizedPipelines[dbPipeline.Id] = dbPipeline
12001201
}
1202+
//authorization block ends here
12011203

12021204
pipelineDeploymentTemplate := make(map[int]chartRepoRepository.DeploymentStrategy)
12031205
pipelineWorkflowMapping := make(map[int]*appWorkflow.AppWorkflowMapping)

0 commit comments

Comments
 (0)