I have 2 collections: users and applications. Application documents have userID
as a key that is a reference the a user. When I submit an application I want to check if that userID from this application is contained in any of the users' documents. Is that possible? This is my rules for now but it's not working:
match /applications/{application} {
allow create: if request.auth.uid != null && request.resource.data.userID != request.auth.uid;