Skip to content
Permalink
Browse files

[auth] Fix return value for plugins that do not support an expansion

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 3ed0066 commit de1000aec88cb6e6927f5fff563aa43332d07885
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/auth/qgsauthmanager.cpp
@@ -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() ) )
@@ -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() ) )
@@ -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() ) )

0 comments on commit de1000a

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