Page 3 of 3

Query Service Does not work when I want to display list based on query.

Posted: Mon Sep 09, 2013 12:26 pm
by Maryna Brodina

When you use DB Login service it returns user session key in sessionToken request parameter. If you save sessionToken into localStorage variable and then pass it into all REST services in "X-Appery-Session-Token" request parameter our server sends requests to DB from logged user.
This way server filters collection records which are available only for logged user. To retrieve all records you need to add to request Header Request Parameter "X-Appery-Master-Key" (value for this parameter you can find on Settings tab of specific DB)
More information is here


Query Service Does not work when I want to display list based on query.

Posted: Mon Sep 09, 2013 1:12 pm
by Deon

Maybe I am not clear.

A table contains records.

User Name Surname ACL
UsernameA Harry Potter 121314313
UsernameB John Doe 242242424
UsernameC Peter Pan 465475757

I am UsernameB. When logged in, I must only see UsernameB row, not other rows.
As I understand it, I must put the _id of the user into the acl column.

When I retrieve the data, I retrieve it based on the acl column.

Is this not correct?


Query Service Does not work when I want to display list based on query.

Posted: Mon Sep 09, 2013 1:27 pm
by Deon

I have looked at your link.
Is a session token not a just a temporary issue on login for the session and changes on each login or ifferent session or is a session token always the same for a user everytime they login?

It it is temporary, I would never be able to view my data entered from a previous session?


Query Service Does not work when I want to display list based on query.

Posted: Mon Sep 09, 2013 4:13 pm
by Deon

Hi
PLease close this thread. I figured it out.

I simply store user id in local storage and then add it to a col called userid. When I run a query, it filters.


Query Service Does not work when I want to display list based on query.

Posted: Mon Sep 09, 2013 9:14 pm
by Alena Prykhodko

Glad it's ok. Thank you for reply.