Skip to content
Permalink
Browse files

Merge pull request #7571 from sbrunner/groups

[server] Fix the Access control in the WMS groups
  • Loading branch information
sbrunner committed Aug 15, 2018
2 parents 0ddbb3f + 24f97f0 commit 21f94305c69740e791d4f597ab366685d4d11b98
@@ -22,12 +22,8 @@ qgis_ziplayertest
# Flaky, see https://dash.orfeo-toolbox.org/testDetails.php?test=63061783&build=297405
PyQgsSpatialiteProvider

# Flaky, see https://travis-ci.org/qgis/QGIS/jobs/297708174
PyQgsServerAccessControl

# Need a local postgres installation
PyQgsAuthManagerPKIPostgresTest
PyQgsAuthManagerPasswordPostgresTest
PyQgsAuthManagerOgrPostgresTest
PyQgsDbManagerPostgis

@@ -330,18 +330,16 @@ namespace QgsWms
bool updateMapExtent = mWmsParameters.bbox().isEmpty();
Q_FOREACH ( QgsMapLayer *layer, layers )
{
checkLayerReadPermissions( layer );

Q_FOREACH ( QgsWmsParametersLayer param, params )
{
if ( param.mNickname == layerNickname( *layer ) )
{
checkLayerReadPermissions( layer );

setLayerOpacity( layer, param.mOpacity );

setLayerFilter( layer, param.mFilter );

setLayerAccessControlFilter( layer );

setLayerSelection( layer, param.mSelection );

if ( updateMapExtent )
@@ -350,6 +348,8 @@ namespace QgsWms
break;
}
}

setLayerAccessControlFilter( layer );
}

// add highlight layers above others
@@ -679,18 +679,16 @@ namespace QgsWms
bool updateMapExtent = mWmsParameters.bbox().isEmpty();
Q_FOREACH ( QgsMapLayer *layer, layers )
{
checkLayerReadPermissions( layer );

Q_FOREACH ( QgsWmsParametersLayer param, params )
{
if ( param.mNickname == layerNickname( *layer ) )
{
checkLayerReadPermissions( layer );

setLayerOpacity( layer, param.mOpacity );

setLayerFilter( layer, param.mFilter );

setLayerAccessControlFilter( layer );

setLayerSelection( layer, param.mSelection );

if ( updateMapExtent )
@@ -699,6 +697,8 @@ namespace QgsWms
break;
}
}

setLayerAccessControlFilter( layer );
}

// add highlight layers above others
@@ -781,21 +781,23 @@ namespace QgsWms
continue;
if ( !wfsLayerIds.contains( layer->id() ) )
continue;

checkLayerReadPermissions( layer );

Q_FOREACH ( QgsWmsParametersLayer param, params )
{
if ( param.mNickname == layerNickname( *layer ) )
{
checkLayerReadPermissions( layer );

setLayerOpacity( layer, param.mOpacity );

setLayerFilter( layer, param.mFilter );

setLayerAccessControlFilter( layer );

break;
}
}

setLayerAccessControlFilter( layer );

// cast for dxf layers
QgsVectorLayer *vlayer = static_cast<QgsVectorLayer *>( layer );

@@ -951,19 +953,19 @@ namespace QgsWms

Q_FOREACH ( QgsMapLayer *layer, layers )
{
checkLayerReadPermissions( layer );

Q_FOREACH ( QgsWmsParametersLayer param, params )
{
if ( param.mNickname == layerNickname( *layer ) )
{
checkLayerReadPermissions( layer );

setLayerFilter( layer, param.mFilter );

setLayerAccessControlFilter( layer );

break;
}
}

setLayerAccessControlFilter( layer );
}

// add layers to map settings (revert order for the rendering)
@@ -263,7 +263,11 @@ IF (WITH_SERVER)
ADD_PYTHON_TEST(PyQgsServerSettings test_qgsserver_settings.py)
ADD_PYTHON_TEST(PyQgsServerProjectUtils test_qgsserver_projectutils.py)
ADD_PYTHON_TEST(PyQgsServerSecurity test_qgsserver_security.py)
ADD_PYTHON_TEST(PyQgsServerAccessControl test_qgsserver_accesscontrol.py)
ADD_PYTHON_TEST(PyQgsServerAccessControlWMS test_qgsserver_accesscontrol_wms.py)
ADD_PYTHON_TEST(PyQgsServerAccessControlWMSGetlegendgraphic test_qgsserver_accesscontrol_wms_getlegendgraphic.py)
ADD_PYTHON_TEST(PyQgsServerAccessControlWFS test_qgsserver_accesscontrol_wfs.py)
ADD_PYTHON_TEST(PyQgsServerAccessControlWCS test_qgsserver_accesscontrol_wcs.py)
ADD_PYTHON_TEST(PyQgsServerAccessControlWFSTransactional test_qgsserver_accesscontrol_wfs_transactional.py)
ADD_PYTHON_TEST(PyQgsServerWFS test_qgsserver_wfs.py)
ADD_PYTHON_TEST(PyQgsServerWFST test_qgsserver_wfst.py)
ADD_PYTHON_TEST(PyQgsOfflineEditingWFS test_offline_editing_wfs.py)

0 comments on commit 21f9430

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