AnsweredAssumed Answered

Is it possible to edit a GeodatabaseFeatureTable when anonymous access is disabled?

Question asked by jtenhave_Latitudegeo on Dec 7, 2018

Hello,

 

I am using version 100.4 of the runtime.

 

I am attempting to use the AGOL hosted feature layer setting for disabling anonymous access, but am running into issues getting it to work with GeodatabaseFeatureTables.

 

When using my hosted feature layer, all users are treated as anonymous since the layer is shared publicly -the AuthenticationManager will not issue any on-demand challenges. This results in the need to issue a pro-active challenge in order for any user to perform edits.

 

I was able to get this working with a ServiceFeatureTable using the following steps:

 

1). Create a hosted feature layer that is shared publicly, but restricts anonymous editing under the settings tab:

2). When attempting to edit a feature that is not editable, determine if the layer is editable but does not not support anonymous editing.

3). Use the AuthenticationManager and custom challenge handler to challenge for user credentials.

4). Set ServiceFeatureTable.Credential to the new credential.

 

However, I was not able to get this working with a GeodatabaseFeatureTable created from an offline map area. There is no Credential property on a GeodatabaseFeatureTable feature table, so I am not sure how to go about this. I have tried the following:

- Ensure that the AuthenticaionManager has a Credential with a ServiceUri that matches the GeodatabaseFeatureTable.Geodatabase.Source property before the table is loaded. This did not work.

 

So my question is: Is there any way to allow a user to perform edits on a GeodatabaseFeatureTable when anonymous editing is disabled?

 

Thanks,

Jeff

Outcomes