I created a survey on Survey123 Connect and it generated a layer hosted on the Portal. It turns out that when I answer the survey without being logged in to the Portal (Public User) or with a user type 'Editor' I can send the answers normally. However, when I try to send responses for the same survey with the 'Viewer' user, I get the following message: {"error":{"code":500,"message":"User does not have the privilege to perform this operation.","details":["User does not have the privilege to perform this operation."]}}.
Can someone explain to me why without being logged in or logged in as 'Editor' user I can send the survey normally and once logged in as 'Viewer' user I can't?
Thank you in advance for your attention.
The user type of Viewer doesn't have the ability to edit data, which includes submitting a Survey123 form which is adding a record to a Hosted Feature Layer. When not signed into the Enterprise Portal, the system is using the privileges of the user who created the survey (generally a Publisher).
@ValmirSantana Echoing the words of Reese. If you are sharing the survey publicly, you are allowing anonymous users the ability to edit data.
Viewers though have no ability to edit data so if a user is using an account with the role of Viewer, their editing permissions are still governed by this role.
Hope this helps
Thank you for yours reposnse @ReeseFacendini and @Richard_Purkis . helped me so much