-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
53 lines (53 loc) · 2.12 KB
/
Copy pathdatabase.rules.json
File metadata and controls
53 lines (53 loc) · 2.12 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
42
43
44
45
46
47
48
49
50
51
52
53
{
"rules": {
"users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
},
"__applications__": {
".read": "true",
".write": "!data.exists() && newData.exists()"
},
"tmp": {
".read": "false",
".write": "true"
},
"applications": {
".read": "true",
"$term": {
"$department": {
".indexOn": "gradschoolControl/isVerified",
"$appid": {
".read": "root.child('users').child(auth.uid).child('applications').child($appid).exists() || root.child('users').child(auth.uid).child('role').val() == 1 || root.child('users').child(auth.uid).child('role').val() == 2",
".write": "!data.exists() && newData.exists()",
"content": {
".read": "root.child('users').child(auth.uid).child('applications').child($appid).exists() || root.child('users').child(auth.uid).child('role').val() == 1 || root.child('users').child(auth.uid).child('role').val() == 2",
".write": "root.child('users').child(auth.uid).child('applications').child($appid).exists() || !data.exists()"
},
"departmentControl": {
".read": "root.child('users').child(auth.uid).child('applications').child($appid).exists() || root.child('users').child(auth.uid).child('role').val() == 1",
".write": "root.child('users').child(auth.uid).child('role').val() == 1"
},
"gradschoolControl": {
".read": "root.child('users').child(auth.uid).child('applications').child($appid).exists() || root.child('users').child(auth.uid).child('role').val() == 2",
".write": "root.child('users').child(auth.uid).child('role').val() == 2"
}
}
}
}
},
"departments": {
".read": "auth.uid != null",
".write": "root.child('users').child(auth.uid).child('role').val() == 2",
"$department": {
".write": "root.child('users').child(auth.uid).child('role').val() == 1"
}
},
"applicantGuide": {
".read": "auth.uid != null",
".write": "false"
}
}
}