diff --git a/packages/api/definitions/labels.json b/packages/api/definitions/labels.json index 91b5dd43cba..acb6fa02c49 100644 --- a/packages/api/definitions/labels.json +++ b/packages/api/definitions/labels.json @@ -20,6 +20,12 @@ "preferences": ["warn"], "flags": [], "onwarn": "blur" + }, + { + "id": "!no-unauthenticated", + "preferences": ["hide"], + "flags": ["no-override", "unauthed"], + "onwarn": "blur" } ] }, diff --git a/packages/api/definitions/locale/en/labels.json b/packages/api/definitions/locale/en/labels.json index 9a29b4b44d5..65b22db746b 100644 --- a/packages/api/definitions/locale/en/labels.json +++ b/packages/api/definitions/locale/en/labels.json @@ -41,6 +41,20 @@ "description": "This content has received a general warning from moderators." } }, + "!no-unauthenticated": { + "settings": { + "name": "Sign-in Required", + "description": "This user has requested that their account only be shown to signed-in users." + }, + "account": { + "name": "Sign-in Required", + "description": "This user has requested that their account only be shown to signed-in users." + }, + "content": { + "name": "Sign-in Required", + "description": "This user has requested that their content only be shown to signed-in users." + } + }, "dmca-violation": { "settings": { "name": "Copyright Violation", diff --git a/packages/api/definitions/moderation-behaviors.d.ts b/packages/api/definitions/moderation-behaviors.d.ts index 8d980978623..2b29d93b26e 100644 --- a/packages/api/definitions/moderation-behaviors.d.ts +++ b/packages/api/definitions/moderation-behaviors.d.ts @@ -41,6 +41,7 @@ export interface ModerationBehaviors { configurations: Record< string, { + authed?: boolean adultContentEnabled: boolean settings: Record } diff --git a/packages/api/definitions/post-moderation-behaviors.json b/packages/api/definitions/post-moderation-behaviors.json index a82ae5c80d9..302304b217d 100644 --- a/packages/api/definitions/post-moderation-behaviors.json +++ b/packages/api/definitions/post-moderation-behaviors.json @@ -89,6 +89,9 @@ "porn-warn-intolerant-hide": { "adultContentEnabled": true, "settings": { "porn": "warn", "intolerant": "hide" } + }, + "logged-out": { + "authed": false } }, "scenarios": { @@ -248,6 +251,121 @@ } }, + "Imperative label ('!no-unauthenticated') on post when logged out": { + "cfg": "logged-out", + "subject": "post", + "author": "alice", + "labels": { "post": ["!no-unauthenticated"] }, + "behaviors": { + "content": { + "cause": "label:!no-unauthenticated", + "filter": true, + "blur": true, + "noOverride": true + } + } + }, + "Imperative label ('!no-unauthenticated') on author profile when logged out": { + "cfg": "logged-out", + "subject": "post", + "author": "alice", + "labels": { "profile": ["!no-unauthenticated"] }, + "behaviors": { + "avatar": { + "cause": "label:!no-unauthenticated", + "blur": true, + "noOverride": true + } + } + }, + "Imperative label ('!no-unauthenticated') on author account when logged out": { + "cfg": "logged-out", + "subject": "post", + "author": "alice", + "labels": { "account": ["!no-unauthenticated"] }, + "behaviors": { + "content": { + "cause": "label:!no-unauthenticated", + "filter": true, + "blur": true, + "noOverride": true + }, + "avatar": { + "cause": "label:!no-unauthenticated", + "blur": true, + "noOverride": true + } + } + }, + "Imperative label ('!no-unauthenticated') on quoted post when logged out": { + "cfg": "logged-out", + "subject": "post", + "author": "alice", + "quoteAuthor": "alice", + "labels": { "quotedPost": ["!no-unauthenticated"] }, + "behaviors": { + "content": { "cause": "label:!no-unauthenticated", "filter": true }, + "embed": { + "cause": "label:!no-unauthenticated", + "blur": true, + "noOverride": true + } + } + }, + "Imperative label ('!no-unauthenticated') on quoted author account when logged out": { + "cfg": "logged-out", + "subject": "post", + "author": "alice", + "quoteAuthor": "alice", + "labels": { "quotedAccount": ["!no-unauthenticated"] }, + "behaviors": { + "content": { "cause": "label:!no-unauthenticated", "filter": true }, + "embed": { + "cause": "label:!no-unauthenticated", + "blur": true, + "noOverride": true + } + } + }, + + "Imperative label ('!no-unauthenticated') on post when logged in": { + "cfg": "none", + "subject": "post", + "author": "alice", + "labels": { "post": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Imperative label ('!no-unauthenticated') on author profile when logged in": { + "cfg": "none", + "subject": "post", + "author": "alice", + "labels": { "profile": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Imperative label ('!no-unauthenticated') on author account when logged in": { + "cfg": "none", + "subject": "post", + "author": "alice", + "labels": { "account": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Imperative label ('!no-unauthenticated') on quoted post when logged in": { + "cfg": "none", + "subject": "post", + "author": "alice", + "quoteAuthor": "alice", + "labels": { "quotedPost": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Imperative label ('!no-unauthenticated') on quoted author account when logged in": { + "cfg": "none", + "subject": "post", + "author": "alice", + "quoteAuthor": "alice", + "labels": { "quotedAccount": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Blur label ('intolerant') on post (hide)": { "cfg": "intolerant-hide", "subject": "post", diff --git a/packages/api/definitions/profile-moderation-behaviors.json b/packages/api/definitions/profile-moderation-behaviors.json index 342592f3421..d76cd18bfc4 100644 --- a/packages/api/definitions/profile-moderation-behaviors.json +++ b/packages/api/definitions/profile-moderation-behaviors.json @@ -94,6 +94,9 @@ }, "intolerant-hide-scam-warn": { "settings": { "intolerant": "hide", "scam": "hide" } + }, + "logged-out": { + "authed": false } }, "scenarios": { @@ -161,6 +164,51 @@ } }, + "Imperative label ('!no-unauthenticated') on account when logged out": { + "cfg": "logged-out", + "subject": "profile", + "author": "alice", + "labels": { "account": ["!no-unauthenticated"] }, + "behaviors": { + "account": { + "cause": "label:!no-unauthenticated", + "filter": true, + "blur": true, + "noOverride": true + }, + "avatar": { "blur": true, "noOverride": true } + } + }, + "Imperative label ('!no-unauthenticated') on profile when logged out": { + "cfg": "logged-out", + "subject": "profile", + "author": "alice", + "labels": { "profile": ["!no-unauthenticated"] }, + "behaviors": { + "profile": { + "cause": "label:!no-unauthenticated", + "blur": true, + "noOverride": true + }, + "avatar": { "blur": true, "noOverride": true } + } + }, + + "Imperative label ('!no-unauthenticated') on account when logged in": { + "cfg": "none", + "subject": "profile", + "author": "alice", + "labels": { "account": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Imperative label ('!no-unauthenticated') on profile when logged in": { + "cfg": "none", + "subject": "profile", + "author": "alice", + "labels": { "profile": ["!no-unauthenticated"] }, + "behaviors": {} + }, + "Blur label ('intolerant') on account (hide)": { "cfg": "intolerant-hide", "subject": "profile", diff --git a/packages/api/docs/labels.md b/packages/api/docs/labels.md index a2d8806b566..943d3f54613 100644 --- a/packages/api/docs/labels.md +++ b/packages/api/docs/labels.md @@ -73,6 +73,14 @@ The kind of UI behavior used when a warning must be applied. blur + + !no-unauthenticated + system + hide + ❌ + no-override, unauthed + blur + dmca-violation legal @@ -343,6 +351,14 @@ The kind of UI behavior used when a warning must be applied. on content
Content Warning
This content has received a general warning from moderators.

+ + !no-unauthenticated + + general
Sign-in Required
This user has requested that their account only be shown to signed-in users.

+ on an account
Sign-in Required
This user has requested that their account only be shown to signed-in users.

+ on content
Sign-in Required
This user has requested that their content only be shown to signed-in users.

+ + dmca-violation diff --git a/packages/api/docs/moderation-behaviors/posts.md b/packages/api/docs/moderation-behaviors/posts.md index 5ddcf9ff602..918386ea50a 100644 --- a/packages/api/docs/moderation-behaviors/posts.md +++ b/packages/api/docs/moderation-behaviors/posts.md @@ -34,7 +34,6 @@ Key: 🚫 - @@ -54,7 +53,6 @@ Key: 🚫 - @@ -68,11 +66,9 @@ Key: 🚫 - 🚫 - @@ -92,7 +88,6 @@ Key: 🚫 - @@ -109,7 +104,6 @@ Key: 🚫 - @@ -200,7 +194,6 @@ Key: ✋ - @@ -220,7 +213,6 @@ Key: ✋ - @@ -234,11 +226,9 @@ Key: ✋ - ✋ - @@ -258,7 +248,6 @@ Key: ✋ - @@ -275,6 +264,165 @@ Key: ✋ + + + + +Imperative label ('!no-unauthenticated') on post when logged out + +❌ + + +🚫 + + + + + + + + + + +Imperative label ('!no-unauthenticated') on author profile when logged out + + + + + + + +🚫 + + + + + + + +Imperative label ('!no-unauthenticated') on author account when logged out + +❌ + + +🚫 + + +🚫 + + + + + + + +Imperative label ('!no-unauthenticated') on quoted post when logged out + +❌ + + + + + + + + +🚫 + + + + +Imperative label ('!no-unauthenticated') on quoted author account when logged out + +❌ + + + + + + + + +🚫 + + + + +Imperative label ('!no-unauthenticated') on post when logged in + + + + + + + + + + + + + + + +Imperative label ('!no-unauthenticated') on author profile when logged in + + + + + + + + + + + + + + + +Imperative label ('!no-unauthenticated') on author account when logged in + + + + + + + + + + + + + + + +Imperative label ('!no-unauthenticated') on quoted post when logged in + + + + + + + + + + + + + + + +Imperative label ('!no-unauthenticated') on quoted author account when logged in + + + + + + + + + + @@ -287,7 +435,6 @@ Key: ✋ - @@ -307,7 +454,6 @@ Key: ✋ - @@ -321,11 +467,9 @@ Key: ✋ - ✋ - @@ -345,7 +489,6 @@ Key: ✋ - @@ -362,7 +505,6 @@ Key: ✋ - @@ -373,7 +515,6 @@ Key: ✋ - @@ -393,7 +534,6 @@ Key: ✋ - @@ -407,11 +547,9 @@ Key: ✋ - ✋ - @@ -431,7 +569,6 @@ Key: ✋ - @@ -448,7 +585,6 @@ Key: ✋ - @@ -546,7 +682,6 @@ Key: ✋ - @@ -560,7 +695,6 @@ Key: ✋ - @@ -577,11 +711,9 @@ Key: ✋ - ✋ - @@ -598,7 +730,6 @@ Key: ✋ - @@ -631,7 +762,6 @@ Key: ✋ - @@ -645,7 +775,6 @@ Key: ✋ - @@ -662,11 +791,9 @@ Key: ✋ - ✋ - @@ -683,7 +810,6 @@ Key: ✋ - @@ -790,9 +916,7 @@ Key: ❌ - 🪧 - @@ -811,9 +935,7 @@ Key: - 🪧 - @@ -826,14 +948,10 @@ Key: ❌ - 🪧 - - 🪧 - @@ -852,9 +970,7 @@ Key: - 🪧 - @@ -870,9 +986,7 @@ Key: - 🪧 - @@ -882,9 +996,7 @@ Key: - 🪧 - @@ -903,9 +1015,7 @@ Key: - 🪧 - @@ -918,14 +1028,10 @@ Key: - 🪧 - - 🪧 - @@ -944,9 +1050,7 @@ Key: - 🪧 - @@ -962,9 +1066,7 @@ Key: - 🪧 - @@ -1062,7 +1164,6 @@ Key: 🚫 - @@ -1076,7 +1177,6 @@ Key: 🚫 - @@ -1093,11 +1193,9 @@ Key: 🚫 - 🚫 - @@ -1114,7 +1212,6 @@ Key: 🚫 - @@ -1142,7 +1239,6 @@ Key: ✋ - @@ -1197,7 +1293,6 @@ Key: ✋ - @@ -1224,7 +1319,6 @@ Key: ✋ - @@ -1279,7 +1373,6 @@ Key: ✋ - @@ -1312,7 +1405,6 @@ Key: ✋ - @@ -1361,7 +1453,6 @@ Key: ✋ - @@ -1394,7 +1485,6 @@ Key: ✋ - @@ -1443,7 +1533,6 @@ Key: ✋ - @@ -1471,11 +1560,9 @@ Key: 🚫 - 🚫 - @@ -1495,7 +1582,6 @@ Key: 🚫 - @@ -1506,11 +1592,9 @@ Key: 🚫 - 🚫 - @@ -1530,7 +1614,6 @@ Key: 🚫 - @@ -1541,7 +1624,6 @@ Key: ✋ - @@ -1564,7 +1646,6 @@ Key: ✋ - @@ -1575,7 +1656,6 @@ Key: ✋ - @@ -1598,7 +1678,6 @@ Key: ✋ - @@ -1610,11 +1689,9 @@ Key: 🚫 - 🚫 - @@ -1634,7 +1711,6 @@ Key: 🚫 - @@ -1645,11 +1721,9 @@ Key: 🚫 - 🚫 - @@ -1663,15 +1737,12 @@ Key: 🚫 - 🚫 - 🚫 - @@ -1682,7 +1753,6 @@ Key: 🚫 - @@ -1699,7 +1769,6 @@ Key: ✋ - @@ -1716,7 +1785,6 @@ Key: 🚫 - @@ -1739,7 +1807,6 @@ Key: ✋ - diff --git a/packages/api/docs/moderation-behaviors/profiles.md b/packages/api/docs/moderation-behaviors/profiles.md index 213b3bd3259..61bbf77c5da 100644 --- a/packages/api/docs/moderation-behaviors/profiles.md +++ b/packages/api/docs/moderation-behaviors/profiles.md @@ -131,6 +131,74 @@ Key: + +Imperative label ('!no-unauthenticated') on account when logged out + +❌ + + +🚫 + + + + + + +🚫 + + + + + +Imperative label ('!no-unauthenticated') on profile when logged out + + + + + + + +🚫 + + + +🚫 + + + + + +Imperative label ('!no-unauthenticated') on account when logged in + + + + + + + + + + + + + + + +Imperative label ('!no-unauthenticated') on profile when logged in + + + + + + + + + + + + + + ScenarioFilterAccountProfileAvatar Blur label ('intolerant') on account (hide) diff --git a/packages/api/scripts/docs/labels.mjs b/packages/api/scripts/docs/labels.mjs index 979b23738e1..1e1d0d7a6a6 100644 --- a/packages/api/scripts/docs/labels.mjs +++ b/packages/api/scripts/docs/labels.mjs @@ -36,47 +36,47 @@ writeFileSync(join(__dirname, '..', '..', 'docs', 'labels.md'), doc(), 'utf8') function doc() { return stripIndent` - + - # Labels - - This document is a reference for the labels used in the SDK. +# Labels - **⚠️ Note**: These labels are still in development and may change over time. Not all are currently in use. +This document is a reference for the labels used in the SDK. - ## Key +**⚠️ Note**: These labels are still in development and may change over time. Not all are currently in use. - ### Label Preferences +## Key - The possible client interpretations for a label. +### Label Preferences - - ignore Do nothing with the label. - - warn Provide some form of warning on the content (see "On Warn" behavior). - - hide Remove the content from feeds and apply the warning when directly viewed. +The possible client interpretations for a label. - Each label specifies which preferences it can support. If a label is not configurable, it must have only own supported preference. +- ignore Do nothing with the label. +- warn Provide some form of warning on the content (see "On Warn" behavior). +- hide Remove the content from feeds and apply the warning when directly viewed. - ### Configurable? +Each label specifies which preferences it can support. If a label is not configurable, it must have only own supported preference. - Non-configurable labels cannot have their preference changed by the user. +### Configurable? - ### Flags +Non-configurable labels cannot have their preference changed by the user. - Additional behaviors which a label can adopt. +### Flags - - no-override The user cannot click through any covering of content created by the label. - - adult The user must have adult content enabled to configure the label. If adult content is not enabled, the label must adopt the strictest preference. +Additional behaviors which a label can adopt. - ### On Warn +- no-override The user cannot click through any covering of content created by the label. +- adult The user must have adult content enabled to configure the label. If adult content is not enabled, the label must adopt the strictest preference. - The kind of UI behavior used when a warning must be applied. +### On Warn - - blur Hide all of the content behind an interstitial. - - blur-media Hide only the media within the content (ie images) behind an interstitial. - - alert Display a descriptive warning but do not hide the content. - - null Do nothing. +The kind of UI behavior used when a warning must be applied. - ## Label Behaviors +- blur Hide all of the content behind an interstitial. +- blur-media Hide only the media within the content (ie images) behind an interstitial. +- alert Display a descriptive warning but do not hide the content. +- null Do nothing. + +## Label Behaviors @@ -90,7 +90,7 @@ function doc() { ${labelsRef()}
- ## Label Group Descriptions +## Label Group Descriptions @@ -100,7 +100,7 @@ function doc() { ${labelGroupsDesc()}
- ## Label Descriptions +## Label Descriptions diff --git a/packages/api/scripts/docs/post-moderation-behaviors.mjs b/packages/api/scripts/docs/post-moderation-behaviors.mjs index e90809fb000..315799831f3 100644 --- a/packages/api/scripts/docs/post-moderation-behaviors.mjs +++ b/packages/api/scripts/docs/post-moderation-behaviors.mjs @@ -27,44 +27,44 @@ writeFileSync( function posts() { let lastTitle = 'NULL' return stripIndents` - - - # Post moderation behaviors - - This document is a reference for the expected behaviors for a post in the application based on some given scenarios. The moderatePost() command condense down to the following yes or no decisions: - - - res.content.filter Do not show the post in feeds. - - res.content.blur Put the post behind a warning cover. - - res.content.noOverride Do not allow the post's blur cover to be lifted. - - res.content.alert Add a warning to the post but do not cover it. - - res.avatar.blur Put the avatar behind a cover. - - res.avatar.noOverride Do not allow the avatars's blur cover to be lifted. - - res.avatar.alert Put a warning icon on the avatar. - - res.embed.blur Put the embed content (media, quote post) behind a warning cover. - - res.embed.noOverride Do not allow the embed's blur cover to be lifted. - - res.embed.alert Put a warning on the embed content (media, quote post). - - Key: - - - ❌ = Filter Content - - 🚫 = Blur (no-override) - - ✋ = Blur - - 🪧 = Alert - - ## Scenarios - -
- ${Array.from(Object.entries(postModerationBehaviorsDef.scenarios)) - .map(([title, scenario], i) => { - const str = ` - ${title.indexOf(lastTitle) === -1 ? postTableHead() : ''} - ${scenarioSection(title, scenario)} - ` - lastTitle = title.slice(0, 10) - return str - }) - .join('\n\n')} -
+ + +# Post moderation behaviors + +This document is a reference for the expected behaviors for a post in the application based on some given scenarios. The moderatePost() command condense down to the following yes or no decisions: + +- res.content.filter Do not show the post in feeds. +- res.content.blur Put the post behind a warning cover. +- res.content.noOverride Do not allow the post's blur cover to be lifted. +- res.content.alert Add a warning to the post but do not cover it. +- res.avatar.blur Put the avatar behind a cover. +- res.avatar.noOverride Do not allow the avatars's blur cover to be lifted. +- res.avatar.alert Put a warning icon on the avatar. +- res.embed.blur Put the embed content (media, quote post) behind a warning cover. +- res.embed.noOverride Do not allow the embed's blur cover to be lifted. +- res.embed.alert Put a warning on the embed content (media, quote post). + +Key: + +- ❌ = Filter Content +- 🚫 = Blur (no-override) +- ✋ = Blur +- 🪧 = Alert + +## Scenarios + + + ${Array.from(Object.entries(postModerationBehaviorsDef.scenarios)) + .map(([title, scenario], i) => { + const str = ` + ${title.indexOf(lastTitle) === -1 ? postTableHead() : ''} + ${scenarioSection(title, scenario)} + ` + lastTitle = title.slice(0, 10) + return str + }) + .join('')} +
` } @@ -73,8 +73,7 @@ function postTableHead() { } function scenarioSection(title, scenario) { - return stripIndents` - + return stripIndents` ${title} ${filter(scenario.behaviors.content?.filter)} @@ -83,25 +82,21 @@ function scenarioSection(title, scenario) { ${blur( scenario.behaviors.content?.blur, scenario.behaviors.content?.noOverride, - )} - ${alert(scenario.behaviors.content?.alert)} + )}${alert(scenario.behaviors.content?.alert)} ${blur( scenario.behaviors.avatar?.blur, scenario.behaviors.avatar?.noOverride, - )} - ${alert(scenario.behaviors.avatar?.alert)} + )}${alert(scenario.behaviors.avatar?.alert)} ${blur( scenario.behaviors.embed?.blur, scenario.behaviors.embed?.noOverride, - )} - ${alert(scenario.behaviors.embed?.alert)} + )}${alert(scenario.behaviors.embed?.alert)} - - ` + ` } function filter(val) { diff --git a/packages/api/src/moderation/accumulator.ts b/packages/api/src/moderation/accumulator.ts index 716647ee772..f1e27db1011 100644 --- a/packages/api/src/moderation/accumulator.ts +++ b/packages/api/src/moderation/accumulator.ts @@ -96,6 +96,11 @@ export class ModerationCauseAccumulator { return } + // ignore 'unauthed' labels when the user is authed + if (labelDef.flags.includes('unauthed') && !!opts.userDid) { + return + } + // establish the priority of the label let priority: 1 | 2 | 5 | 7 | 8 if (labelDef.flags.includes('no-override')) { diff --git a/packages/api/src/moderation/const/label-groups.ts b/packages/api/src/moderation/const/label-groups.ts index 108727ef7a6..564721c7930 100644 --- a/packages/api/src/moderation/const/label-groups.ts +++ b/packages/api/src/moderation/const/label-groups.ts @@ -6,7 +6,12 @@ export const LABEL_GROUPS: LabelGroupDefinitionMap = { system: { id: 'system', configurable: false, - labels: [LABELS['!hide'], LABELS['!no-promote'], LABELS['!warn']], + labels: [ + LABELS['!hide'], + LABELS['!no-promote'], + LABELS['!warn'], + LABELS['!no-unauthenticated'], + ], strings: { settings: { en: { diff --git a/packages/api/src/moderation/const/labels.ts b/packages/api/src/moderation/const/labels.ts index 7e4c91777e7..f8a9a7911c0 100644 --- a/packages/api/src/moderation/const/labels.ts +++ b/packages/api/src/moderation/const/labels.ts @@ -89,6 +89,37 @@ export const LABELS: LabelDefinitionMap = { }, }, }, + '!no-unauthenticated': { + id: '!no-unauthenticated', + preferences: ['hide'], + flags: ['no-override', 'unauthed'], + onwarn: 'blur', + groupId: 'system', + configurable: false, + strings: { + settings: { + en: { + name: 'Requested Hidden to Logged-out Users', + description: + 'This user has requested that their content only be shown to logged-in accounts.', + }, + }, + account: { + en: { + name: 'Sign-in Required', + description: + 'This user has requested that their content only be shown to logged-in accounts.', + }, + }, + content: { + en: { + name: 'Sign-in Required', + description: + 'This user has requested that their content only be shown to logged-in accounts.', + }, + }, + }, + }, 'dmca-violation': { id: 'dmca-violation', preferences: ['hide'], diff --git a/packages/api/src/moderation/types.ts b/packages/api/src/moderation/types.ts index e3cb6200a00..b60b3ee593a 100644 --- a/packages/api/src/moderation/types.ts +++ b/packages/api/src/moderation/types.ts @@ -11,7 +11,7 @@ import { export type Label = ComAtprotoLabelDefs.Label export type LabelPreference = 'ignore' | 'warn' | 'hide' -export type LabelDefinitionFlag = 'no-override' | 'adult' +export type LabelDefinitionFlag = 'no-override' | 'adult' | 'unauthed' export type LabelDefinitionOnWarnBehavior = | 'blur' | 'blur-media' diff --git a/packages/api/tests/util/moderation-behavior.ts b/packages/api/tests/util/moderation-behavior.ts index fd7df918153..cc7a101e11f 100644 --- a/packages/api/tests/util/moderation-behavior.ts +++ b/packages/api/tests/util/moderation-behavior.ts @@ -170,7 +170,10 @@ export class ModerationBehaviorSuiteRunner { moderationOpts(scenario: ModerationBehaviorScenario): ModerationOpts { return { - userDid: 'did:web:self.test', + userDid: + this.suite.configurations[scenario.cfg].authed === false + ? '' + : 'did:web:self.test', adultContentEnabled: Boolean( this.suite.configurations[scenario.cfg].adultContentEnabled, ),