Skip to content

Commit 2e2e381

Browse files
committed
[auth] Move startup system-is-disabled blocking dialog to message bar
1 parent c757446 commit 2e2e381

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/app/qgisapp.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
562562
mSplash->showMessage( tr( "Initializing authentication" ), Qt::AlignHCenter | Qt::AlignBottom );
563563
qApp->processEvents();
564564
QgsAuthManager::instance()->init( QgsApplication::pluginPath() );
565-
if ( QgsAuthManager::instance()->isDisabled() )
566-
{
567-
// Don't pass 'this' as parent, or menubar doesn't complete loading of submenus (at least on Mac)
568-
QMessageBox::warning( 0, tr( "Authentication System" ),
569-
QgsAuthManager::instance()->disabledMessage() + "\n\n" +
570-
tr( "Resources authenticating via the system can not be accessed." ) );
571-
}
572-
else
565+
if ( !QgsAuthManager::instance()->isDisabled() )
573566
{
574567
masterPasswordSetup();
575568
}
@@ -907,6 +900,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
907900
// update windows
908901
qApp->processEvents();
909902

903+
// notify user if authentication system is disabled
904+
( void )QgsAuthGuiUtils::isDisabled( messageBar() );
905+
910906
fileNewBlank(); // prepare empty project, also skips any default templates from loading
911907

912908
// request notification of FileOpen events (double clicking a file icon in Mac OS X Finder)

src/gui/auth/qgsauthguiutils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ bool QgsAuthGuiUtils::isDisabled( QgsMessageBar *msgbar, int timeout )
6666
{
6767
if ( QgsAuthManager::instance()->isDisabled() )
6868
{
69-
msgbar->pushMessage( QgsAuthManager::instance()->authManTag(),
70-
QObject::tr( "DISABLED: QCA's OpenSSL plugin missing" ),
71-
QgsMessageBar::WARNING, timeout );
69+
msgbar->pushMessage( QObject::tr( "Authentication System" ),
70+
QObject::tr( "DISABLED. Resources authenticating via the system can not be accessed" ),
71+
QgsMessageBar::CRITICAL, timeout );
7272
return true;
7373
}
7474
return false;

0 commit comments

Comments
 (0)