From 04a97ac154869d0464215966cef23bcde0c2a364 Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:34:41 +0800 Subject: [PATCH] fix: create group type limit (#824) --- 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 3585c764a..b133a6448 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 }