diff --git a/VERSION b/VERSION index f8f4f03b..6b89d58f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.1 +1.12.2 diff --git a/pkg/api/model/handler/share.go b/pkg/api/model/handler/share.go index f915210e..d035bc19 100644 --- a/pkg/api/model/handler/share.go +++ b/pkg/api/model/handler/share.go @@ -13,43 +13,9 @@ import ( "github.com/TencentBlueKing/gopkg/collection/set" "github.com/gin-gonic/gin" - "iam/pkg/service" "iam/pkg/util" ) -// ListSystem godoc -// @Summary list system -// @Description get the list of systems -// @ID api-model-share-systems-list -// @Tags model_share -// @Accept json -// @Produce json -// @Success 200 {object} util.Response{data=systemClientsResponse} -// @Header 200 {string} X-Request-Id "the request id" -// @Security AppCode -// @Security AppSecret -// @Router /api/v1/model/share/systems [get] -func ShareListSystem(c *gin.Context) { - // NOTE: 1) only id/name/name_en 2) no pagination - svc := service.NewSystemService() - allSystems, err := svc.ListAll() - if err != nil { - util.SystemErrorJSONResponse(c, err) - return - } - - systems := make([]systemListResponse, 0, len(allSystems)) - for _, sys := range allSystems { - systems = append(systems, systemListResponse{ - ID: sys.ID, - Name: sys.Name, - NameEn: sys.NameEn, - }) - } - - util.SuccessJSONResponse(c, "ok", systems) -} - // ShareSystemInfoQuery godoc // @Summary system info query // @Description query the system diff --git a/pkg/api/model/handler/system_config_slz.go b/pkg/api/model/handler/system_config_slz.go index 5c7e3f8b..a24eb33d 100644 --- a/pkg/api/model/handler/system_config_slz.go +++ b/pkg/api/model/handler/system_config_slz.go @@ -189,7 +189,7 @@ type actionIDSerializer struct { type commonActionSerializer struct { Name string `json:"name" binding:"required" example:"admin"` NameEn string `json:"name_en" binding:"required" example:"admin"` - Actions []actionIDSerializer `json:"actions" binding:"required,gt=1"` + Actions []actionIDSerializer `json:"actions" binding:"required,gte=1"` } func getAllFromCommonActions(commonActions []commonActionSerializer) []string { diff --git a/pkg/api/model/handler/system_slz.go b/pkg/api/model/handler/system_slz.go index 36a297d7..a3c8c4c2 100644 --- a/pkg/api/model/handler/system_slz.go +++ b/pkg/api/model/handler/system_slz.go @@ -83,9 +83,3 @@ type systemCreateResponse struct { type systemClientsResponse struct { Clients string `json:"clients" example:"bk_paas,bk_esb"` } - -type systemListResponse struct { - ID string `json:"id" example:"bk_paas"` - Name string `json:"name" example:"bk_paas"` - NameEn string `json:"name_en" example:"bk_paas"` -} diff --git a/pkg/api/model/router.go b/pkg/api/model/router.go index e541de38..5d0b8a6a 100644 --- a/pkg/api/model/router.go +++ b/pkg/api/model/router.go @@ -71,9 +71,6 @@ func Register(r *gin.RouterGroup) { } func RegisterShare(r *gin.RouterGroup) { - // GET /api/v1/model/share/systems - r.GET("/systems", handler.ShareListSystem) - // all resource in system s := r.Group("/systems/:system_id") s.Use(common.SystemExists()) diff --git a/release.md b/release.md index 74b8fe11..1f80a265 100644 --- a/release.md +++ b/release.md @@ -1,3 +1,8 @@ +# 1.12.2 + +- add: subject group quota check api +- add: task stats metrics + # 1.12.1 - add: transfer worker checker rbac command @@ -6,6 +11,10 @@ - add: rbac action support +# 1.11.8 + +- bugfix: common actions length gte 1 + # 1.11.7 - add api for subject freeze/unfreeze