Assigning a role to a user can be done with a special API. The API is available for Java and REST clients and must be executed in the Backendless custom business logic. For example, in order to assign a role to a user account during the user registration process, you would need to do the following:
- Create an API event handler using Backendless console. See how to generate event handler code using console. The event handler you need to create is one for the User service ("after" Register event).
- In the event handler code implement the logic checking if a role should be assigned to the new user and use the API to assign a role to a user. Scroll down to the "Assign a role to a user" section.
- Compile and deploy your custom event handler as described in the documentation.