Skip to content

Commit d9807d6

Browse files
author
root
committed
Fix #169
1 parent 825d055 commit d9807d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: lib/redmine_gitolite/admin_users.rb

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def delete_ssh_key
2525

2626
def update_all_ssh_keys_forced
2727
object = User.all
28-
update_ssh_keys(object)
28+
update_all_ssh_keys(object)
2929
end
3030

3131

@@ -51,8 +51,10 @@ def delete_ssh_keys(ssh_key)
5151
def update_all_ssh_keys(users)
5252
wrapped_transaction do
5353
users.each do |user|
54-
handle_user_update(user)
55-
gitolite_admin_repo_commit("#{user.login}")
54+
if user.gitolite_public_keys.any?
55+
handle_user_update(user)
56+
gitolite_admin_repo_commit("#{user.login}")
57+
end
5658
end
5759
end
5860
end

0 commit comments

Comments
 (0)