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:
+3
-1
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user