Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

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

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?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

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

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?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

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

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

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

Glad it's ok. Thank you for reply.

Return to “Issues”