-
Notifications
You must be signed in to change notification settings - Fork 559
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
35 changed files
with
475 additions
and
302 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
6 changes: 3 additions & 3 deletions
6
examples/rn-connection-and-error/backend/auth/custom_user_data.json
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,8 +1,8 @@ | ||
{ | ||
"enabled": true, | ||
"mongo_service_name": "mongodb-atlas", | ||
"database_name": "AuthExample", | ||
"database_name": "StoreDemo", | ||
"collection_name": "Users", | ||
"user_id_field": "user_id", | ||
"on_user_creation_function_name": "onUserCreation" | ||
"user_id_field": "userId", | ||
"on_user_creation_function_name": "setUserDefaultStoreId" | ||
} |
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
22 changes: 0 additions & 22 deletions
22
...s/rn-connection-and-error/backend/data_sources/mongodb-atlas/AuthExample/Users/rules.json
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ngodb-atlas/sync/Kiosk/relationships.json → ...-atlas/StoreDemo/Kiosk/relationships.json
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
23 changes: 23 additions & 0 deletions
23
...les/rn-connection-and-error/backend/data_sources/mongodb-atlas/StoreDemo/Kiosk/rules.json
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,23 @@ | ||
{ | ||
"database": "StoreDemo", | ||
"collection": "Kiosk", | ||
"roles": [ | ||
{ | ||
"name": "readAndWriteAll", | ||
"apply_when": {}, | ||
"document_filters": { | ||
"read": { | ||
"storeId": "%%user.custom_data.storeId" | ||
}, | ||
"write": { | ||
"storeId": "%%user.custom_data.storeId" | ||
} | ||
}, | ||
"insert": true, | ||
"delete": true, | ||
"search": true, | ||
"read": true, | ||
"write": true | ||
} | ||
] | ||
} |
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
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
...s/rn-connection-and-error/backend/data_sources/mongodb-atlas/StoreDemo/Product/rules.json
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,23 @@ | ||
{ | ||
"database": "StoreDemo", | ||
"collection": "Product", | ||
"roles": [ | ||
{ | ||
"name": "readAndWriteAll", | ||
"apply_when": {}, | ||
"document_filters": { | ||
"read": { | ||
"storeId": "%%user.custom_data.storeId" | ||
}, | ||
"write": { | ||
"storeId": "%%user.custom_data.storeId" | ||
} | ||
}, | ||
"insert": true, | ||
"delete": true, | ||
"search": true, | ||
"read": true, | ||
"write": true | ||
} | ||
] | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ngodb-atlas/sync/Store/relationships.json → ...-atlas/StoreDemo/Store/relationships.json
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
23 changes: 23 additions & 0 deletions
23
...les/rn-connection-and-error/backend/data_sources/mongodb-atlas/StoreDemo/Store/rules.json
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,23 @@ | ||
{ | ||
"database": "StoreDemo", | ||
"collection": "Store", | ||
"roles": [ | ||
{ | ||
"name": "readAndWriteAll", | ||
"apply_when": {}, | ||
"document_filters": { | ||
"read": { | ||
"_id": "%%user.custom_data.storeId" | ||
}, | ||
"write": { | ||
"_id": "%%user.custom_data.storeId" | ||
} | ||
}, | ||
"insert": true, | ||
"delete": true, | ||
"search": true, | ||
"read": true, | ||
"write": true | ||
} | ||
] | ||
} |
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
21 changes: 21 additions & 0 deletions
21
...les/rn-connection-and-error/backend/data_sources/mongodb-atlas/StoreDemo/Users/rules.json
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,21 @@ | ||
{ | ||
"database": "StoreDemo", | ||
"collection": "Users", | ||
"roles": [ | ||
{ | ||
"name": "ThisUser", | ||
"apply_when": { | ||
"userId": "%%user.id" | ||
}, | ||
"document_filters": { | ||
"read": true, | ||
"write": true | ||
}, | ||
"insert": true, | ||
"delete": true, | ||
"search": true, | ||
"read": true, | ||
"write": true | ||
} | ||
] | ||
} |
31 changes: 1 addition & 30 deletions
31
examples/rn-connection-and-error/backend/data_sources/mongodb-atlas/default_rule.json
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,30 +1 @@ | ||
{ | ||
"roles": [ | ||
{ | ||
"name": "readAndWriteAll", | ||
"apply_when": {}, | ||
"document_filters": { | ||
"write": true, | ||
"read": true | ||
}, | ||
"read": true, | ||
"write": true, | ||
"insert": true, | ||
"delete": true, | ||
"search": true | ||
}, | ||
{ | ||
"name": "readAll", | ||
"apply_when": {}, | ||
"document_filters": { | ||
"write": false, | ||
"read": true | ||
}, | ||
"read": true, | ||
"write": false, | ||
"insert": false, | ||
"delete": false, | ||
"search": true | ||
} | ||
] | ||
} | ||
{} |
19 changes: 0 additions & 19 deletions
19
examples/rn-connection-and-error/backend/data_sources/mongodb-atlas/sync/Kiosk/rules.json
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
examples/rn-connection-and-error/backend/data_sources/mongodb-atlas/sync/Product/rules.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.