Skip to content

Commit

Permalink
[auth] Fix return value for plugins that do not support an expansion
Browse files Browse the repository at this point in the history
Bug not evident until there were providers with multiple credential
expansions (now supported in OWS providers). Lack of support for an
expansion should only trigger a debug message, not a failure.

(cherry-picked from 194b5ad)
  • Loading branch information
dakcarto committed Sep 1, 2016
1 parent 682023f commit a528eb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/auth/qgsauthmanager.cpp
Expand Up @@ -1365,8 +1365,8 @@ bool QgsAuthManager::updateNetworkRequest( QNetworkRequest &request, const QStri
{
if ( !( authmethod->supportedExpansions() & QgsAuthMethod::NetworkRequest ) )
{
QgsDebugMsg( QString( "Data source URI updating not supported by authcfg: %1" ).arg( authcfg ) );
return false;
QgsDebugMsg( QString( "Network request updating not supported by authcfg: %1" ).arg( authcfg ) );
return true;
}

if ( !authmethod->updateNetworkRequest( request, authcfg, dataprovider.toLower() ) )
Expand All @@ -1392,7 +1392,7 @@ bool QgsAuthManager::updateNetworkReply( QNetworkReply *reply, const QString& au
if ( !( authmethod->supportedExpansions() & QgsAuthMethod::NetworkReply ) )
{
QgsDebugMsg( QString( "Network reply updating not supported by authcfg: %1" ).arg( authcfg ) );
return false;
return true;
}

if ( !authmethod->updateNetworkReply( reply, authcfg, dataprovider.toLower() ) )
Expand All @@ -1418,7 +1418,7 @@ bool QgsAuthManager::updateDataSourceUriItems( QStringList &connectionItems, con
if ( !( authmethod->supportedExpansions() & QgsAuthMethod::DataSourceURI ) )
{
QgsDebugMsg( QString( "Data source URI updating not supported by authcfg: %1" ).arg( authcfg ) );
return false;
return true;
}

if ( !authmethod->updateDataSourceUriItems( connectionItems, authcfg, dataprovider.toLower() ) )
Expand Down

0 comments on commit a528eb9

Please sign in to comment.