Auto Assign "Creator" for Ownership Access Control

729
5
02-10-2014 11:13 AM
BrianLord1
Occasional Contributor
Good Afternoon,

I am working on configuring the "Citizen Service Request" from the Local Government resource center.  I am making this app for internal use, where one staff member can create a service request and based on the "type" of request it will automatically get assigned to the relevant department.

I want to set up ownership access control so that only the assigned department (user) can mark the request as complete.  My problem is that I dont want to force everyone who uses it to sign in (unless they are going to mark an assigned request complete) and I also dont want the user who creates the request to have the control over the feature, I want the assigned user.

I have tried (unsuccessfully) to change the value of the "created_user" field, which is one of the default editor tracking fields and the field that I believe is used to determine ownership access.  In addition, since I do not sign in before creating the request the field is populated with "ESRI_Anonymous".  When I look at the feature service in the arcgis services directory the editor tracking fields are say "editable: false" so I assume that is the reason I cant update the fields using applyEdits like I do with the rest of the fields.

Is there a way to overwrite the created_user" value through applyEdits or is there any other way to give ownership access control to a user other than the one who actually creates the feature?

Hope that all makes sense.

Thanks,
Mark
0 Kudos
5 Replies
JianHuang
Occasional Contributor III
Mark,

I'm not sure if I understand your question.
But you are not supposed to change the editor field manually outside the context of editing the feature. It looked like you enabled ownership-based-access-control. What is the configuration there? You can check on "query", "update" and "delete" so that all users can fully access features created by other users.
0 Kudos
BrianLord1
Occasional Contributor
Thanks for the response.  Yeah, I was hoping there was a way to allow only specific users to be able to "update" certain points.

I also do not want to require everyone to sign in so I guess I will just not use ownership access control.
0 Kudos
JeffPace
MVP Alum
Right, as far as general concepts are concerned, if a user doesnt log in, then all users are the same "web" user.

If you are willing to hardcode users, and have a way of identifying users (ip, etc..) you could hardcode and instantiate the identitymanager on a per session basis, and then use the user_id

However it sounds like you have some workflow issues to resolve prior to the application issues, i.e.

Want user uniquely identified in application, do not want user to have to identify themselves. Basically if you don't want them to do it, you have to do it for them
0 Kudos
BrianLord1
Occasional Contributor
Jeff, thanks for your response.  I think I have poorly explained exactly what I want to do, although either way I will run into the same issue.

Here is a very simple example of what I was trying to do,

User A identifies a problem they need fixed.  They open the app and add a service request.  Based on the type of request, it gets assigned to User B.

Shortly after, User A creates another service request.  Based on the type of request, it gets assigned to User C. 

When user B and user C complete their tasks they open the app and sign in and then mark the requests complete.  However, I only want User B to be able to mark the task assigned to him complete and not be able to edit the task assigned to User C.


When I say I dont want everyone to sign in, I mean I dont want to force every "User A" to sign in because it doesnt really matter to me who originally created the request.  I was just trying to allow only the assigned user to mark it complete.  In order to do this, I think I would need to login (behind the scenes) using the user id of whoever it will be assigned to.  That way in the editing tacking fields it will look like they created the request.

Its probably more work than it is worth, since this is just for internal staff I am not too worried about people messing up the data.

Thanks,
Mark
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Hi Mark,

I was working with a customer who was also using the Citizen Service Request app.  The app was used by the public to enter requests.  We created a web map in ArcGIS.com, and then an application using the Edit template for the staff to update the requests.

One option you could do is to create a web map and apply a filter for the requests User B needs to update.  Save this web map, and then convert it to the edit application.  You can easily remove the editor widget, so when user B logs in to the application they will only see and update the requests they are assigned.  The same steps can be applied for User C.

One drawback is that there will be a couple applications rather than just one.
0 Kudos