Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix build without HAVE_SERVER_PYTHON_PLUGINS (#7954)
  • Loading branch information
3nids committed Oct 2, 2018
1 parent 6bff7f0 commit 3c13e70
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 3c13e70

Please sign in to comment.