You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a collection to which all users have read access but only admin users have read/write access. When logged in as admin I can bind the collection to vuex state but for other users calling bindFirestoreRef throws the following error:
Uncaught Error in onSnapshot: FirebaseError: Missing or insufficient permissions
My code:
// Ref is a Query on the collection
bindRef: firestoreAction (async ({ bindFirestoreRef }, ref) => {
// Added below line to check permission
const snap = await ref.get(); // Works for all user
await bindFirestoreRef('list', ref); // Throws error for non admin users
})
The text was updated successfully, but these errors were encountered:
This is weird Vuefire only do read access. I would need a boiled down repro to check this: you can send me the boiled down rules and a small set of data so I can check it
I figured out the issue. Documents in my collection had references to other documents to which user didn't have access to. Making maxRefDepth = 0 fixed the issue.
But I have another issue now. My document has 2 fields which are references I want to bind one of those references and leave the other reference(users do not have access to this document) unbinded.
I have a collection to which all users have read access but only admin users have read/write access. When logged in as admin I can bind the collection to vuex state but for other users calling
bindFirestoreRef
throws the following error:My code:
The text was updated successfully, but these errors were encountered: