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
This commit is contained in:
Nyall Dawson 2019-06-12 09:44:24 +10:00
parent 8fdfd7daf8
commit 78a606188c
2 changed files with 30 additions and 6 deletions

View File

@ -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;

View File

@ -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;