Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ service cloud.firestore {
}

// Badges Subcollection
// Badge grants must come from trusted backend (Cloud Functions / Admin SDK).
// Self-writes are intentionally denied to prevent users from awarding
// themselves arbitrary badges without meeting the criteria.
match /badges/{badgeId} {
allow read: if true;
allow write: if isSuperAdmin() || (request.auth != null && request.auth.uid == userId);
allow write: if isSuperAdmin();
}

// GitHub Repos Subcollection
Expand Down