Skip to content

Commit 0af5761

Browse files
authored
fix build without HAVE_SERVER_PYTHON_PLUGINS
1 parent 622fe8c commit 0af5761

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/services/wms/qgswmsdescribelayer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ namespace QgsWms
103103
}
104104

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

137+
#ifdef HAVE_SERVER_PYTHON_PLUGINS
135138
if ( accessControl && !accessControl->layerReadPermission( layer ) )
136139
{
137140
throw QgsSecurityException( QStringLiteral( "You are not allowed to access to this layer" ) );
138141
}
142+
#endif
139143

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

0 commit comments

Comments
 (0)