Skip to content

Commit

Permalink
fix collection name error typo
Browse files Browse the repository at this point in the history
Signed-off-by: shaoting-huang <[email protected]>
  • Loading branch information
shaoting-huang committed Dec 4, 2024
1 parent 3445b8b commit ade99ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/proxy/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5365,7 +5365,7 @@ func (node *Proxy) validateOperatePrivilegeV2Params(req *milvuspb.OperatePrivile
return err
}
}
if err := ValidateObjectName(req.CollectionName); err != nil {
if err := ValidateCollectionName(req.CollectionName); err != nil {
return err
}
return nil
Expand Down
7 changes: 7 additions & 0 deletions internal/proxy/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,13 @@ func ValidateObjectName(entity string) error {
return validateName(entity, "object name")
}

func ValidateCollectionName(entity string) error {
if util.IsAnyWord(entity) {
return nil
}
return validateName(entity, "collection name")
}

func ValidateObjectType(entity string) error {
return validateName(entity, "ObjectType")
}
Expand Down

0 comments on commit ade99ce

Please sign in to comment.