Page 1 of 2

User able to see another user's info

Posted: Wed Aug 27, 2014 8:53 pm
by Jake Hare7049642

I followed the instructions in the To-Do app in regards to logins, acl, etc. Problem is there are certain instances when a user creates an item within the app, and other users are able to see what that user made.

In one instance I saw that in the database the acl for the item all users could see was set to "*", but I don't know how that's possible if other users are able to create that same item and the acl is fine.

Can someone take a look at my mappings to see if they are correct? Image Image Image


User able to see another user's info

Posted: Thu Aug 28, 2014 12:07 am
by Yurii Orishchuk

Hi Jake,

Your mapping looks ok.

Please give us code which is you use in "Add JS" for acl field: http://prntscr.com/4h5tch/direct

Also please take a look in your "trooDB" collection in "acl" field whether is there only acl like {"userid...": {read: true, write: true}} in items.

Regards.


User able to see another user's info

Posted: Thu Aug 28, 2014 12:34 am
by Jake Hare7049642

ImageThis is what I used; is that right?


User able to see another user's info

Posted: Thu Aug 28, 2014 12:43 am
by Yurii Orishchuk

Jake,

It looks ok.

So please give us your app public link and describe steps to reproduce this problem.

Also it would be great if you share your DB with us and tell us it name.

Thanks and regards.


User able to see another user's info

Posted: Thu Aug 28, 2014 1:16 am
by Jake Hare7049642

Okay, just shared DB with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

Application is at http://appery.io/app/mobile-frame?src...

I wish I could reproduce it myself; it seems like it happens some times and not others. I'm working through a ton of scenarios right now so I'll try to reproduce and let you know. In the meantime can you look through the DB and see if there's a problem with the JS or something?

Thanks!! You guys are great.


User able to see another user's info

Posted: Thu Aug 28, 2014 1:25 am
by Jake Hare7049642

Should I change this default value for acl??? Image


User able to see another user's info

Posted: Thu Aug 28, 2014 2:28 am
by Yurii Orishchuk

Jake,

Unfortunatly we can not access your DB. Please give us it name.

Also, i've tested your app and see following request:
http://prntscr.com/4h6ynb/direct

This is correct acl for your goals.

We need steps to reproduce this issue. (where we can add item and in DB it will appear with wrong ACL).

Regards.


User able to see another user's info

Posted: Thu Aug 28, 2014 2:33 am
by Jake Hare7049642

The DB name is 'troopsDB'.

Currently I have this ACL Code:

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

Should I have this instead, so other users can't read a different user's info?:

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

What would that change do?


User able to see another user's info

Posted: Thu Aug 28, 2014 3:08 am
by Jake Hare7049642

So is an "*" in this location right?


User able to see another user's info

Posted: Thu Aug 28, 2014 4:27 am
by Yurii Orishchuk

Jake,

Your code:

pre

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

/pre

Exactly what you need.

Also - i can not see "troopsDB" is to be shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

Regards.