raviqqe/tasks

View on GitHub
firestore.rules

Summary

Maintainability
Test Coverage
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /users/{userId}/projects/{projectName} {
      allow read, write: if request.auth.uid == userId;
    }
    match /version/1/users/{userId} {
      match /projects/{projectId} {
        allow read, write: if request.auth.uid == userId;

        match /todoTasks/{taskId} {
          allow read, write: if request.auth.uid == userId;
        }

        match /todoTaskOrders/default {
          allow read, write: if request.auth.uid == userId;
        }

        match /doneTasks/{taskId} {
          allow read, write: if request.auth.uid == userId;
        }
      }
    }
  }
}