Skip to content

Commit

Permalink
Return an exception when an excluded layout is used
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and github-actions[bot] committed Feb 8, 2022
1 parent 376cad6 commit ca5a3ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/services/wms/qgswmsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ namespace QgsWms
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
QgsWmsParameter::TEMPLATE );
}
else if ( QgsServerProjectUtils::wmsRestrictedComposers( *mProject ).contains( templateName ) )
{
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
mWmsParameters[QgsWmsParameter::TEMPLATE ] );
}

// check template
const QgsLayoutManager *lManager = mProject->layoutManager();
Expand Down

0 comments on commit ca5a3ef

Please sign in to comment.