权限检验中间件

This commit is contained in:
momo
2023-11-27 14:46:50 +08:00
parent 205767efd5
commit 4889590b35
9 changed files with 107 additions and 11 deletions

View File

@@ -5,6 +5,7 @@ import (
"fusenapi/model/gmodel"
"fusenapi/server/ldap-admin/internal/config"
"fusenapi/utils/ldap_lib"
"gorm.io/gorm"
)
@@ -24,6 +25,6 @@ func NewServiceContext(c config.Config) *ServiceContext {
MysqlConn: conn,
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
RabbitMq: initalize.InitRabbitMq(c.SourceRabbitMq, nil),
Ldap: ldap_lib.NewLdap(ldapConn, c.Ldap.BaseDN, c.Ldap.RootDN, c.Ldap.PeopleGroupDN, c.Auth.AccessSecret),
Ldap: ldap_lib.NewLdap(ldapConn, c.Ldap.BaseDN, c.Ldap.RootDN, c.Ldap.PeopleGroupDN, c.Auth.AccessSecret, conn),
}
}