Skip to content

Commit 8612a72

Browse files
committed
Fix upstream api changes to user_model
1 parent c8c344e commit 8612a72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/auth/httpsign.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"strings"
1414

1515
"code.gitea.io/gitea/models"
16+
user_model "code.gitea.io/gitea/models/user"
1617
"code.gitea.io/gitea/modules/log"
1718
"code.gitea.io/gitea/modules/setting"
1819
"code.gitea.io/gitea/modules/web/middleware"
@@ -40,7 +41,7 @@ func (h *HTTPSign) Name() string {
4041
// Verify extracts and validates HTTPsign from the Signature header of the request and returns
4142
// the corresponding user object on successful validation.
4243
// Returns nil if header is empty or validation fails.
43-
func (h *HTTPSign) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User {
44+
func (h *HTTPSign) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *user_model.User {
4445
// HTTPSign authentication should only fire on API
4546
if !middleware.IsAPIPath(req) {
4647
return nil
@@ -62,7 +63,7 @@ func (h *HTTPSign) Verify(req *http.Request, w http.ResponseWriter, store DataSt
6263
return nil
6364
}
6465

65-
u, err := models.GetUserByID(validpk.OwnerID)
66+
u, err := user_model.GetUserByID(validpk.OwnerID)
6667
if err != nil {
6768
log.Error("GetUserByID: %v", err)
6869
return nil

0 commit comments

Comments
 (0)