fix version 1
This commit is contained in:
@@ -21,13 +21,13 @@ func DoSetManager(ctx context.Context, in *pb.GroupOPRequest) (reply *pb.DataSta
|
||||
return nil, err
|
||||
}
|
||||
// 判断是不是创建者
|
||||
var creator_id uint
|
||||
if err = impl.DBService.Model(&models.GroupBasic{}).Select("creator_id").Where("identity=?", in.GroupIdentity).Scan(&creator_id).Error; err != nil {
|
||||
var creatorID uint
|
||||
if err = impl.DBService.Model(&models.GroupBasic{}).Select("passport_id").Where("identity=?", in.GroupIdentity).Scan(&creatorID).Error; err != nil {
|
||||
printer.Error(err.Error())
|
||||
return nil, errcode.ErrDB
|
||||
}
|
||||
|
||||
if auth.ID != creator_id {
|
||||
if auth.ID != creatorID {
|
||||
return nil, errcode.ErrPermissionDenied
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user