Unable to add users to my application

0
I have a simple application that has log in page for administrator who after logging in can then add a user(by clicking ‘add user’ button)  with attributes like name, mail and password. Details: I am using a non persistent entity to fill the form and then create a persistent entity (user) which uses generalization with Administration Account. On clicking the save button in the form, it triggers a microflow to create the user object from the non persistent entity. When running the app, on clicking the save button, an error pops up. Checking the console I see the message that the logged in user is illegally trying to change the value of the object and the object (non persistent entity) is not writable. All the entity access are provided. Tried adding breakpoint in the microflow. On clicking, it doesn't even enter the microflow. BUT, If Security is off, there's no isssues. Any help would be useful.
asked
2 answers
3

Hello Vignesh,

If you are trying to change username, email etc, check if system.administrator access is given to your user role under security. If yes you won’t get the error.

Hope my answer helps. Reach me out for any queries.

answered
1

Hi Vignesh!

The error also occurs because you are attempting to write something to the non-persistent entity. It also looks like the user role with which you are logged in has only read access to this non-persistent entity.

 

You have two options:

  1. Update the entity access rules for this non-persistent entity and allow the role to read-write on the attributes you are attempting to change the values for.
  2. Call a sub microflow from inside your current microflow. This sub microflow should have no roles allowed. Do the user creation in this sub microflow.

I personally would suggest you to use the first option.

 

answered