Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/admin/admin_users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def troubleshoot
@user.set_user_work_dates
@user.reindex_user_creations
@user.update_works_index_timestamp!
@user.enqueue_to_index
@user.create_log_item(options = { action: ArchiveConfig.ACTION_TROUBLESHOOT, admin_id: current_admin.id })
flash[:notice] = ts("User account troubleshooting complete.")
redirect_to admin_user_path(@user)
Expand Down
2 changes: 1 addition & 1 deletion config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ en:
rename: Rename
roles: Manage Roles
troubleshoot: Troubleshoot
note: To fix common errors with this user's Subscriptions and Stats pages, and to reindex their works and bookmarks, choose "Troubleshoot."
note: To fix common errors with this user's Subscriptions and Stats pages, and to reindex the user and their works and bookmarks, choose "Troubleshoot."
page_heading: 'User: %{login} (%{id})'
page_title: "%{login} - User Administration"
status:
Expand Down
7 changes: 7 additions & 0 deletions spec/controllers/admin/admin_users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,13 @@ def expect_changes_made_by(admin, log_items)
subject.call
it_redirects_to_with_notice(admin_user_path(user), "User account troubleshooting complete.")
end

it "reindexes account" do
expect do
fake_login_admin(admin)
subject.call
end.to add_to_reindex_queue(user, :users)
end
end
end
end
Expand Down
Loading