Skip to content

Commit f425d86

Browse files
committed
develop merge
2 parents b4409fc + 050161b commit f425d86

File tree

68 files changed

+3420
-1729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3420
-1729
lines changed

Wire.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ import (
7373
"github.com/devtron-labs/devtron/api/sse"
7474
"github.com/devtron-labs/devtron/api/team"
7575
"github.com/devtron-labs/devtron/api/terminal"
76+
"github.com/devtron-labs/devtron/api/userResource"
7677
util5 "github.com/devtron-labs/devtron/api/util"
7778
webhookHelm "github.com/devtron-labs/devtron/api/webhook/helm"
7879
"github.com/devtron-labs/devtron/cel"
@@ -170,6 +171,7 @@ import (
170171
workflow3 "github.com/devtron-labs/devtron/pkg/workflow"
171172
"github.com/devtron-labs/devtron/pkg/workflow/dag"
172173
util2 "github.com/devtron-labs/devtron/util"
174+
"github.com/devtron-labs/devtron/util/commonEnforcementFunctionsUtil"
173175
cron2 "github.com/devtron-labs/devtron/util/cron"
174176
"github.com/devtron-labs/devtron/util/rbac"
175177
"github.com/google/wire"
@@ -213,6 +215,7 @@ func InitializeApp() (*App, error) {
213215
workflow3.WorkflowWireSet,
214216
imageTagging.WireSet,
215217
devtronResource.DevtronResourceWireSet,
218+
userResource.UserResourceWireSet,
216219
policyGovernance.PolicyGovernanceWireSet,
217220
resourceScan.ScanningResultWireSet,
218221

@@ -502,6 +505,9 @@ func InitializeApp() (*App, error) {
502505
rbac.NewEnforcerUtilImpl,
503506
wire.Bind(new(rbac.EnforcerUtil), new(*rbac.EnforcerUtilImpl)),
504507

508+
commonEnforcementFunctionsUtil.NewCommonEnforcementUtilImpl,
509+
wire.Bind(new(commonEnforcementFunctionsUtil.CommonEnforcementUtil), new(*commonEnforcementFunctionsUtil.CommonEnforcementUtilImpl)),
510+
505511
chartConfig.NewPipelineConfigRepository,
506512
wire.Bind(new(chartConfig.PipelineConfigRepository), new(*chartConfig.PipelineConfigRepositoryImpl)),
507513

api/appStore/chartGroup/ChartGroupRestHandler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (impl *ChartGroupRestHandlerImpl) GetChartGroupList(w http.ResponseWriter,
274274
return
275275
}
276276
}
277-
res, err := impl.ChartGroupService.ChartGroupList(maxCount)
277+
res, err := impl.ChartGroupService.GetChartGroupList(maxCount)
278278
if err != nil {
279279
impl.Logger.Errorw("service err, GetChartGroupList", "err", err, "max", max)
280280
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)

api/auth/sso/SsoLoginHandler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ package sso
1919
import (
2020
"encoding/json"
2121
"errors"
22+
"github.com/devtron-labs/devtron/pkg/auth/user/bean"
2223
"net/http"
2324
"strconv"
2425

25-
"github.com/devtron-labs/devtron/api/bean"
2626
"github.com/devtron-labs/devtron/api/restHandler/common"
2727
"github.com/devtron-labs/devtron/pkg/auth/authorisation/casbin"
2828
"github.com/devtron-labs/devtron/pkg/auth/sso"

api/auth/user/UserAuthHandler.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ package user
1919
import (
2020
"encoding/json"
2121
"fmt"
22+
bean2 "github.com/devtron-labs/devtron/pkg/auth/authorisation/casbin/bean"
23+
bean3 "github.com/devtron-labs/devtron/pkg/auth/user/bean"
2224
"net/http"
2325
"strings"
2426

@@ -146,7 +148,7 @@ func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWrite
146148
//for START in Casbin Object Ends Here
147149
//loading policy for safety
148150
casbin.LoadPolicy()
149-
var policies []casbin.Policy
151+
var policies []bean2.Policy
150152
var policiesAdmin bean.PolicyRequest
151153
err := json.Unmarshal([]byte(adminPolicies), &policiesAdmin)
152154
if err != nil {
@@ -193,7 +195,7 @@ func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWrite
193195
roleView = strings.ReplaceAll(roleView, "<ENV>", env)
194196
roleView = strings.ReplaceAll(roleView, "<APP>", app)
195197

196-
var roleAdminData bean.RoleData
198+
var roleAdminData bean3.RoleData
197199
err = json.Unmarshal([]byte(roleAdmin), &roleAdminData)
198200
if err != nil {
199201
handler.logger.Errorw("request err, AddDefaultPolicyAndRoles", "err", err, "payload", roleAdminData)
@@ -207,7 +209,7 @@ func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWrite
207209
return
208210
}
209211

210-
var roleTriggerData bean.RoleData
212+
var roleTriggerData bean3.RoleData
211213
err = json.Unmarshal([]byte(roleTrigger), &roleTriggerData)
212214
if err != nil {
213215
handler.logger.Errorw("request err, AddDefaultPolicyAndRoles", "err", err, "payload", roleTriggerData)
@@ -221,7 +223,7 @@ func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWrite
221223
return
222224
}
223225

224-
var roleViewData bean.RoleData
226+
var roleViewData bean3.RoleData
225227
err = json.Unmarshal([]byte(roleView), &roleViewData)
226228
if err != nil {
227229
handler.logger.Errorw("request err, AddDefaultPolicyAndRoles", "err", err, "payload", roleViewData)

0 commit comments

Comments
 (0)