Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Reglas de seguridad de Firestore para consultas con IN

estoy haciendo una consulta

 firestore().collection('stories') .where('published', '==', true) .where(firestore.FieldPath.documentId(), 'in', storyIds) .get()

Tengo una regla para las historias.

 match /stories/{storyId} { allow read: if resource.data.published == true; }

Y obtengo un error [firestore/permiso denegado] si hay una identificación de historia no publicada en mi lista. ¿Qué estoy haciendo mal?

ACTUALIZADO

 storyIds=["story2","story3"]

Documentos de Firestore

historia2 story2 doc

historia3 story3 doc

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

He encontrado solución. Acabo de agregar mi ID de documentId en el documento como id y cambié la consulta.

 firestore().collection('stories') .where('published', '==', true) .where('id', 'in', storyIds) .get()

Esto funciona ahora.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!