Skip to content

Commit 67a151b

Browse files
committed
fix regex to allow database names to contain "-" in role@db syntax
1 parent 1098bd1 commit 67a151b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/puppet/type/mongodb_user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def initialize(*args)
4242
newproperty(:roles, array_matching: :all) do
4343
desc "The user's roles."
4444
defaultto ['dbAdmin']
45-
newvalue(%r{^\w+(@\w+)?$})
45+
newvalue(%r{^\w+(@[\w-]+)?$})
4646

4747
# Pretty output for arrays.
4848
def should_to_s(value)

0 commit comments

Comments
 (0)