Skip to content

Commit c3581b7

Browse files
authored
Merge pull request #6190 from devtron-labs/runtime-params-patch
chore: file type unit support for pipeline stage input variable
2 parents 4321dab + be8e99e commit c3581b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/restHandler/GlobalPluginRestHandler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ func (handler *GlobalPluginRestHandlerImpl) GetAllGlobalVariables(w http.Respons
184184
object := handler.enforcerUtil.GetAppRBACNameByAppId(appId)
185185
authorised := false
186186
if app.AppType == helper.Job {
187-
authorised = handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionGet, object)
188-
} else if app.AppType == helper.CustomApp {
189187
authorised = handler.enforcer.Enforce(token, casbin.ResourceJobs, casbin.ActionGet, object)
188+
} else if app.AppType == helper.CustomApp {
189+
authorised = handler.enforcer.Enforce(token, casbin.ResourceApplications, casbin.ActionGet, object)
190190
}
191191
if !authorised {
192192
common.WriteJsonResp(w, common.ErrUnAuthorized, nil, http.StatusForbidden)

pkg/pipeline/bean/pipelineStage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (s *StepVariableDto) IsEmptyValueAllowed(isTriggerStage bool) bool {
130130
type ConditionDetailDto struct {
131131
Id int `json:"id"`
132132
ConditionOnVariable string `json:"conditionOnVariable"` //name of variable on which condition is written
133-
ConditionType repository.PipelineStageStepConditionType `json:"conditionType" validate:"oneof=SKIP TRIGGER SUCCESS FAIL"`
133+
ConditionType repository.PipelineStageStepConditionType `json:"conditionType" validate:"oneof=SKIP TRIGGER FAIL PASS"`
134134
ConditionalOperator string `json:"conditionOperator"`
135135
ConditionalValue string `json:"conditionalValue"`
136136
}

0 commit comments

Comments
 (0)