forked from hassan689/connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase_storage_rules.txt
More file actions
41 lines (34 loc) · 1.29 KB
/
firebase_storage_rules.txt
File metadata and controls
41 lines (34 loc) · 1.29 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
// Profile images - allow authenticated users to upload their own images
match /profile_images/{userId}/{allPaths=**} {
allow read: if true; // Anyone can view profile images
allow write: if request.auth != null && request.auth.uid == userId;
}
// Portfolio images - allow authenticated users to upload
match /portfolio_images/{allPaths=**} {
allow read: if true; // Anyone can view portfolio images
allow write: if request.auth != null;
}
// Task images - allow authenticated users to upload
match /task_images/{allPaths=**} {
allow read: if true; // Anyone can view task images
allow write: if request.auth != null;
}
// Task completion images - allow authenticated users to upload
match /task_completions/{allPaths=**} {
allow read: if true; // Anyone can view completion images
allow write: if request.auth != null;
}
// General images folder - allow authenticated users to upload
match /images/{allPaths=**} {
allow read: if true;
allow write: if request.auth != null;
}
// Default rule - deny all other access
match /{allPaths=**} {
allow read, write: if false;
}
}
}