Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sensorthings] Remove option for basic authentication #60376

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ from existing configs, or creating/removing them from auth database
:param username:
:param password:
:param dataprovider: The key of the calling layer provider, if applicable
%End

void removeBasicSettings();
%Docstring
Removes the basic authentication tab from the widget.

.. versionadded:: 3.42
%End

void setWarningText( const QString &warningText );
Expand Down
7 changes: 7 additions & 0 deletions python/gui/auto_generated/auth/qgsauthsettingswidget.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ from existing configs, or creating/removing them from auth database
:param username:
:param password:
:param dataprovider: The key of the calling layer provider, if applicable
%End

void removeBasicSettings();
%Docstring
Removes the basic authentication tab from the widget.

.. versionadded:: 3.42
%End

void setWarningText( const QString &warningText );
Expand Down
6 changes: 6 additions & 0 deletions src/gui/auth/qgsauthsettingswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ QgsAuthSettingsWidget::QgsAuthSettingsWidget( QWidget *parent, const QString &co
updateConvertBtnState();
}

void QgsAuthSettingsWidget::removeBasicSettings()
{
tabAuth->removeTab( tabAuth->indexOf( tabBasic ) );
tabAuth->setCurrentIndex( tabAuth->indexOf( tabConfigurations ) );
}

void QgsAuthSettingsWidget::setWarningText( const QString &warningText )
{
lblWarning->setText( warningText );
Expand Down
7 changes: 7 additions & 0 deletions src/gui/auth/qgsauthsettingswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ class GUI_EXPORT QgsAuthSettingsWidget : public QWidget, private Ui::QgsAuthSett
*/
explicit QgsAuthSettingsWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &configId = QString(), const QString &username = QString(), const QString &password = QString(), const QString &dataprovider = QString() );

/**
* Removes the basic authentication tab from the widget.
*
* \since QGIS 3.42
*/
void removeBasicSettings();

/**
* \brief setWarningText set the text of the warning label
* \param warningText the text of the warning label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ QgsSensorThingsConnectionWidget::QgsSensorThingsConnectionWidget( QWidget *paren
connect( mEditUrl, &QLineEdit::textChanged, this, &QgsSensorThingsConnectionWidget::validate );
connect( mEditUrl, &QLineEdit::textChanged, this, &QgsSensorThingsConnectionWidget::changed );

// only auth config supported, not basic auth
mAuthSettings->removeBasicSettings();

connect( mAuthSettings, &QgsAuthSettingsWidget::configIdChanged, this, &QgsSensorThingsConnectionWidget::changed );
connect( mAuthSettings, &QgsAuthSettingsWidget::usernameChanged, this, &QgsSensorThingsConnectionWidget::changed );
connect( mAuthSettings, &QgsAuthSettingsWidget::passwordChanged, this, &QgsSensorThingsConnectionWidget::changed );
Expand Down
Loading