Skip to content
Permalink
Browse files

[postgres][db2] username and authcfg are not mutually exclusive (foll…

…owup 9ce55ca)
  • Loading branch information
jef-n committed Jul 4, 2018
1 parent 7ee252e commit aefcc550e4e3cb7cc048c4d8812f2b39d347d753
Showing with 8 additions and 11 deletions.
  1. +8 −10 src/providers/db2/qgsdb2dataitems.cpp
  2. +0 −1 src/providers/postgres/qgspostgresconn.cpp
@@ -81,22 +81,20 @@ bool QgsDb2ConnectionItem::ConnInfoFromParameters(
+ "dbname='" + database + "' ";
}

if ( !username.isEmpty() )
{
connInfo += "user='" + username + "' ";
}

if ( !authcfg.isEmpty() )
{
connInfo += "authcfg='" + authcfg + "' ";
}
else // include user and password if authcfg is empty
else if ( !password.isEmpty() )
{
if ( !username.isEmpty() )
{
connInfo += "user='" + username + "' ";
}

if ( !password.isEmpty() )
{
connInfo += "password='" + password + "' ";
}
connInfo += "password='" + password + "' ";
}

QgsDebugMsg( "connInfo: '" + connInfo + "'" );
return true;
}
@@ -1728,7 +1728,6 @@ QgsDataSourceURI QgsPostgresConn::connUri( const QString& theConnName )

if ( !authcfg.isEmpty() )
{
username.clear();
password.clear();
}

0 comments on commit aefcc55

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