Navigation Menu

Skip to content

Commit

Permalink
fix build without HAVE_SERVER_PYTHON_PLUGINS
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 18, 2018
1 parent 622fe8c commit 0af5761
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/services/wms/qgswmsdescribelayer.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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" ) );
Expand Down

0 comments on commit 0af5761

Please sign in to comment.