diff --git a/services/user/handlers.go b/services/user/handlers.go index ea630b2..f647a9d 100644 --- a/services/user/handlers.go +++ b/services/user/handlers.go @@ -83,7 +83,7 @@ func (s *service) account(w http.ResponseWriter, r *http.Request) httputil.ToRes return err } isAdmin, err := pls.CheckUser(r.Context(), user.KTHID, "admin-read") - return account(*user, passkeySettings) + return account(*user, passkeySettings, isAdmin) } func (s *service) acceptInvite(w http.ResponseWriter, r *http.Request) httputil.ToResponse { diff --git a/services/user/user.templ b/services/user/user.templ index 2bb6493..1414818 100644 --- a/services/user/user.templ +++ b/services/user/user.templ @@ -24,11 +24,22 @@ templ index(passkeyLogin func() templ.Component, devLogin func() templ.Component } } -templ account(user export.User, passkeySettings func() templ.Component) { +templ account(user export.User, passkeySettings func() templ.Component, isAdmin bool) { @templates.Modal() {