From 23845e25dd2d0117477c03036390a3667be105d8 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Sun, 25 May 2025 14:53:38 +0200 Subject: [PATCH] feat: add admin role for all users for now --- internal/oauth/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/oauth/routes.go b/internal/oauth/routes.go index 8a80f32..c429e93 100644 --- a/internal/oauth/routes.go +++ b/internal/oauth/routes.go @@ -144,7 +144,7 @@ func (h *OAuthHandler) tokenEndpoint(w http.ResponseWriter, r *http.Request) { Name: user.FullName, Picture: user.ProfilePicture.String, Nonce: nonce, - Roles: []string{"user"}, + Roles: []string{"user", "admin"}, RegisteredClaims: jwt.RegisteredClaims{ Issuer: "https://cb5f-2a00-10-5b00-c801-e955-5c68-63d0-b777.ngrok-free.app", // TODO: use dedicated API id that is in local DB and bind to user there