Skip to content
Permalink
Browse files

Fix #13919, don't reset layer subsetStrings when server python plugins

are enabled
  • Loading branch information
nyalldawson committed Feb 22, 2016
1 parent ba7dc0d commit 90a4ae806558690152f60d0cae96662b40753814
Showing with 13 additions and 17 deletions.
  1. +13 −17 src/server/qgsowsserver.cpp
@@ -28,26 +28,22 @@ void QgsOWSServer::applyAccessControlLayerFilters( QgsMapLayer* mapLayer, QMap<Q
{
if ( QgsVectorLayer* layer = dynamic_cast<QgsVectorLayer*>( mapLayer ) )
{
if ( layer->setSubsetString( "" ) )
QString sql = mAccessControl->extraSubsetString( layer );
if ( !sql.isEmpty() )
{
QString sql = mAccessControl->extraSubsetString( layer );
if ( !sql.isEmpty() )
if ( !originalLayerFilters.contains( layer->id() ) )
{
if ( !originalLayerFilters.contains( layer->id() ) )
{
originalLayerFilters.insert( layer->id(), layer->subsetString() );
}
if ( !layer->subsetString().isEmpty() )
{
sql.prepend( " AND " );
sql.prepend( layer->subsetString() );
}
layer->setSubsetString( sql );
originalLayerFilters.insert( layer->id(), layer->subsetString() );
}
if ( !layer->subsetString().isEmpty() )
{
sql.prepend( " AND " );
sql.prepend( layer->subsetString() );
}
if ( !layer->setSubsetString( sql ) )
{
QgsMessageLog::logMessage( "Layer does not support Subset String" );
}
}
else
{
QgsMessageLog::logMessage( "Layer does not support Subset String" );
}
}
}

1 comment on commit 90a4ae8

@sbrunner

This comment has been minimized.

Copy link
Contributor

@sbrunner sbrunner commented on 90a4ae8 Feb 22, 2016

Thanks @nyalldawson :-)

Please sign in to comment.
You can’t perform that action at this time.