This file contains hidden or 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
| service cloud.firestore { | |
| match /databases/{database}/documents { | |
| match /{document=**} { | |
| allow read, write: if false; | |
| } | |
| } | |
| } |
This file contains hidden or 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
| function getRole() { | |
| return get(/databases/$(database)/documents/users/$(request.auth.uid)) | |
| } |
This file contains hidden or 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
| function getRole(role) { | |
| return get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles[role] | |
| } |
This file contains hidden or 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
| service cloud.firestore { | |
| match /databases/{database}/documents { | |
| match /exercises { | |
| function getRole(role) { | |
| return get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles[role] | |
| } | |
| allow read: if getRole('subscriber') == true; | |
| allow update: if getRole('editor') == true; | |
| allow create, delete: if getRole('admin') == true; | |
| } |
This file contains hidden or 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
| match /{document=**} { | |
| allow read, write: if (request.auth.uid != null); | |
| } |
This file contains hidden or 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
| service cloud.firestore { | |
| match /databases/{database}/documents { | |
| match /exercises { | |
| function getRole(role) { | |
| return get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles[role] | |
| } | |
| allow read: if getRole('subscriber') == true; | |
| allow update: if getRole('editor') == true; | |
| allow create, delete: if getRole('admin') == true; | |
| } |
This file contains hidden or 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
| match /{document=**} { | |
| allow read, write: if (request.auth.uid != null); | |
| } |
This file contains hidden or 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
| import React from 'react'; | |
| import App from './App'; | |
| import renderer from 'react-test-renderer'; | |
| it('renders without crashing', () => { | |
| const rendered = renderer.create(<App />).toJSON(); | |
| expect(rendered).toBeTruthy(); | |
| }); |
This file contains hidden or 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
| import React from 'react'; | |
| import App from './App'; | |
| import renderer from 'react-test-renderer'; | |
| import Adapter from 'enzyme-adapter-react-16' | |
| import { shallow, configure } from 'enzyme'; | |
| configure({ adapter: new Adapter() }); | |
| it('renders without crashing', () => { |
This file contains hidden or 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
| import React from 'react'; | |
| import { StyleSheet, Text, View, Button } from 'react-native'; | |
| export default class App extends React.Component { | |
| render() { | |
| return ( | |
| <View style={styles.container}> | |
| <Text>Open up App.js to start working on your app!</Text> | |
| <Text>Changes you make will automatically reload.</Text> | |
| <Text>Shake your phone to open the developer menu.</Text> |
OlderNewer