Page 1 of 1

Help with setting ACL from app with multiple users in ACL

Posted: Tue Mar 24, 2015 5:13 pm
by Michael Droll

How can I set the ACL from within the app? The only tutorial i could find has it set from the backend. https://devcenter.appery.io/tutorials...

I also want to set the ACL to have teams consisting of multiple users to only view the teams data in the app via lists.

Example:
Team 1 has: user1, user2 and user3.
user1 is team leader
user2 is member
user3 is member
Members and read and write data for team1
leader can only view data for team1

Team2 has: user1, user4 and user5.
user1 is team leader
user4 is member
user5 is member
Members and read and write data for team2
leader can only view data for team2

Team1 cannot see team2's data and vise versa, user1 is in both teams and needs to only view a single team's data at a time. and this needs to be set from the app not the backend

I was thinking that I would create a collection called "teams" and create a record to get the _id from a database service add it to a column in userInfo and use that for the ACL. Is this possible and how would i go about doing it? a step by step guide would be helpful since I am new to app development and know little programming.

Thank you!


Help with setting ACL from app with multiple users in ACL

Posted: Thu Mar 26, 2015 3:43 am
by Yurii Orishchuk

Hi Michael,

Currently Appery.io not support such functionality(users role) you've described above out the box.

But you can implement it in following way:

1 Add to your users collection field "role".

2 Close all collections(which is need to manage permisions with security settings).

3 Create server script which is just implement ACL logic and translate all requests to the REST API. You should use in this server code "masterkey".

Please read more about server code here: https://devcenter.appery.io/documenta...

Regards.


Help with setting ACL from app with multiple users in ACL

Posted: Fri Mar 27, 2015 3:54 pm
by Michael Droll

I will try this out and see if it works, I haven't worked with the servercode yet.
So this should be fun. :)

Thank you, for the reply