Skip to content

Commit b6e2ae7

Browse files
committed
Remove last caller of credentials_changed?
1 parent e5d070f commit b6e2ae7

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

app/models/manageiq/providers/cloud_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def open_browser
7777
end
7878

7979
def stop_event_monitor_queue_on_credential_change
80-
if event_monitor_class && !self.new_record? && self.credentials_changed?
80+
if event_monitor_class && !new_record? && default_endpoint.changed.include_any?("hostname", "ipaddress")
8181
_log.info("EMS: [#{name}], Credentials have changed, stopping Event Monitor. It will be restarted by the WorkerMonitor.")
8282
stop_event_monitor_queue
8383
network_manager.stop_event_monitor_queue if respond_to?(:network_manager) && network_manager

app/models/mixins/authentication_mixin.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ def update_authentication(data, options = {})
183183

184184
options.reverse_merge!(:save => true)
185185

186-
@orig_credentials ||= auth_user_pwd || "none"
187-
188186
# Invoke before callback
189187
before_update_authentication if self.respond_to?(:before_update_authentication) && options[:save]
190188

@@ -250,13 +248,6 @@ def update_authentication(data, options = {})
250248

251249
# Invoke callback
252250
after_update_authentication if self.respond_to?(:after_update_authentication) && options[:save]
253-
@orig_credentials = nil if options[:save]
254-
end
255-
256-
def credentials_changed?
257-
@orig_credentials ||= auth_user_pwd || "none"
258-
new_credentials = auth_user_pwd || "none"
259-
@orig_credentials != new_credentials
260251
end
261252

262253
def authentication_type(type)

0 commit comments

Comments
 (0)