From 85d3045db397cd5959880be2a481c8af97bb0645 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Wed, 9 Aug 2023 10:29:52 +0800 Subject: [PATCH] fix: create group type limit --- internal/rpc/group/group.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 3585c764a6..b133a6448a 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -161,6 +161,9 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR if req.OwnerUserID == "" { return nil, errs.ErrArgs.Wrap("no group owner") } + if req.GroupInfo.GroupType != constant.WorkingGroup { + return nil, errs.ErrArgs.Wrap(fmt.Sprintf("group type %d not support", req.GroupInfo.GroupType)) + } if err := authverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { return nil, err }