aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/auth/middleware.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 00:05:30 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 00:05:30 +0530
commita356803594ab36fa69e7dbcbd79261d8b46f4262 (patch)
tree0146efe4c52b1c65c1967ab1f412306c410c10d4 /auth/middleware.go
parent193be465b21838d2796fafbe1c5d9854038a3f8c (diff)
removed useless user fields and functions, added rolesHEADv0.19.0master
Diffstat (limited to 'auth/middleware.go')
-rw-r--r--auth/middleware.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/auth/middleware.go b/auth/middleware.go
index 9ce5e12..80e512e 100644
--- a/auth/middleware.go
+++ b/auth/middleware.go
@@ -70,6 +70,9 @@ func Authorize() gin.HandlerFunc {
return
}
+ ctx.Set("UserID", claims.UserID)
+ ctx.Set("Roles", claims.Roles)
+
ctx.Next()
}
}