Skip to content

Commit

Permalink
fix: adjust priority for config namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjoey committed Sep 25, 2024
1 parent 154b5f3 commit b7446bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/apps/dop/endpoints/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ func (e *Endpoints) pipelineCreate(ctx context.Context, r *http.Request, vars ma
}

// also add project/org default config namespace
reqPipeline.ConfigManageNamespaces = append(reqPipeline.ConfigManageNamespaces, makeOrgDefaultLevelCmsNs(app.OrgID)...)
reqPipeline.ConfigManageNamespaces = append(reqPipeline.ConfigManageNamespaces, makeProjectDefaultLevelCmsNs(app.ProjectID)...)
// priority: org->project->app->user
reqPipeline.ConfigManageNamespaces = append(append(makeOrgDefaultLevelCmsNs(app.OrgID),
makeProjectDefaultLevelCmsNs(app.ProjectID)...),
reqPipeline.ConfigManageNamespaces...)

Check warning on line 103 in internal/apps/dop/endpoints/pipeline.go

View check run for this annotation

Codecov / codecov/patch

internal/apps/dop/endpoints/pipeline.go#L101-L103

Added lines #L101 - L103 were not covered by tests

rules, err := e.branchRule.Query(apistructs.ProjectScope, int64(app.ProjectID))
if err != nil {
Expand Down

0 comments on commit b7446bf

Please sign in to comment.