summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/login.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-05-21 19:17:09 -0300
committerTomás Touceda <chiiph@leap.se>2014-05-21 19:17:09 -0300
commite7cff9866e50f9730f8fc6ab70cf116ed38f7935 (patch)
tree1fd1c072a004719bc101e74e63e7c8c7219cd1c2 /src/leap/bitmask/gui/login.py
parent2ba353fbc87eb81dde2f169b8facdb2104107f70 (diff)
parentd0a9ecf0cba998b44a216c5cdf1800eea152f379 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/feature/fix-username-regex-support' into develop
Diffstat (limited to 'src/leap/bitmask/gui/login.py')
-rw-r--r--src/leap/bitmask/gui/login.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/login.py b/src/leap/bitmask/gui/login.py
index ac7ad878..f66e71d9 100644
--- a/src/leap/bitmask/gui/login.py
+++ b/src/leap/bitmask/gui/login.py
@@ -24,6 +24,7 @@ from ui_login import Ui_LoginWidget
from leap.bitmask.config import flags
from leap.bitmask.util import make_address
+from leap.bitmask.util.credentials import USERNAME_REGEX
from leap.bitmask.util.keyring_helpers import has_keyring
from leap.bitmask.util.keyring_helpers import get_keyring
from leap.common.check import leap_assert_type
@@ -48,8 +49,6 @@ class LoginWidget(QtGui.QWidget):
MAX_STATUS_WIDTH = 40
- BARE_USERNAME_REGEX = r"^[A-Za-z\d_]+$"
-
# Keyring
KEYRING_KEY = "bitmask"
@@ -87,7 +86,7 @@ class LoginWidget(QtGui.QWidget):
self.ui.btnLogout.clicked.connect(
self.logout)
- username_re = QtCore.QRegExp(self.BARE_USERNAME_REGEX)
+ username_re = QtCore.QRegExp(USERNAME_REGEX)
self.ui.lnUser.setValidator(
QtGui.QRegExpValidator(username_re, self))