1
0

chore(web): use web auth factory directly

(cherry picked from commit 9b01666ec6c41f5487cfc6c381b3937f1fe53a16)
This commit is contained in:
kolaente
2024-09-01 19:25:24 +02:00
parent 01c4f1fc0e
commit fe44b7d473
7 changed files with 10 additions and 17 deletions

View File

@ -22,6 +22,7 @@ import (
"net/http"
"code.vikunja.io/api/pkg/db"
"code.vikunja.io/api/pkg/modules/auth"
"github.com/labstack/echo/v4"
)
@ -48,7 +49,7 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
}
// Check if the user has the right to do that
currentAuth, err := config.AuthProvider.AuthObject(ctx)
currentAuth, err := auth.GetAuthFromClaims(ctx)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
}