Skip to content
Permalink
Browse files

[auth] Move startup system-is-disabled blocking dialog to message bar

  • Loading branch information
dakcarto committed Oct 6, 2015
1 parent c757446 commit 2e2e381116d2aa8f97a6f3d4645285ea27f51e7f
Showing with 7 additions and 11 deletions.
  1. +4 −8 src/app/qgisapp.cpp
  2. +3 −3 src/gui/auth/qgsauthguiutils.cpp
@@ -562,14 +562,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
mSplash->showMessage( tr( "Initializing authentication" ), Qt::AlignHCenter | Qt::AlignBottom );
qApp->processEvents();
QgsAuthManager::instance()->init( QgsApplication::pluginPath() );
if ( QgsAuthManager::instance()->isDisabled() )
{
// Don't pass 'this' as parent, or menubar doesn't complete loading of submenus (at least on Mac)
QMessageBox::warning( 0, tr( "Authentication System" ),
QgsAuthManager::instance()->disabledMessage() + "\n\n" +
tr( "Resources authenticating via the system can not be accessed." ) );
}
else
if ( !QgsAuthManager::instance()->isDisabled() )
{
masterPasswordSetup();
}
@@ -907,6 +900,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
// update windows
qApp->processEvents();

// notify user if authentication system is disabled
( void )QgsAuthGuiUtils::isDisabled( messageBar() );

fileNewBlank(); // prepare empty project, also skips any default templates from loading

// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)
@@ -66,9 +66,9 @@ bool QgsAuthGuiUtils::isDisabled( QgsMessageBar *msgbar, int timeout )
{
if ( QgsAuthManager::instance()->isDisabled() )
{
msgbar->pushMessage( QgsAuthManager::instance()->authManTag(),
QObject::tr( "DISABLED: QCA's OpenSSL plugin missing" ),
QgsMessageBar::WARNING, timeout );
msgbar->pushMessage( QObject::tr( "Authentication System" ),
QObject::tr( "DISABLED. Resources authenticating via the system can not be accessed" ),
QgsMessageBar::CRITICAL, timeout );
return true;
}
return false;

0 comments on commit 2e2e381

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