-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstorage.rules
27 lines (23 loc) · 969 Bytes
/
storage.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 {
// This rule allows anyone with your Storage bucket reference to view, edit,
// and delete all data in your Storage bucket. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Storage bucket will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Storage bucket will be denied until you Update
// your rules
match /resume/{uid}/{resume} {
allow read, write: if requestMatchesUID(uid);
}
function requestMatchesUID(uid) {
return request.auth.uid == uid;
}
}
}