Skip to content
Permalink
Browse files

Fix #17444 : GeoNode data provider completely ignores authentication (#…

…5634)

* Fix #17444 : GeoNode data provider completely ignores authentication - hide the authentication group until GeoNode API supports authentication.
  • Loading branch information
timlinux committed Nov 15, 2017
1 parent 6d01543 commit 364ddc1de462b6ebca9903b896d4cc492b929cb3
@@ -35,6 +35,7 @@ class QgsNewHttpConnection : QDialog
enum Flag
{
FlagShowTestConnection,
FlagHideAuthenticationGroup,
};
typedef QFlags<QgsNewHttpConnection::Flag> Flags;

@@ -121,6 +121,11 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ
mGroupBox->layout()->removeWidget( mTestConnectionButton );
}

if ( flags & FlagHideAuthenticationGroup )
{
mAuthGroupBox->hide();
mGroupBox->layout()->removeWidget( mAuthGroupBox );
}
// Adjust height
int w = width();
adjustSize();
@@ -56,6 +56,7 @@ class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpCo
enum Flag
{
FlagShowTestConnection = 1 << 1, //!< Display the 'test connection' button
FlagHideAuthenticationGroup = 1 << 2, //!< Hide the Authentication group
};
Q_DECLARE_FLAGS( Flags, Flag )

@@ -20,14 +20,18 @@
#include "qgsgeonodeconnection.h"
#include "qgsgeonoderequest.h"

/* For now we are hiding away authentication options since
there is no support yet for authentication in GeoNode's API.
We will re-enable this when this limitation changes.
See https://github.com/GeoNode/geonode/issues/3442 TS */

QgsGeoNodeNewConnection::QgsGeoNodeNewConnection( QWidget *parent, const QString &connName, Qt::WindowFlags fl )
: QgsNewHttpConnection( parent, QgsNewHttpConnection::ConnectionWfs | QgsNewHttpConnection::ConnectionWms,
QgsGeoNodeConnectionUtils::pathGeoNodeConnection() + '/', connName, QgsNewHttpConnection::FlagShowTestConnection, fl )
QgsGeoNodeConnectionUtils::pathGeoNodeConnection() + '/', connName,
QgsNewHttpConnection::FlagShowTestConnection | QgsNewHttpConnection::FlagHideAuthenticationGroup, fl )
{
setWindowTitle( tr( "Create a New GeoNode Connection" ) );

updateServiceSpecificSettings();

connect( testConnectButton(), &QPushButton::clicked, this, &QgsGeoNodeNewConnection::testConnection );
}

0 comments on commit 364ddc1

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