def feature_edit_check(request, layername):
 layer = _resolve_layer(request, layername)
 datastore = ogc_server_settings.DATASTORE
 feature_edit = (getattr(settings, 'GEOGIG_DATASTORE', None) or datastore)
 if (request.user.has_perm('change_layer_data', obj=layer) and (layer.storeType == 'dataStore') and feature_edit):
  return HttpResponse(json.dumps({'authorized': True}), content_type='application/json')
 else:
  return HttpResponse(json.dumps({'authorized': False}), content_type='application/json')

def feature_edit_check ( request , layername ) : layer = _resolve_layer ( request , layername ) datastore = ogc_server_settings . DATASTORE feature_edit = ( getattr ( settings , 'GEOGIG_DATASTORE' , None ) or datastore ) if ( request . user . has_perm ( 'change_layer_data' , obj = layer ) and ( layer . storeType == 'dataStore' ) and feature_edit ) : return HttpResponse ( json . dumps ( { 'authorized' : True } ) , content_type = 'application/json' ) else : return HttpResponse ( json . dumps ( { 'authorized' : False } ) , content_type = 'application/json' )
if the layer is not a raster and the user has edit permission .