Restrict User - Autocompletion without Resticting Sahring To Groups


I’d like to hide users of other groups but it should be possible to share with any user when his/her full username is entered.

Is it possible to restrict the autocompletion in the sharg-dialog (an others) to the member of the groups of a user without restricting the sharing of files and folders to groups?