mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[postgres][db2] username and authcfg are not mutually exclusive (followup aae7a325)
This commit is contained in:
parent
761cdaf30a
commit
fba9982beb
@ -84,18 +84,18 @@ bool QgsDb2ConnectionItem::ConnInfoFromParameters(
|
||||
{
|
||||
connInfo += "authcfg='" + authcfg + "' ";
|
||||
}
|
||||
else // include user and password if authcfg is empty
|
||||
{
|
||||
if ( !username.isEmpty() )
|
||||
{
|
||||
connInfo += "user='" + username + "' ";
|
||||
}
|
||||
|
||||
if ( !password.isEmpty() )
|
||||
{
|
||||
connInfo += "password='" + password + "' ";
|
||||
}
|
||||
if ( !password.isEmpty() )
|
||||
{
|
||||
// include password if authcfg is empty
|
||||
connInfo += "password='" + password + "' ";
|
||||
}
|
||||
|
||||
if ( !username.isEmpty() )
|
||||
{
|
||||
connInfo += "user='" + username + "' ";
|
||||
}
|
||||
|
||||
QgsDebugMsg( "connInfo: '" + connInfo + "'" );
|
||||
return true;
|
||||
}
|
||||
|
@ -1788,12 +1788,6 @@ QgsDataSourceUri QgsPostgresConn::connUri( const QString &connName )
|
||||
|
||||
QString authcfg = settings.value( key + "/authcfg" ).toString();
|
||||
|
||||
if ( !authcfg.isEmpty() )
|
||||
{
|
||||
username.clear();
|
||||
password.clear();
|
||||
}
|
||||
|
||||
QgsDataSourceUri uri;
|
||||
if ( !service.isEmpty() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user