|
|
@ -40,3 +40,18 @@ func GetPolicyPathByAuthorityId(c *gin.Context) { |
|
|
|
paths := new(sysModel.CasbinModel).GetPolicyPathByAuthorityId(cmr.AuthorityId) |
|
|
|
servers.ReportFormat(c, true, "获取规则成功", gin.H{"paths": paths}) |
|
|
|
} |
|
|
|
|
|
|
|
// @Tags casbin
|
|
|
|
// @Summary casb RBAC RESTFUL测试路由
|
|
|
|
// @Security ApiKeyAuth
|
|
|
|
// @accept application/json
|
|
|
|
// @Produce application/json
|
|
|
|
// @Param data body api.CreateAuthorityParams true "获取权限列表"
|
|
|
|
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
|
// @Router /casbin/CasbinTest [get]
|
|
|
|
func CasbinTest(c *gin.Context) { |
|
|
|
// 测试restful以及占位符代码 随意书写
|
|
|
|
pathParam := c.Param("pathParam") |
|
|
|
query := c.Query("query") |
|
|
|
servers.ReportFormat(c, true, "获取规则成功", gin.H{"pathParam": pathParam, "query": query}) |
|
|
|
} |