Comments (11)
Can you show a sample of your rules?
from todo-react-redux.
from todo-react-redux.
So what I'm trying to do is have people who are both authenticated and not authenticated to see tasks on the landing page. However it's still blank when I set permissions to true. I also tried to set just the path to tasks/ in the actions.js in the loadTasks () function. But the issue there is that it can't get past each individual authentication key. So I get an error there as well. What I'm thinking is that when I save a task I need to get rid of the authentication key and just save each record without it. If you know a solution that would be a big help!
from todo-react-redux.
In order to use path /tasks
to get all tasks, you would need to modify your rules to something like:
{
"rules": {
"tasks": {
".read": true,
"$uid": {
".read": true,
".write": "auth !== null && auth.uid === $uid",
".indexOn": ["completed"]
}
}
}
}
from todo-react-redux.
from todo-react-redux.
seems its still having trouble pulling the record even with indexOn: ["title"] The error im getting in the dev console is that " Cannot read property 'title' of null"
from todo-react-redux.
So I found that its pulling everyones data. But the record is 3 to 4 levels deep. Auth ID -> Record ID -> Data. Do you know of a way to loop twice through something within a render(){ I think it just needs to loop one more time?
from todo-react-redux.
+1 Were you ever able to do this? Where is that simulation results page?
from todo-react-redux.
I"m running this
ref.once('value', (snapshot) => {
console.log(snapshot);
console.log(snapshot.val());
....
in the firebase-list.js file with the firebase rules changed to what's above, but I'm still getting only the tasks from the user logged in.
from todo-react-redux.
I see I had to change taskList.path = '/all';
to taskList.path = '/tasks';
like @KillerBee05 . Where is this 'tasks' route decided?
from todo-react-redux.
Ok nvm. I think I understand what is going on here. I'll post what I did incase it helps anyone else. I created a new collection on firebase after I added it to the rules, and then pushed the tasks to that
firebaseDb.ref('/all')
.push(value, error => error ? reject(error) : resolve());
and then i can decide what the path is.
export function loadAllTasks(){
return (dispatch) => {
taskList.path = '/all';
console.log('load all')
console.log(taskList)
taskList.subscribe(dispatch);
}
}
from todo-react-redux.
Related Issues (20)
- Trying to get images to load HOT 2
- Email login HOT 1
- How are you resolving 'src/core/auth'? HOT 2
- Add a description to task
- Show date when task is added and completed
- Example of route data resolution? HOT 4
- how to do an incremental build HOT 5
- Cannot reslove symbol 'AppContainer'
- Quick question about Firebase-list.js HOT 6
- Integrate redux auth library
- Question: self-binding HOT 1
- Firebase Deployment HOT 10
- Saving to Firebase HOT 1
- Error error HOT 1
- cant login HOT 1
- Module not found error (css files)
- reasons to use `firebase-tools` HOT 1
- Add Confirmation Dialog for Logout Feature
- add deleted items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from todo-react-redux.