diff --git a/handlers/manage-apikeys.go b/handlers/manage-apikeys.go index 406b28d..ad29599 100644 --- a/handlers/manage-apikeys.go +++ b/handlers/manage-apikeys.go @@ -12,12 +12,16 @@ import ( func ManageAPIKeys() echo.HandlerFunc { return func(c echo.Context) error { addHeaders(c) - u := c.Get("sessUsr").(moduser.User) + + u := c.Get("sessUsr") p := newPage() p.Title = "Manage API Keys" p.Current = "api-keys" - p.User = u + + if _, ok := u.(moduser.User); ok { + p.User = u.(moduser.User) + } if setting.APIKeyHIBP() != "" { p.Data["hibpApiKey"] = setting.APIKeyHIBP()