From 78a606188c33724017f320e581b68e25f68c395a Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 12 Jun 2019 09:44:24 +1000 Subject: [PATCH] Expose some more auth manager methods to Python These methods either - only wrap QSettings values (so there's no added security gained by not exposing them -- it's currently easily possible to achieve the same results via direct QSettings manipulation) OR - are required to allow fully automated QGIS deployment/startup scripts which rely on auth manager functionality --- .../auto_generated/auth/qgsauthmanager.sip.in | 24 +++++++++++++++++++ src/core/auth/qgsauthmanager.h | 12 +++++----- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/python/core/auto_generated/auth/qgsauthmanager.sip.in b/python/core/auto_generated/auth/qgsauthmanager.sip.in index c4583b04652..81b1d328e6f 100644 --- a/python/core/auto_generated/auth/qgsauthmanager.sip.in +++ b/python/core/auto_generated/auth/qgsauthmanager.sip.in @@ -717,10 +717,34 @@ trustedCaCertsPemText get concatenated string of all trusted CA certificates + bool passwordHelperEnabled() const; +%Docstring +Password helper enabled getter + +.. note:: + + Available in Python bindings since QGIS 3.8.0 +%End + + void setPasswordHelperEnabled( bool enabled ); +%Docstring +Password helper enabled setter + +.. note:: + + Available in Python bindings since QGIS 3.8.0 +%End + bool passwordHelperSync(); +%Docstring +Store the password manager into the wallet +.. note:: + + Available in Python bindings since QGIS 3.8.0 +%End static const QString AUTH_PASSWORD_HELPER_DISPLAY_NAME; diff --git a/src/core/auth/qgsauthmanager.h b/src/core/auth/qgsauthmanager.h index ba308debf8e..9471fc30ba6 100644 --- a/src/core/auth/qgsauthmanager.h +++ b/src/core/auth/qgsauthmanager.h @@ -644,15 +644,15 @@ class CORE_EXPORT QgsAuthManager : public QObject /** * Password helper enabled getter - * \note not available in Python bindings + * \note Available in Python bindings since QGIS 3.8.0 */ - bool passwordHelperEnabled() const SIP_SKIP; + bool passwordHelperEnabled() const; /** * Password helper enabled setter - * \note not available in Python bindings + * \note Available in Python bindings since QGIS 3.8.0 */ - void setPasswordHelperEnabled( bool enabled ) SIP_SKIP; + void setPasswordHelperEnabled( bool enabled ); /** * Password helper logging enabled getter @@ -668,9 +668,9 @@ class CORE_EXPORT QgsAuthManager : public QObject /** * Store the password manager into the wallet - * \note not available in Python bindings + * \note Available in Python bindings since QGIS 3.8.0 */ - bool passwordHelperSync() SIP_SKIP; + bool passwordHelperSync(); //! The display name of the password helper (platform dependent) static const QString AUTH_PASSWORD_HELPER_DISPLAY_NAME;