diff --git a/app/lib/admin/actions/moderation_case_create.dart b/app/lib/admin/actions/moderation_case_create.dart index 7af60e896c..fdfd8c4c8f 100644 --- a/app/lib/admin/actions/moderation_case_create.dart +++ b/app/lib/admin/actions/moderation_case_create.dart @@ -22,7 +22,7 @@ Returns the fields on the newly created moderation case. 'The email of the reporter. (default value: `support@pub.dev`)', 'kind': 'The kind of the moderation case. (default value: `notification`)', 'source': - 'The source of the moderation case. (default value: `internal-notification`)', + 'The source of the moderation case. (default value: `trusted-flagger`)', 'subject': 'The subject of the moderation case.', 'url': 'The url of the moderation case (optional).' }, @@ -37,7 +37,7 @@ Returns the fields on the newly created moderation case. InvalidInputException.check( ModerationKind.isValidKind(kind), 'invalid kind'); - final source = options['source'] ?? ModerationSource.internalNotification; + final source = options['source'] ?? ModerationSource.trustedFlagger; InvalidInputException.check( ModerationSource.isValidSource(source), 'invalid source'); diff --git a/app/lib/admin/models.dart b/app/lib/admin/models.dart index fc00c01d0f..dd44b7fcea 100644 --- a/app/lib/admin/models.dart +++ b/app/lib/admin/models.dart @@ -34,7 +34,9 @@ class ModerationCase extends db.ExpandoModel { /// 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; @@ -199,17 +201,17 @@ class ModerationCase extends db.ExpandoModel { 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); } diff --git a/app/test/admin/moderation_case_test.dart b/app/test/admin/moderation_case_test.dart index 91caac71c0..6bbfb560e0 100644 --- a/app/test/admin/moderation_case_test.dart +++ b/app/test/admin/moderation_case_test.dart @@ -26,7 +26,7 @@ void main() { 'kind': 'notification', 'opened': isNotEmpty, 'resolved': null, - 'source': 'internal-notification', + 'source': 'trusted-flagger', 'subject': 'package:oxygen', 'isSubjectOwner': false, 'url': null,