Thanks for getting back to us and for the provided details. We are investigating the behavior you encountered.
Below I will try to explain the expected behavior as to the steps in your workflow and ask you for some further details.
1. Read the resources of a Content Type, all is running well. Everlive creates the localStorage Item and so on...
Yes, at this point the items are read from the online connection and you are then going in offline mode.
2. When I deny the read for ONE resource of that Content Type in the backend and make again a request (dataSource.read()) I get in the request result the JSON without the denied resource
My understanding is that you are applying an item – level permission to just a single item – is that correct? Can you specify how do you deny the READ operation for an item in a content type?
3. set everlive to online
Switch to online after working for a while in offline mode.
4. call everlive.sync() -> network monitor do not show me a request to the server, if I am in online mode the denied resource is not in my data, after switching to offline mode, the resource is available. And the syncEnd event is not giving me any sync error :(
Perhaps there are no changes in the offline files that is why the sync invocation does not make an actual request to the server.Could you elaborate?
5. I tried the following:
everlive.purge("Content Type"); //removes the localStorage item
everlive.sync(); //no request and no sync error on syncEnd event
myDataSource.read() //everlive creates again the localStorage item of the Content Type with the denied resource although this resource was not in the request result
Your application logic seems correct. However, I am assuming that the data source instance was still alive in the simulator/device. This means that the UI is bound to the data even if it is not available.
Can you confirm that:
- You reloaded forcefully the simulator after the changes in the code were made?
- The denied resource was in the localStorage
- The user making the request cannot read it?
We will appreciate if you could provide a simple client project that represents the issue and explain the setup of your backend project (permissions and content types).
On a side note, could you specify which sections of the documentation are not clear?
I look forward to your reply.