File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,11 +86,6 @@ export default {
8686 async getSuggestions ( query ) {
8787 this . loading = true
8888
89- // Search for all used share-types, except public link.
90- const shareType = this . SHARE_TYPES_USED . filter (
91- ( type ) => type !== this . SHARE_TYPES . SHARE_TYPE_LINK ,
92- )
93-
9489 try {
9590 const request = await axios . get (
9691 generateOcsUrl ( 'apps/files_sharing/api/v1/sharees' ) ,
@@ -100,7 +95,7 @@ export default {
10095 itemType : 'file' ,
10196 perPage : this . maxAutocompleteResults ,
10297 search : query ,
103- shareType,
98+ shareType : [ this . SHARE_TYPES . SHARE_TYPE_USER ] ,
10499 } ,
105100 } ,
106101 )
@@ -133,6 +128,7 @@ export default {
133128 params : {
134129 format : 'json' ,
135130 itemType : 'file' ,
131+ shareType : [ this . SHARE_TYPES . SHARE_TYPE_USER ] ,
136132 } ,
137133 } ,
138134 )
@@ -185,11 +181,13 @@ export default {
185181 }
186182
187183 try {
184+ // filter out non users
185+ if ( share . value . shareType !== this . SHARE_TYPES . SHARE_TYPE_USER ) {
186+ return false
187+ }
188+
188189 // filter out current user
189- if (
190- share . value . shareType === this . SHARE_TYPES . SHARE_TYPE_USER
191- && share . value . shareWith === getCurrentUser ( ) . uid
192- ) {
190+ if ( share . value . shareWith === getCurrentUser ( ) ?. uid ) {
193191 return false
194192 }
195193
You can’t perform that action at this time.
0 commit comments