Skip to content
Permalink
Browse files

fix build without HAVE_SERVER_PYTHON_PLUGINS (#7954)

  • Loading branch information
3nids committed Oct 2, 2018
1 parent 6bff7f0 commit 3c13e7057cf533ddfecbbe499c6e8b727920ed45
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/server/services/wms/qgswmsdescribelayer.cpp
@@ -103,7 +103,9 @@ namespace QgsWms
}

// access control
#ifdef HAVE_SERVER_PYTHON_PLUGINS
QgsAccessControl *accessControl = serverIface->accessControls();
#endif
// Use layer ids
bool useLayerIds = QgsServerProjectUtils::wmsUseLayerIds( *project );
// WMS restricted layers
@@ -132,10 +134,12 @@ namespace QgsWms
throw QgsSecurityException( QStringLiteral( "You are not allowed to access to this layer" ) );
}

#ifdef HAVE_SERVER_PYTHON_PLUGINS
if ( accessControl && !accessControl->layerReadPermission( layer ) )
{
throw QgsSecurityException( QStringLiteral( "You are not allowed to access to this layer" ) );
}
#endif

// Create the NamedLayer element
QDomElement layerNode = myDocument.createElement( QStringLiteral( "LayerDescription" ) );

0 comments on commit 3c13e70

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