diff --git a/pkg/api/role.go b/pkg/api/role.go index 1758114..a853449 100644 --- a/pkg/api/role.go +++ b/pkg/api/role.go @@ -5,6 +5,11 @@ import "strings" type Role string const ( + GodUserID = "god-kaytu-user" +) + +const ( + InternalRole Role = "internal" KaytuAdminRole Role = "kaytu-admin" AdminRole Role = "admin" EditorRole Role = "editor" @@ -13,6 +18,8 @@ const ( func GetRole(s string) Role { switch strings.TrimSpace(strings.ToLower(s)) { + case string(InternalRole): + return InternalRole case string(KaytuAdminRole): return KaytuAdminRole case string(AdminRole): diff --git a/pkg/httpclient/request.go b/pkg/httpclient/request.go index 2709348..101be55 100644 --- a/pkg/httpclient/request.go +++ b/pkg/httpclient/request.go @@ -6,14 +6,14 @@ import ( "context" "encoding/json" "fmt" - "github.com/kaytu-io/kaytu-engine/pkg/httpserver" "io" "mime/multipart" "net/http" url2 "net/url" "time" - "github.com/kaytu-io/kaytu-engine/pkg/auth/api" + "github.com/kaytu-io/kaytu-util/pkg/api" + "github.com/kaytu-io/kaytu-util/pkg/httpserver" "github.com/labstack/echo/v4" )