Skip to content

Commit

Permalink
Expose some more auth manager methods to Python
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nyalldawson committed Jun 13, 2019
1 parent 8fdfd7d commit 78a6061
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
24 changes: 24 additions & 0 deletions python/core/auto_generated/auth/qgsauthmanager.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,35 @@ 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;

static const QString AUTH_MAN_TAG;
Expand Down
12 changes: 6 additions & 6 deletions src/core/auth/qgsauthmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 78a6061

Please sign in to comment.