Skip to content

Commit

Permalink
Do not override kubevirt token with default token
Browse files Browse the repository at this point in the history
If the user didn't provide a token for kubevirt provider, the previous
token should be kept instead of using the default token.
  • Loading branch information
masayag committed May 22, 2018
1 parent e4ea57b commit 344f8d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/mixins/ems_common_angular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def build_credentials(ems, mode)
creds[:prometheus_alerts] = {:auth_key => default_key, :save => (mode != :validate)}
end
if params[:virtualization_selection] == 'kubevirt'
kubevirt_key = params[:kubevirt_password] ? params[:kubevirt_password] : default_key
kubevirt_key = params[:kubevirt_password] ? params[:kubevirt_password] : ems.authentication_key(:kubevirt)
creds[:kubevirt] = { :auth_key => kubevirt_key, :save => (mode != :validate) }
end
creds[:bearer] = {:auth_key => default_key, :save => (mode != :validate)}
Expand Down

0 comments on commit 344f8d4

Please sign in to comment.