diff options
Diffstat (limited to 'src/mm-auth-provider.c')
-rw-r--r-- | src/mm-auth-provider.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-auth-provider.c b/src/mm-auth-provider.c index 5b4b13f3..38ec04d3 100644 --- a/src/mm-auth-provider.c +++ b/src/mm-auth-provider.c @@ -22,6 +22,7 @@ #include "mm-log-object.h" #include "mm-utils.h" #include "mm-auth-provider.h" +#include "mm-context.h" #if defined WITH_POLKIT # include <polkit/polkit.h> @@ -128,6 +129,13 @@ mm_auth_provider_authorize (MMAuthProvider *self, task = g_task_new (self, cancellable, callback, user_data); + /* When running in the session bus for tests, default to always allow */ + if (mm_context_get_test_session ()) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + #if defined WITH_POLKIT { AuthorizeContext *ctx; |