mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
fix: AdminToken save to redis && limit 1 for each userID (#3224)
This commit is contained in:
@@ -88,7 +88,7 @@ func Start(ctx context.Context, config *Config, client discovery.Conn, server gr
|
||||
users := make([]*tablerelation.User, 0)
|
||||
|
||||
for _, v := range config.Share.IMAdminUserID {
|
||||
users = append(users, &tablerelation.User{UserID: v, Nickname: v, AppMangerLevel: constant.AppNotificationAdmin})
|
||||
users = append(users, &tablerelation.User{UserID: v, Nickname: v, AppMangerLevel: constant.AppAdmin})
|
||||
}
|
||||
userDB, err := mgo.NewUserMongo(mgocli.GetDB())
|
||||
if err != nil {
|
||||
@@ -605,7 +605,7 @@ func (s *userServer) GetNotificationAccount(ctx context.Context, req *pbuser.Get
|
||||
if err != nil {
|
||||
return nil, servererrs.ErrUserIDNotFound.Wrap()
|
||||
}
|
||||
if user.AppMangerLevel == constant.AppAdmin || user.AppMangerLevel >= constant.AppNotificationAdmin {
|
||||
if user.AppMangerLevel >= constant.AppAdmin {
|
||||
return &pbuser.GetNotificationAccountResp{Account: &pbuser.NotificationAccountInfo{
|
||||
UserID: user.UserID,
|
||||
FaceURL: user.FaceURL,
|
||||
|
||||
Reference in New Issue
Block a user