Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

filtered data by uid

See original GitHub issue

Hi, I would like to make users read the firestore data they only created.

for example, there are users A and B. two firestore data are { name: 'apple', uid: 'A', }, { name: 'tomato', uid: 'B', } A has to read A’s data. A’s data must not be shown to B B has to read B’s data. B’s data must not be shown to A

I’ve tried initialFilter of buildCollection to implement this but I couldn’t

how can I resolve this?

Thank you

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

fgatti675commented, Aug 1, 2022

You can use now the prop forceFilter in collections for this exact purpose, in the latest v2.0.0 versions

fgatti675commented, Mar 25, 2022

Hi @woosuk288 I am afraid this is not possible at this time. You could change the initialFilter based on the user id, using a NavigationBuilder, but the users could still change the filter manually. We will consider this use case for the future

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Get User Specific Data By UID in Firebase [RTDB]
As you can see, you can easily obtain user data by passing the currently logged-in user's uid on the database reference path.
Read more >
Android Firebase Filter by user id - Stack Overflow
I have defined query to filter by user id, but for some reason it does not work as it still shows the post...
Read more >
find page for data item by uid, in sorted / filtered grid - Telerik
In a pageable grid, I want to move to the page that contains the row for uid == x. But how can I...
Read more >
Filter and Sort based on User ID and Item ID
Do you want to filter your Data Table records based on the Item ID (from 'Purpose of Data extraction' list) which matches with...
Read more >
Publish to Web - Filter Data by User ID?
I want to build a single report and have different users see only the data I want them to see based on their...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found