Page 2 of 3

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

Posted: Sun Sep 08, 2013 5:28 pm
by Deon

restservice5


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

Posted: Sun Sep 08, 2013 5:58 pm
by maxkatz

You need quotes around SuperSpar


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

Posted: Sun Sep 08, 2013 6:27 pm
by Deon

Aaagh, I tried it but must have had the double quotes on the inside of the single quotes or something. Thank you. thank you. I have been battling with this over stupid syntax issue. Thats what happens when you copy code straight from incorrect posts I guess.


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

Posted: Sun Sep 08, 2013 7:51 pm
by Deon

Can I use this same method for the acl column. I a post you provided


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

Posted: Sun Sep 08, 2013 7:58 pm
by Deon

I have used this...

var acl = {};
acl[value]= { "read": true, "write": true };
return acl;

but it does not seem to work.

I have noticed that the values in the acl column of the database are enclosed in quotes. Could that be a reason.

I used a list service for this.


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

Posted: Sun Sep 08, 2013 8:37 pm
by Alena Prykhodko

Please show us several screen shots with data/mapping.


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

Posted: Mon Sep 09, 2013 4:22 am
by Deon

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

Posted: Mon Sep 09, 2013 10:23 am
by Maryna Brodina

Hello!
1) You added request parameter "acl", but it doesn't affect service. If you need to make a search request in column use Query service.
2) You use "acl" field to restrict user access to data. It means when you retrieve data through service permissions from "acl" field will be taken into account. So if current logged user isn't set in "acl" field of some record, servise hides this record. If REST service returns emty list then current user doesn't have necessary permission.


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

Posted: Mon Sep 09, 2013 10:44 am
by Deon

I want to restict user access. On login I set storage variable id with _id from user table.


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

Posted: Mon Sep 09, 2013 10:45 am
by Deon

I want to show all records for logged on user. No filter.