feat:优化项目信息

This commit is contained in:
henry
2022-03-05 15:31:22 +08:00
parent dcb5948e91
commit 4dc8deaadb
27 changed files with 401 additions and 138 deletions

View File

@ -229,6 +229,7 @@ func registerAdminAPI(app *gin.Engine) {
user := v1.Group("/user")
{
_api := new(api1.User)
user.POST("/basic", _api.Basic)
user.GET("/info", _api.Info)
user.GET("/menu", _api.Menu)
user.POST("/list", _api.List)
@ -513,7 +514,7 @@ func registerEnterpriseAPI(app *gin.Engine) {
settledV1.POST("/agent", _api.Agent)
}
// Technology 技术管理
technologyV1 := g.Group("/technology")
technologyV1 := v1.Group("/technology")
{
_api := new(api3.Technology)
technologyV1.POST("/paper", _api.Paper)

View File

@ -61,7 +61,7 @@ func NeedPermission(skipperURL ...SkipperURL) gin.HandlerFunc {
value, _ := c.Get(config.TokenForSession)
_session := value.(*session.Admin)
if _session.IsAdmin && _session.TenantID <= 0 {
if _session.IsAdmin || _session.IsSystemAdmin {
c.Next()
return
}