feat: Enhance security and user management

Refines Firestore and Storage rules to enforce stricter access controls for signals and user-uploaded files. Updates user data handling to ensure root administrator privileges are correctly applied and enforced. Organizes uploaded scan files into user-specific directories within storage.
This commit is contained in:
desartstudio95
2026-05-06 23:48:03 +02:00
parent 3fe6dd4671
commit 175723475a
4 changed files with 29 additions and 3 deletions
+3 -1
View File
@@ -79,7 +79,9 @@ service cloud.firestore {
// --- Signals Collection ---
match /signals/{signalId} {
allow get, list: if isSignedIn() && (resource.data.userId == request.auth.uid || isDbAdmin());
allow get: if isSignedIn() && (resource.data.userId == request.auth.uid || isDbAdmin());
allow list: if isSignedIn() && resource.data.userId == request.auth.uid;
allow list: if isDbAdmin();
function isValidSignal(data) {
return data.keys().hasAll(['userId', 'pair', 'timeframe', 'decision', 'score', 'timestamp', 'result'])