-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
41 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
rules_version = '2'; | ||
|
||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /users/{userId} { | ||
allow read: if true; // Allow all read operations | ||
allow write: if request.auth.uid != null | ||
&& request.auth.uid == userId // Ensure the user is the owner | ||
match /users/{uid} { | ||
// Allow read access to all users | ||
allow read: if true; | ||
|
||
// Allow write access only if the user is authenticated and is writing to their own document | ||
allow write: if request.auth != null && request.auth.uid == uid; | ||
} | ||
|
||
match /chatSessions/{sessionId} { | ||
allow read, write: if request.auth != null && resource.data.user.id == request.auth.uid; | ||
allow write: if request.auth.uid != null; // Allow write if user is authenticated | ||
|
||
match /chatSessions/{id} { | ||
allow read: if true; | ||
// Allow write access if the user is authenticated and the document's userId matches the authenticated user's ID | ||
allow write: if request.auth != null && request.resource.data.userId == request.auth.uid; | ||
} | ||
|
||
match /tools/{toolId} { | ||
allow read, write: if true; // Example rule allowing all read and write operations for tools | ||
// Adjust read and write rules as per your application's needs | ||
match /toolSessions/{id} { | ||
allow read: if true; | ||
// Allow write access if the user is authenticated and the document's userId matches the authenticated user's ID | ||
allow write: if request.auth != null && request.resource.data.userId == request.auth.uid; | ||
} | ||
match /toolSessions/{sessionId} { | ||
allow read: if request.auth != null; // Allow read if user is authenticated | ||
allow write: if request.auth != null; // Allow write if user is authenticated | ||
|
||
match /tools/{id} { | ||
allow read: if true; | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './QuizResponse'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters