The following Firestore rule checks that the request being made to your database contains a uid
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: request.auth.uid != null;
}
}
}
Or if you want to check if the role of user is 'admin'
match /users/{userRole} {
allow read: if userRole == 'admin';
}