diff --git a/internal/api/user/profile.go b/internal/api/user/profile.go index cde5f56..1c9f2f3 100644 --- a/internal/api/user/profile.go +++ b/internal/api/user/profile.go @@ -29,7 +29,7 @@ func (h *handler) Profile(c *gin.Context) { } uid := claim.(*model.Claim).UID - role := claim.(*model.Claim).Role + // role := claim.(*model.Claim).Role req := new(profileRequest) if err := c.ShouldBind(req); err != nil { @@ -43,10 +43,5 @@ func (h *handler) Profile(c *gin.Context) { return } - if role < model.RoleAdmin && user.ID != uid { - e.Pong[any](c, e.UserUnauthorized, nil) - return - } - e.Pong(c, status, user) }