(c *gin.Context)
| 416 | } |
| 417 | |
| 418 | func GetRole(c *gin.Context) { |
| 419 | ctx := internalhandler.NewContext(c) |
| 420 | defer func() { internalhandler.JSONResponse(c, ctx) }() |
| 421 | |
| 422 | projectName := c.Query("namespace") |
| 423 | if projectName == "" { |
| 424 | ctx.RespErr = e.ErrInvalidParam.AddDesc("args namespace can't be empty") |
| 425 | return |
| 426 | } |
| 427 | |
| 428 | ctx.Resp, ctx.RespErr = permission.GetRole(projectName, c.Param("name"), ctx.Logger) |
| 429 | } |
| 430 | |
| 431 | func GetRoleTemplate(c *gin.Context) { |
| 432 | ctx := internalhandler.NewContext(c) |