fix: support roles and permissions in /userinfo API

This commit is contained in:
Yang Luo
2024-03-10 12:34:56 +08:00
parent 9175e5b664
commit 6998451e97
2 changed files with 30 additions and 3 deletions

View File

@ -459,7 +459,12 @@ func (c *ApiController) GetUserinfo() {
scope, aud := c.GetSessionOidc()
host := c.Ctx.Request.Host
userInfo := object.GetUserInfo(user, scope, aud, host)
userInfo, err := object.GetUserInfo(user, scope, aud, host)
if err != nil {
c.ResponseError(err.Error())
return
}
c.Data["json"] = userInfo
c.ServeJSON()