diff --git a/manilaclient/tests/unit/v2/test_shares.py b/manilaclient/tests/unit/v2/test_shares.py index df7c8e03d..8ab8c92b1 100644 --- a/manilaclient/tests/unit/v2/test_shares.py +++ b/manilaclient/tests/unit/v2/test_shares.py @@ -371,7 +371,7 @@ class SharesTest(utils.TestCase): 'action_name': 'os-allow_access', 'microversion': '2.0'}, {'access_to': '1' * 255, 'access_type': 'user', 'action_name': 'os-allow_access', 'microversion': '2.0'}, - {'access_to': 'fake\\]{.-_\'`;}[', 'access_type': 'user', + {'access_to': 'fake$\\]{.-_\'`;}[', 'access_type': 'user', 'action_name': 'os-allow_access', 'microversion': '2.0'}, {'access_to': 'MYDOMAIN\\Administrator', 'access_type': 'user', 'action_name': 'os-allow_access', 'microversion': '2.0'}, diff --git a/manilaclient/v2/shares.py b/manilaclient/v2/shares.py index 4d8479c3b..0cd38692b 100644 --- a/manilaclient/v2/shares.py +++ b/manilaclient/v2/shares.py @@ -449,12 +449,12 @@ class ShareManager(base.ManagerWithFind): @staticmethod def _validate_username(access): - valid_username_re = '[\w\.\-_\`;\'\{\}\[\]\\\\]{4,255}$' + valid_username_re = '[\w\$\.\-_\`;\'\{\}\[\]\\\\]{4,255}$' username = access if not re.match(valid_username_re, username): exc_str = ('Invalid user or group name. Must be 4-255 characters ' 'and consist of alphanumeric characters and ' - 'special characters ]{.-_\'`;}[\\') + 'special characters $]{.-_\'`;}[\\') raise exceptions.CommandError(exc_str) @staticmethod diff --git a/releasenotes/notes/bug_1715769_fix-3ec701b0fb9d7910.yaml b/releasenotes/notes/bug_1715769_fix-3ec701b0fb9d7910.yaml new file mode 100644 index 000000000..d7ed43797 --- /dev/null +++ b/releasenotes/notes/bug_1715769_fix-3ec701b0fb9d7910.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Usernames can contain the $ symbol to allow for windows computer + authentication in an Active Directory environment