FEATURE: Scheduled group email credential problem check (#15396)

This commit adds a check that runs regularly as per
2d68e5d942fa9312655d3d5abacf15d8a9fca948 which tests the
credentials of groups with SMTP or IMAP enabled. If any issues
are found with those credentials a high priority problem is added to the
admin dashboard.

This commit also formats the admin dashboard differently if
there are high priority problems, bringing them to the top of
the list and highlighting them.

The problem will be cleared if the issue is fixed before the next
problem check, or if the group's settings are updated with a valid
credential.
This commit is contained in:
Martin Brennan
2022-01-04 10:14:33 +10:00
committed by GitHub
parent 8a26ea23f6
commit 20fe5eceb8
11 changed files with 223 additions and 14 deletions

View File

@ -174,6 +174,7 @@ class GroupsController < ApplicationController
group.record_email_setting_changes!(current_user)
group.expire_imap_mailbox_cache
update_existing_users(group.group_users, notification_level, categories, tags) if params[:update_existing_users] == "true"
AdminDashboardData.clear_found_problem("group_#{group.id}_email_credentials")
if guardian.can_see?(group)
render json: success_json