Pablo Cano
Posts: 0
Joined: Mon Aug 25, 2014 11:24 pm

Change permissions predefined collection

Hi,

I would like to know if it is possible to change the permissions to the default collection of users. I see that there is a button that allows change in that collection, remove permissions to read and write but i try it from an application that I keep seeing is possible for example to create a user, and do not understand why if i remove read or write access to this collection.

Thanks.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Change permissions predefined collection

Hi Pablo,

You can change ACL field dynamicaly from your.

Here is a solution for "signUp" Users service:

1 Open your "signup" service.

2 Add to this service "acl" request parameter http://prntscr.com/4ghwa9/direct

3 Open page with user registration.

4 Open registration service mapping.

5 Add link from current userId LSV to "acl" request field. http://prntscr.com/4gi2ws/direct

6 Click on "Edit JS" for "acl" field. And populate JS editor with following code: http://prntscr.com/4gi3if/direct

pre

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

/pre

Regards.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Change permissions predefined collection

I am looking to change the acl for the "signup" service after the user has been created, I don't want to change the original settings, just add another user for admin purposes.

I can see that from your solution all users have read access, I don't quite understand mapping the sessionToken to the acl?

I think that I need to set the acl after the user has been created, not before, so I can add the new user, the admin user and all other users as readonly.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Change permissions predefined collection

Hi Terry,

In your case you need to use "User update" service instead of "Signup".

Please read more about this service here: https://devcenter.appery.io/documenta...

To add some users to current acl you need:
1 Read current acl object and parse it.
2 Add to this object needed users.
3 Pass this object to "acl" request field for "update user" object.

Regards.

Return to “Issues”