Page 1 of 1

Change permissions predefined collection

Posted: Mon Aug 25, 2014 11:24 pm
by Pablo Cano

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.


Change permissions predefined collection

Posted: Tue Aug 26, 2014 3:45 am
by Yurii Orishchuk

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.


Change permissions predefined collection

Posted: Fri Aug 14, 2015 12:55 pm
by Terry Gilliver

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.


Change permissions predefined collection

Posted: Mon Aug 24, 2015 5:40 am
by Yurii Orishchuk

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.