Assign unique ID to "Guest" user
I am working on a workflow that would allow the general public to submit damage assessment information in case of an emergency. The permissions of the map are set to Anonymous Access, as we want anyone to be able to access this map and submit information. Ideally, I would like someone to be able to open the map, submit one or multiple damage assessments, and only see the assessments that they've submitted.
I was thinking I would use the "Get Current User" Activity, populate that user information into the data, and do some sort of query so the user would only see their submissions. However, the Get Current User activity just returns "Guest" when the site is not secure.
Does anyone have any ideas on how I can accomplish this?
0
-
An anonymous user will alway be anonymous, so you won't be able to get anything there. It sounds like you are trying to set permissions without an account by substituting some UID for actual credentials... I don't recommend this. You'll need some form of credential for this and its better to have the user create their own than it is to try derriving credentials from data provided to the app about them. There's no way for the app to know who is using a given client, so even if you were able to get a user's exact computer and user account info you have problems when that user is on another machine or if another user is on theirs. 0 -
What you can do is ask to enter user information when entering the first damage assesment.
Create then an unique code (Guid.NewGuid) and store this with user information and damage assesment in a database.
Return to the user a viewer url with an url parameter, something like <viewerurl>&runWorkflow=OpenAssessment&userid=edd8e7b8-5a1b-4861-8038-314bd5977742
When the user uses this URL the next time he opens the viewer, you can use an OpenAssessment workflow to search and display information entered earlier, and you cal let the user add/modify assesment information.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer