This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new 659a3383 fix: GetUserIsAdminModerator failed
659a3383 is described below
commit 659a3383c9c05834f3d97fda5f6ccc24eec56bb5
Author: sy-records <[email protected]>
AuthorDate: Tue Sep 17 18:37:14 2024 +0800
fix: GetUserIsAdminModerator failed
---
internal/service/user_common/user.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/service/user_common/user.go
b/internal/service/user_common/user.go
index 084dd389..a10c4766 100644
--- a/internal/service/user_common/user.go
+++ b/internal/service/user_common/user.go
@@ -234,7 +234,7 @@ func (us *UserCommon) CacheLoginUserInfo(ctx
context.Context, userID string, use
return "", nil, err
}
if userCacheInfo.RoleID == role.RoleAdminID {
- if err = us.authService.SetAdminUserCacheInfo(ctx, accessToken,
&entity.UserCacheInfo{UserID: userID}); err != nil {
+ if err = us.authService.SetAdminUserCacheInfo(ctx, accessToken,
userCacheInfo); err != nil {
return "", nil, err
}
}