Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add security rules #1

Open
camstuart opened this issue Jul 8, 2023 · 1 comment
Open

Add security rules #1

camstuart opened this issue Jul 8, 2023 · 1 comment

Comments

@camstuart
Copy link

Hi Jeff, Great course!!

Would it be possible to share the rules you used for firestore and storage please?

@lryjnks
Copy link

lryjnks commented Jul 19, 2023

rules_version = '2';

// Craft rules based on data in your Firestore database
// allow write: if firestore.get(
// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin;
service firebase.storage {
match /b/{bucket}/o {
match /users/{userId}/{allPaths=**} {
allow read;
allow write: if userId == request.auth.uid;
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants