CI: Bump golangci-lint to 2.0.2 (#103572)

This commit is contained in:
Mariell Hoversholm
2025-04-10 14:42:23 +02:00
committed by GitHub
parent b58b6e828e
commit 757be6365a
291 changed files with 1948 additions and 1835 deletions
+4 -4
View File
@@ -33,11 +33,11 @@ import (
// 403: forbiddenError
// 500: internalServerError
func (hs *HTTPServer) GetUserAuthTokens(c *contextmodel.ReqContext) response.Response {
if !c.SignedInUser.IsIdentityType(claims.TypeUser) {
if !c.IsIdentityType(claims.TypeUser) {
return response.Error(http.StatusForbidden, "entity not allowed to get tokens", nil)
}
userID, err := c.SignedInUser.GetInternalID()
userID, err := c.GetInternalID()
if err != nil {
return response.Error(http.StatusInternalServerError, "failed to parse user id", err)
}
@@ -63,11 +63,11 @@ func (hs *HTTPServer) RevokeUserAuthToken(c *contextmodel.ReqContext) response.R
return response.Error(http.StatusBadRequest, "bad request data", err)
}
if !c.SignedInUser.IsIdentityType(claims.TypeUser) {
if !c.IsIdentityType(claims.TypeUser) {
return response.Error(http.StatusForbidden, "entity not allowed to revoke tokens", nil)
}
userID, err := c.SignedInUser.GetInternalID()
userID, err := c.GetInternalID()
if err != nil {
return response.Error(http.StatusInternalServerError, "failed to parse user id", err)
}