diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2015-04-20 17:09:43 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2015-08-24 16:30:57 -0300 |
commit | 9a21cc06cfc4024c881b4ba59c10c69e7de90fe9 (patch) | |
tree | 972a18592cac71c220eed34515591fbe0d0bee54 /src/leap/bitmask/crypto | |
parent | 182dd2738f077079a47d3f56033b78dac9204986 (diff) |
[bug] handle disabled registration, error 403.
If the user wants to register a new account we check whether the
provider allows registration or not right after getting the
provider.json file and show an error msg on the wizard if not allowed.
Also, there is a new signal to handle the error raised by the server if
a registration attempt is made but is rejected with error 403.
- Resolves: #6594
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r-- | src/leap/bitmask/crypto/srpregister.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/bitmask/crypto/srpregister.py b/src/leap/bitmask/crypto/srpregister.py index 7a216847..9bf19377 100644 --- a/src/leap/bitmask/crypto/srpregister.py +++ b/src/leap/bitmask/crypto/srpregister.py @@ -153,6 +153,7 @@ class SRPRegister(QtCore.QObject): STATUS_OK = (200, 201) STATUS_TAKEN = 422 + STATUS_FORBIDDEN = 403 def __init__(self, signaler=None, provider_config=None, register_path="users"): @@ -204,6 +205,8 @@ class SRPRegister(QtCore.QObject): self._signaler.signal(self._signaler.srp_registration_finished) elif status_code == self.STATUS_TAKEN: self._signaler.signal(self._signaler.srp_registration_taken) + elif status_code == self.STATUS_FORBIDDEN: + self._signaler.signal(self._signaler.srp_registration_disabled) else: self._signaler.signal(self._signaler.srp_registration_failed) |