Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This commit hides the password when it is changed and fixes a
misspelled variable.
  • Loading branch information
Colleen Murphy committed Dec 15, 2014
1 parent 1f11596 commit ecd4120
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def password


def check_password
responce = rabbitmqctl('eval', 'rabbit_auth_backend_internal:check_user_login(<<"' + resource[:name] + '">>, [{password, <<"' + resource[:password] +'">>}]).')
if responce.include? 'invalid credentials'
response = rabbitmqctl('eval', 'rabbit_auth_backend_internal:check_user_login(<<"' + resource[:name] + '">>, [{password, <<"' + resource[:password] +'">>}]).')
if response.include? 'invalid credentials'
false
else
true
Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/type/rabbitmq_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def insync?(is)
def set(value)
provider.change_password
end
def change_to_s(current, desired)
"password has been changed"
end
end

newproperty(:admin) do
Expand Down

0 comments on commit ecd4120

Please sign in to comment.