Skip to content

Commit

Permalink
Update src/include/users/dialogs.rb
Browse files Browse the repository at this point in the history
Co-Authored-By: imobachgs <imobachgs@gmail.com>
  • Loading branch information
lslezak and imobachgs committed Nov 9, 2018
1 parent bcc8e51 commit 5fdaf1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/include/users/dialogs.rb
Expand Up @@ -2556,7 +2556,8 @@ def display_authorized_keys_tab(user, selected_row = nil)
UI.SetFocus(Id(:authorized_keys_table))
UI.ChangeWidget(Id(:authorized_keys_table), :CurrentItem, selected_row) if selected_row
no_keys = user.fetch("authorized_keys", []).empty?
UI.ChangeWidget(Id(:remove_authorized_key), :Enabled, !no_keys)
key_present = !user.fetch("authorized_keys", []).empty?
UI.ChangeWidget(Id(:remove_authorized_key), :Enabled, key_present)
end


Expand Down

0 comments on commit 5fdaf1e

Please sign in to comment.