forked from vinaykamble289/ProofOfPrecense
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage.rules
More file actions
29 lines (25 loc) · 904 Bytes
/
Copy pathstorage.rules
File metadata and controls
29 lines (25 loc) · 904 Bytes
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
28
29
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
// Allow authenticated users to read and write their own files
match /users/{userId}/{allPaths=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Allow authenticated users to read and write student photos
match /students/{studentId}/{allPaths=**} {
allow read, write: if request.auth != null;
}
// Allow authenticated users to read and write session files
match /sessions/{sessionId}/{allPaths=**} {
allow read, write: if request.auth != null;
}
// Allow authenticated users to read and write attendance photos
match /attendance/{recordId}/{allPaths=**} {
allow read, write: if request.auth != null;
}
// Default rule: deny all
match /{allPaths=**} {
allow read, write: if false;
}
}
}