Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ModerationSource values and documentation. #8088

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions app/lib/admin/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class ModerationCase extends db.ExpandoModel<String> {

/// The source of the case, one of:
/// - `external-notification`,
/// - `internal-notification` (only used for reports from @google.com accounts), or,
/// - `trusted-flagger`,
/// - `authorities`,
/// - `legal-referral`,
/// - `automated-detection`. (will not be used)
@db.StringProperty(required: true)
late String source;
Expand Down Expand Up @@ -199,17 +201,17 @@ class ModerationCase extends db.ExpandoModel<String> {

abstract class ModerationSource {
static const externalNotification = 'external-notification';
static const internalNotification = 'internal-notification';
static const trustedFlagger = 'trusted-flagger';
static const authorities = 'authorities';
static const legalReferral = 'legal-referral';
static const automatedDetection = 'automated-detection';

static const _values = [
externalNotification,
internalNotification,
trustedFlagger,
authorities,
legalReferral,
automatedDetection,
];
static bool isValidSource(String value) => _values.contains(value);
}
Expand Down
Loading