File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,10 @@ export const queryListings = ({
213213 params . userId = userId || '__NO_USER__' ;
214214 // user scoping (non-admin only): restrict to listings whose job belongs to user
215215 if ( ! isAdmin ) {
216- whereParts . push ( `(j.user_id = @userId)` ) ;
216+ // Include listings from jobs owned by the user or jobs shared with the user
217+ whereParts . push (
218+ `(j.user_id = @userId OR EXISTS (SELECT 1 FROM json_each(j.shared_with_user) AS sw WHERE sw.value = @userId))` ,
219+ ) ;
217220 }
218221 if ( freeTextFilter && String ( freeTextFilter ) . trim ( ) . length > 0 ) {
219222 params . filter = `%${ String ( freeTextFilter ) . trim ( ) } %` ;
Original file line number Diff line number Diff line change 11{
22 "name" : " fredy" ,
3- "version" : " 14.2.0 " ,
3+ "version" : " 14.2.1 " ,
44 "description" : " [F]ind [R]eal [E]states [d]amn eas[y]." ,
55 "scripts" : {
66 "prepare" : " husky" ,
You can’t perform that action at this time.
0 commit comments