summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/bonafide
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/bonafide')
-rw-r--r--src/leap/bitmask/bonafide/config.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/bonafide/config.py b/src/leap/bitmask/bonafide/config.py
index fe40f277..2ffa8738 100644
--- a/src/leap/bitmask/bonafide/config.py
+++ b/src/leap/bitmask/bonafide/config.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# config.py
-# Copyright (C) 2015 LEAP
+# Copyright (C) 2015-2018 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -54,6 +54,9 @@ if platform.system() == 'Windows':
else:
ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME
+SERVICE = 'service'
+ALLOW_ANONYMOUS = 'allow_anonymous'
+
def get_path_prefix(standalone=False):
return common_get_path_prefix(standalone)
@@ -268,7 +271,7 @@ class Provider(object):
self.log.debug('Bootstrapping provider %s' % domain)
def first_bootstrap_done(ignored):
- if self._allows_anonymous:
+ if self._allows_anonymous():
# we continue bootstrapping, we do not
# need to wait for authentication.
return
@@ -289,9 +292,9 @@ class Provider(object):
self.ongoing_bootstrap = d
def _allows_anonymous(self):
+ config = self.config()
try:
- anon = self._provider_config.get(
- 'service').get('allows_anonymous')
+ anon = config.get(SERVICE).get(ALLOW_ANONYMOUS, False)
except ValueError:
anon = False
return anon