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
6 changes: 4 additions & 2 deletions app/lib/account/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class User extends db.ExpandoModel<String> {
InvalidInputException.checkAnyOf(
moderatedReason,
'reason',
UserModeratedReason._values,
UserModeratedReason.values,
);
} else {
InvalidInputException.checkNull(moderatedReason, 'reason');
Expand Down Expand Up @@ -416,13 +416,15 @@ abstract class UserModeratedReason {
static const bot = 'bot';
static const illegalContent = 'illegal-content';
static const policyViolation = 'policy-violation';
static const spam = 'spam';
static const unfoundedNotifications = 'unfounded-notifications';
static const unfoundedAppeals = 'unfounded-appeals';

static const _values = {
static const values = {
bot,
illegalContent,
policyViolation,
spam,
unfoundedNotifications,
unfoundedAppeals,
};
Expand Down
3 changes: 2 additions & 1 deletion app/lib/admin/actions/moderate_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ The active web sessions of the user will be expired.
'case':
'The ModerationCase.caseId that this action is part of (or `none`).',
'user': 'The user-id or the email of the user to be moderated',
'reason': 'The reason for user moderation.',
'reason':
'The reason for user moderation. One of ${UserModeratedReason.values.join(', ')}.',
'state':
'Set moderated state true / false. Returns current state if omitted.',
'note': 'Optional note to store (internal).'
Expand Down