权限调整 (#571)

This commit is contained in:
alick-liming 2021-02-02 14:03:05 +08:00 committed by GitHub
parent c724896ecd
commit e2e96a04d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -90,6 +90,11 @@ func Config(r *gin.Engine) {
rootLogin.GET("/resources/tenant-rank", tenantResourcesCountRank) rootLogin.GET("/resources/tenant-rank", tenantResourcesCountRank)
rootLogin.GET("/resources/project-rank", projectResourcesCountRank) rootLogin.GET("/resources/project-rank", projectResourcesCountRank)
rootLogin.GET("/root/users", userListGet)
rootLogin.GET("/root/teams/all", teamAllGet)
rootLogin.GET("/root/node-cates", nodeCateGets)
} }
userLogin := r.Group("/api/rdb").Use(shouldBeLogin()) userLogin := r.Group("/api/rdb").Use(shouldBeLogin())
@ -148,6 +153,11 @@ func Config(r *gin.Engine) {
userLogin.GET("/resources/orphan", resourceOrphanGet) userLogin.GET("/resources/orphan", resourceOrphanGet)
userLogin.GET("/resources/cate-count", renderAllResourcesCountByCate) userLogin.GET("/resources/cate-count", renderAllResourcesCountByCate)
// 是否在某个节点上有权限做某个操作(即资源权限点)
userLogin.GET("/can-do-node-op", v1CandoNodeOp)
// 同时校验多个操作权限点
userLogin.GET("/can-do-node-ops", v1CandoNodeOps)
} }
v1 := r.Group("/v1/rdb").Use(shouldBeService()) v1 := r.Group("/v1/rdb").Use(shouldBeService())