From 2ea905e55768514ff0e0013a26ade70a370ca016 Mon Sep 17 00:00:00 2001 From: Tosone Date: Fri, 8 Mar 2024 11:56:05 +0800 Subject: [PATCH] :bug: Fix member policy field (#326) --- pkg/dal/dao/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/dal/dao/user.go b/pkg/dal/dao/user.go index 23bc0150..89203ed5 100644 --- a/pkg/dal/dao/user.go +++ b/pkg/dal/dao/user.go @@ -262,8 +262,8 @@ func (s *userService) UpdateByID(ctx context.Context, id int64, updates map[stri func (s *userService) AddPlatformMember(ctx context.Context, userID int64, role enums.UserRole) error { return s.tx.CasbinRule.WithContext(ctx).Create(&models.CasbinRule{ PType: ptr.Of("g"), - V1: ptr.Of(fmt.Sprintf("%d", userID)), - V2: ptr.Of(role.String()), + V0: ptr.Of(fmt.Sprintf("%d", userID)), + V1: ptr.Of(role.String()), }) }