fix: create group type limit

This commit is contained in:
withchao 2023-08-09 10:29:52 +08:00
parent 598938c13c
commit 85d3045db3

View File

@ -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
}