🎨 update

This commit is contained in:
landaiqing
2024-11-05 17:24:11 +08:00
parent a153e0345a
commit 0b22d9800c
16 changed files with 210 additions and 289 deletions

View File

@@ -10,7 +10,7 @@ import (
func CasbinMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
userIdAny, exists := c.Get("userId")
userIdAny, exists := c.Get("user_id")
if !exists {
global.LOG.Error("casbin middleware: userId not found")
result.FailWithMessage(ginI18n.MustGetMessage(c, "PermissionDenied"), c)