Hi, I have hosted two feature layers in ArcGIS Online 10.8 and consumed it as portal items in my webmap application using ESRI Javascript API 4.19. I have enabled editing for one feature layer and not enabled the editing for another feature layer since it is read-only.
I shared these two layers to an user account (named 'test_user') which has the role of 'users'. when I logged into the webmap application using 'test_user' account, I am able to retrieve these two layers from portal items.
But when looking at 'editingEnabled' Property of both layers, it returns as True. But actually for one feature layer, it should return as False. Even if I untick the 'Editing Enabled' option for hosted feature layers in ArcGIS Online, it's still return as True in the application.
view.map.layers.forEach(function (layer, index) {
console.log(layer.editingEnabled);
});
Suggest me a method to get the edit access of feature layer in Javascript API. Many thanks in advance.