'Firestore - How to give access to subcollection to different user?

i am working on a project in flutter with firebase firestore as a database. It has two users Admin and User. Admin has subcollection food_item . is it possible to access the subcollection food_item from the User. i heard that altering some security rules will help to get access to that subcollection.

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write;
    }
  }
}

So if it is possible through changing rules can anyone help me. If not can you provide me other alternative reliable solutions.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source