@@ -117,8 +117,8 @@ var parseModelListSearchQuery = function (aModelListQuery, aQuery, aSearchOption
117117 } ) ;
118118} ;
119119
120- var parseScriptSearchQuery = function ( aScriptListQuery , aQuery ) {
121- if ( lockdown || limitQuery . Script === 'true' ) {
120+ var parseScriptSearchQuery = function ( aScriptListQuery , aQuery , aLimited ) {
121+ if ( lockdown || limitQuery . Script === 'true' || aLimited ) {
122122 parseModelListSearchQuery ( aScriptListQuery , aQuery , {
123123 partialWordMatchFields : [ 'name' , '_description' , 'author' ] ,
124124 fullWordMatchFields : [ 'meta.UserScript.include.value' , 'meta.UserScript.match.value' ]
@@ -132,8 +132,8 @@ var parseScriptSearchQuery = function (aScriptListQuery, aQuery) {
132132} ;
133133exports . parseScriptSearchQuery = parseScriptSearchQuery ;
134134
135- var parseGroupSearchQuery = function ( aGroupListQuery , aQuery ) {
136- if ( lockdown || limitQuery . Group === 'true' ) {
135+ var parseGroupSearchQuery = function ( aGroupListQuery , aQuery , aLimited ) {
136+ if ( lockdown || limitQuery . Group === 'true' || aLimited ) {
137137 parseModelListSearchQuery ( aGroupListQuery , aQuery , {
138138 partialWordMatchFields : [ 'name' ] ,
139139 fullWordMatchFields : [ ]
@@ -147,8 +147,8 @@ var parseGroupSearchQuery = function (aGroupListQuery, aQuery) {
147147} ;
148148exports . parseGroupSearchQuery = parseGroupSearchQuery ;
149149
150- var parseDiscussionSearchQuery = function ( aDiscussionListQuery , aQuery ) {
151- if ( lockdown || limitQuery . Discussion === 'true' ) {
150+ var parseDiscussionSearchQuery = function ( aDiscussionListQuery , aQuery , aLimited ) {
151+ if ( lockdown || limitQuery . Discussion === 'true' || aLimited ) {
152152 parseModelListSearchQuery ( aDiscussionListQuery , aQuery , {
153153 partialWordMatchFields : [ 'topic' ] ,
154154 fullWordMatchFields : [ 'author' ]
@@ -162,8 +162,8 @@ var parseDiscussionSearchQuery = function (aDiscussionListQuery, aQuery) {
162162} ;
163163exports . parseDiscussionSearchQuery = parseDiscussionSearchQuery ;
164164
165- var parseCommentSearchQuery = function ( aCommentListQuery , aQuery ) {
166- if ( lockdown || limitQuery . Comment === 'true' ) {
165+ var parseCommentSearchQuery = function ( aCommentListQuery , aQuery , aLimited ) {
166+ if ( lockdown || limitQuery . Comment === 'true' || aLimited ) {
167167 parseModelListSearchQuery ( aCommentListQuery , aQuery , {
168168 partialWordMatchFields : [ 'content' ] ,
169169 fullWordMatchFields : [ 'author' ]
@@ -185,8 +185,8 @@ var parseSyncSearchQuery = function (aSyncListQuery, aQuery) {
185185} ;
186186exports . parseSyncSearchQuery = parseSyncSearchQuery ;
187187
188- var parseUserSearchQuery = function ( aUserListQuery , aQuery ) {
189- if ( lockdown || limitQuery . User === 'true' ) {
188+ var parseUserSearchQuery = function ( aUserListQuery , aQuery , aLimited ) {
189+ if ( lockdown || limitQuery . User === 'true' || aLimited ) {
190190 parseModelListSearchQuery ( aUserListQuery , aQuery , {
191191 partialWordMatchFields : [ 'name' ] ,
192192 fullWordMatchFields : [ ]
@@ -302,7 +302,7 @@ var applyModelListQueryDefaults = function (aModelListQuery, aOptions, aReq, aDe
302302 aOptions . searchBarValue = aReq . query . q ;
303303
304304 if ( aDefaultOptions . parseSearchQueryFn ) {
305- aDefaultOptions . parseSearchQueryFn ( aModelListQuery , aReq . query . q ) ;
305+ aDefaultOptions . parseSearchQueryFn ( aModelListQuery , aReq . query . q , ! ! ! authedUser ) ;
306306 }
307307 }
308308 } else if ( ! aReq . query . q ) {
0 commit comments