diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-03-01 01:58:05 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-03-03 10:50:53 +0100 |
commit | af3866350e94c9238889a1c2485661466b1ec2dc (patch) | |
tree | 950511ec09ea238abb58de7ac28f2a5f19abec73 /src/leap/bitmask/bonafide/service.py | |
parent | 4003aaaa124b1ffa77d07f7e2ae5d16e2dddacf1 (diff) |
[bug] use username instead of provider in the vpn calls
Without active user we need to use the username instead of the provider
in the VPN API.
- Resolves: #8783
Diffstat (limited to 'src/leap/bitmask/bonafide/service.py')
-rw-r--r-- | src/leap/bitmask/bonafide/service.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/leap/bitmask/bonafide/service.py b/src/leap/bitmask/bonafide/service.py index 69aac2d..dc57917 100644 --- a/src/leap/bitmask/bonafide/service.py +++ b/src/leap/bitmask/bonafide/service.py @@ -120,21 +120,16 @@ class BonafideService(HookableService): def do_provider_list(self, seeded=False): return self._bonafide.do_provider_list(seeded) - # TODO make username mandatory - # and move active_user to the cli machinery - def do_get_vpn_cert(self, username=None): - if not username: - username = self._active_user + def do_get_vpn_cert(self, username): if not username: return defer.fail( - RuntimeError('No active user, cannot get VPN cert.')) + RuntimeError('No username, cannot get VPN cert.')) + d = self._bonafide.do_get_vpn_cert(username) d.addCallback(lambda response: (username, response)) return d - def do_get_smtp_cert(self, username=None): - if not username: - username = self._active_user + def do_get_smtp_cert(self, username): if not username: return defer.fail( RuntimeError('No username, cannot get SMTP cert.')) |