-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure labeler service account in dev-env (#2363)
* 🚧 WIP attempting to make ozone work with local * ✨ Labeler service set up works * Renmae account details for mod authority * 🧹 Clean up createOzoneDid signature * 🚨 Fix typedef * ✅ Adjust snapshot * ✅ Fix test with invite code * 🚧 WIP * 🚧 WIP * 🚧 bring back test * 🚧 bring back test * ✅ Update ozone snapshots * ✅ Update ozone snapshots
- Loading branch information
Showing
8 changed files
with
495 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,328 +350,6 @@ export async function generateMockSetup(env: TestNetwork) { | |
}, | ||
) | ||
|
||
// create the dev-env moderator | ||
{ | ||
const res = await clients.loggedout.api.com.atproto.server.createAccount({ | ||
email: '[email protected]', | ||
handle: 'mod-authority.test', | ||
password: 'hunter2', | ||
}) | ||
const agent = env.pds.getClient() | ||
agent.api.setHeader('Authorization', `Bearer ${res.data.accessJwt}`) | ||
await agent.api.app.bsky.actor.profile.create( | ||
{ repo: res.data.did }, | ||
{ | ||
displayName: 'Dev-env Moderation', | ||
description: `The pretend version of mod.bsky.app`, | ||
}, | ||
) | ||
|
||
await agent.api.app.bsky.labeler.service.create( | ||
{ repo: res.data.did, rkey: 'self' }, | ||
{ | ||
policies: { | ||
labelValues: [ | ||
'!hide', | ||
'!warn', | ||
'porn', | ||
'sexual', | ||
'nudity', | ||
'sexual-figurative', | ||
'graphic-media', | ||
'self-harm', | ||
'sensitive', | ||
'extremist', | ||
'intolerant', | ||
'threat', | ||
'rude', | ||
'illicit', | ||
'security', | ||
'unsafe-link', | ||
'impersonation', | ||
'misinformation', | ||
'scam', | ||
'engagement-farming', | ||
'spam', | ||
'rumor', | ||
'misleading', | ||
'inauthentic', | ||
], | ||
labelValueDefinitions: [ | ||
{ | ||
identifier: 'spam', | ||
blurs: 'content', | ||
severity: 'inform', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Spam', | ||
description: | ||
'Unwanted, repeated, or unrelated actions that bother users.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'impersonation', | ||
blurs: 'none', | ||
severity: 'inform', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Impersonation', | ||
description: | ||
'Pretending to be someone else without permission.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'scam', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Scam', | ||
description: 'Scams, phishing & fraud.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'intolerant', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Intolerance', | ||
description: 'Discrimination against protected groups.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'self-harm', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Self-Harm', | ||
description: | ||
'Promotes self-harm, including graphic images, glorifying discussions, or triggering stories.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'security', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Security Concerns', | ||
description: | ||
'May be unsafe and could harm your device, steal your info, or get your account hacked.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'misleading', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Misleading', | ||
description: | ||
'Altered images/videos, deceptive links, or false statements.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'threat', | ||
blurs: 'content', | ||
severity: 'inform', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Threats', | ||
description: | ||
'Promotes violence or harm towards others, including threats, incitement, or advocacy of harm.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'unsafe-link', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Unsafe link', | ||
description: | ||
'Links to harmful sites with malware, phishing, or violating content that risk security and privacy.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'illicit', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Illicit', | ||
description: | ||
'Promoting or selling potentially illicit goods, services, or activities.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'misinformation', | ||
blurs: 'content', | ||
severity: 'inform', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Misinformation', | ||
description: | ||
'Spreading false or misleading info, including unverified claims and harmful conspiracy theories.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'rumor', | ||
blurs: 'content', | ||
severity: 'inform', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Rumor', | ||
description: | ||
'Approach with caution, as these claims lack evidence from credible sources.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'rude', | ||
blurs: 'content', | ||
severity: 'inform', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Rude', | ||
description: | ||
'Rude or impolite, including crude language and disrespectful comments, without constructive purpose.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'extremist', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Extremist', | ||
description: | ||
'Radical views advocating violence, hate, or discrimination against individuals or groups.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'sensitive', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'warn', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Sensitive', | ||
description: | ||
'May be upsetting, covering topics like substance abuse or mental health issues, cautioning sensitive viewers.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'engagement-farming', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Engagement Farming', | ||
description: | ||
'Insincere content or bulk actions aimed at gaining followers, including frequent follows, posts, and likes.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'inauthentic', | ||
blurs: 'content', | ||
severity: 'alert', | ||
defaultSetting: 'hide', | ||
adultOnly: false, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Inauthentic Account', | ||
description: 'Bot or a person pretending to be someone else.', | ||
}, | ||
], | ||
}, | ||
{ | ||
identifier: 'sexual-figurative', | ||
blurs: 'media', | ||
severity: 'none', | ||
defaultSetting: 'show', | ||
adultOnly: true, | ||
locales: [ | ||
{ | ||
lang: 'en', | ||
name: 'Sexually Suggestive (Cartoon)', | ||
description: | ||
'Art with explicit or suggestive sexual themes, including provocative imagery or partial nudity.', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
createdAt: date.next().value, | ||
}, | ||
) | ||
} | ||
|
||
// create a labeler account | ||
{ | ||
const res = await clients.loggedout.api.com.atproto.server.createAccount({ | ||
|
Oops, something went wrong.