Compare commits
27 Commits
main
...
theoremone
Author | SHA1 | Date | |
---|---|---|---|
|
a48755b283 | ||
|
20e55f829a | ||
|
22799d1c3c | ||
|
dcafb50e06 | ||
|
cb071fc9b3 | ||
|
deed8426f1 | ||
|
21180c2ff0 | ||
|
bb897a0a0f | ||
|
dc29ca531c | ||
|
ae63f70a30 | ||
|
4b216b682e | ||
|
95e24e9b87 | ||
|
0fcfee6d77 | ||
|
a3bcbd0518 | ||
|
5d64d53c65 | ||
|
5e4a205025 | ||
|
064d7e4ccc | ||
|
3633167d8a | ||
|
c1fd17aba1 | ||
|
de10504606 | ||
|
e29174d622 | ||
|
c8add8ea51 | ||
|
20d18f3588 | ||
|
eef35cd7d0 | ||
|
a722de09d0 | ||
|
bfefa61d35 | ||
|
9258cf0f3d |
|
@ -5,14 +5,16 @@ service cloud.firestore {
|
||||||
match /databases/{database}/documents {
|
match /databases/{database}/documents {
|
||||||
|
|
||||||
function isAdmin() {
|
function isAdmin() {
|
||||||
return request.auth.uid == 'igi2zGXsfxYPgB0DJTXVJVmwCOr2' // Austin
|
return request.auth.uid == 'OTd2JFY7LOdvQg2ZQGYLUqrXAiD2' // Austin
|
||||||
|| request.auth.uid == '5LZ4LgYuySdL1huCWe7bti02ghx2' // James
|
|| request.auth.uid == 'czxKSN1Z03Mzu7UqIio3ppM0eDt2' // David
|
||||||
|| request.auth.uid == 'tlmGNz9kjXc2EteizMORes4qvWl2' // Stephen
|
}
|
||||||
|| request.auth.uid == 'IPTOzEqrpkWmEzh6hwvAyY9PqFb2' // Manifold
|
|
||||||
|
function isAuthed() {
|
||||||
|
return request.auth != null
|
||||||
}
|
}
|
||||||
|
|
||||||
match /users/{userId} {
|
match /users/{userId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
allow update: if resource.data.id == request.auth.uid
|
allow update: if resource.data.id == request.auth.uid
|
||||||
&& request.resource.data.diff(resource.data).affectedKeys()
|
&& request.resource.data.diff(resource.data).affectedKeys()
|
||||||
.hasOnly(['bio', 'bannerUrl', 'website', 'twitterHandle', 'discordHandle']);
|
.hasOnly(['bio', 'bannerUrl', 'website', 'twitterHandle', 'discordHandle']);
|
||||||
|
@ -23,7 +25,7 @@ service cloud.firestore {
|
||||||
}
|
}
|
||||||
|
|
||||||
match /contracts/{contractId} {
|
match /contracts/{contractId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
allow update: if request.resource.data.diff(resource.data).affectedKeys()
|
allow update: if request.resource.data.diff(resource.data).affectedKeys()
|
||||||
.hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags']);
|
.hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags']);
|
||||||
allow update: if isAdmin();
|
allow update: if isAdmin();
|
||||||
|
@ -31,25 +33,25 @@ service cloud.firestore {
|
||||||
}
|
}
|
||||||
|
|
||||||
match /{somePath=**}/bets/{betId} {
|
match /{somePath=**}/bets/{betId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
}
|
}
|
||||||
|
|
||||||
match /{somePath=**}/comments/{commentId} {
|
match /{somePath=**}/comments/{commentId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
allow create: if request.auth != null;
|
allow create: if request.auth != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
match /{somePath=**}/answers/{answerId} {
|
match /{somePath=**}/answers/{answerId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
}
|
}
|
||||||
|
|
||||||
match /folds/{foldId} {
|
match /folds/{foldId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
allow update, delete: if request.auth.uid == resource.data.curatorId;
|
allow update, delete: if request.auth.uid == resource.data.curatorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
match /{somePath=**}/followers/{userId} {
|
match /{somePath=**}/followers/{userId} {
|
||||||
allow read;
|
allow read: if isAuthed();
|
||||||
allow write: if request.auth.uid == userId;
|
allow write: if request.auth.uid == userId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user