DEV: Database backed admin notices (#26192)

This PR introduces a basic AdminNotice model to store these notices. Admin notices are categorized by their source/type (currently only notices from problem check.) They also have a priority.
This commit is contained in:
Ted Johansson
2024-05-23 09:29:08 +08:00
committed by GitHub
parent 7e8e803785
commit 3137e60653
55 changed files with 512 additions and 264 deletions

View File

@ -41,7 +41,8 @@ RSpec.describe ProblemCheck::GroupEmailCredentials do
expect(described_class.new.call).to contain_exactly(
have_attributes(
identifier: "group_#{group2.id}_email_credentials",
identifier: "group_email_credentials",
target: group2.id,
priority: "high",
message:
"There was an issue with the email credentials for the group <a href=\"/g/#{group2.name}/manage/email\"></a>. No emails will be sent from the group inbox until this problem is addressed. There was an issue with the SMTP credentials provided, check the username and password and try again.",
@ -58,7 +59,8 @@ RSpec.describe ProblemCheck::GroupEmailCredentials do
expect(described_class.new.call).to contain_exactly(
have_attributes(
identifier: "group_#{group3.id}_email_credentials",
identifier: "group_email_credentials",
target: group3.id,
priority: "high",
message:
"There was an issue with the email credentials for the group <a href=\"/g/#{group3.name}/manage/email\"></a>. No emails will be sent from the group inbox until this problem is addressed. There was an issue with the IMAP credentials provided, check the username and password and try again.",