Skip to content
Permalink
Browse files

[BUGFIX][Server] Add short names in restricted layer list

The restricted layer list contains layer names and layer ids if layer ids are used as service layer name.
This code adds layer  short name to the restricted layer list if layer ids are not used as service layer name.
  • Loading branch information
rldhont committed Jan 12, 2017
1 parent ff442c4 commit 23b0d4405f00efa0459da06e49cb8d6ec23aeab0
Showing with 21 additions and 0 deletions.
  1. +21 −0 src/server/qgsserverprojectparser.cpp
@@ -1173,6 +1173,27 @@ QSet<QString> QgsServerProjectParser::findRestrictedLayers() const
}
}
}
// Add short name in restricted layers
else
{
QDomNodeList layerNodeList = mXMLDoc->elementsByTagName( "maplayer" );
for ( int i = 0; i < layerNodeList.size(); ++i )
{
QDomElement layerElem = layerNodeList.at( i ).toElement();
// get name
QString lName = layerName( layerElem );
if ( restrictedLayerSet.contains( lName ) )
{
// get short name
lName = layerShortName( layerElem );
if ( !lName.isEmpty() )
{
// add short name
restrictedLayerSet.insert( lName );
}
}
}
}
return restrictedLayerSet;
}

0 comments on commit 23b0d44

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