Skip to content

Commit 9689f6e

Browse files
authored
Merge 49b2354 into ecd7781
2 parents ecd7781 + 49b2354 commit 9689f6e

13 files changed

Lines changed: 147 additions & 40 deletions

File tree

apps/frontend/src/locales/en-US/index.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,43 +2853,43 @@
28532853
"message": "URL"
28542854
},
28552855
"project.settings.permissions.attention-needed.description.proj-approved": {
2856-
"message": "Please provide proof that you have permission to redistribute all of the following files and any withheld versions will be automatically published."
2856+
"message": "Please provide proof that you have permission to redistribute all of the following files. Once completed, withheld versions will be automatically published."
28572857
},
28582858
"project.settings.permissions.attention-needed.description.proj-draft": {
2859-
"message": "Please provide proof that you have permission to redistribute all of the following files before you can submit your project for review."
2859+
"message": "Please provide proof that you have permission to redistribute all of the following files before submitting your project for review."
28602860
},
28612861
"project.settings.permissions.attention-needed.title": {
2862-
"message": "Unknown embedded content"
2862+
"message": "Unknown external content"
28632863
},
28642864
"project.settings.permissions.completed.description": {
2865-
"message": "All external content has attributions provided."
2865+
"message": "All external content has permission information and attributions have been provided."
28662866
},
28672867
"project.settings.permissions.completed.title": {
2868-
"message": "Attributions completed!"
2868+
"message": "Permissions completed!"
28692869
},
28702870
"project.settings.permissions.empty-state.description": {
2871-
"message": "None of your versions contain external content, so you don't need to worry about obtaining permissions."
2871+
"message": "None of your project's versions contain external content, so you don't need to worry about obtaining permissions."
28722872
},
28732873
"project.settings.permissions.empty-state.heading": {
28742874
"message": "You're all set!"
28752875
},
28762876
"project.settings.permissions.fail.description": {
2877-
"message": "You don't have permission to redistribute some of the external content you've added. In order to publish on Modrinth, remove the infringing content or provide proof that you do have permission to use it."
2877+
"message": "You may not have permission to redistribute some of the external content in your project. In order to publish on Modrinth, please remove this content or provide proof that you do have permission to use it."
28782878
},
28792879
"project.settings.permissions.fail.title": {
28802880
"message": "Some content can't be included"
28812881
},
28822882
"project.settings.permissions.info-banner.description": {
2883-
"message": "If you include content that isn’t hosted on Modrinth, you need to let us know where it’s from and verify that you have permission to distribute the files. Check out <link>our guide</link> to learn about how to do this properly!"
2883+
"message": "If you include content that isn’t hosted on Modrinth, you need to let us know where it’s from and verify that you have permission to distribute the files. Check out <link>our guide</link> to learn more and get started!"
28842884
},
28852885
"project.settings.permissions.info-banner.title": {
2886-
"message": "Learn how attributions work"
2886+
"message": "Learn about distribution permissions"
28872887
},
28882888
"project.settings.permissions.learn-more": {
28892889
"message": "Learn more"
28902890
},
28912891
"project.settings.permissions.no-results": {
2892-
"message": "No external projects match your search."
2892+
"message": "No external files match your search."
28932893
},
28942894
"project.settings.permissions.search-placeholder": {
28952895
"message": "Search {count} {count, plural, one {project} other {projects}}..."

apps/frontend/src/pages/[type]/[project]/settings/permissions.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ const messages = defineMessages({
187187
},
188188
infoBannerTitle: {
189189
id: 'project.settings.permissions.info-banner.title',
190-
defaultMessage: 'Learn how attributions work',
190+
defaultMessage: 'Learn about distribution permissions',
191191
},
192192
infoBannerDescription: {
193193
id: 'project.settings.permissions.info-banner.description',
194-
defaultMessage: `If you include content that isn’t hosted on Modrinth, you need to let us know where it’s from and verify that you have permission to distribute the files. Check out <link>our guide</link> to learn about how to do this properly!`,
194+
defaultMessage: `If you include content that isn’t hosted on Modrinth, you need to let us know where it’s from and verify that you have permission to distribute the files. Check out <link>our guide</link> to learn more and get started!`,
195195
},
196196
learnMore: {
197197
id: 'project.settings.permissions.learn-more',
@@ -203,39 +203,40 @@ const messages = defineMessages({
203203
},
204204
emptyStateDescription: {
205205
id: 'project.settings.permissions.empty-state.description',
206-
defaultMessage: `None of your versions contain external content, so you don't need to worry about obtaining permissions.`,
206+
defaultMessage: `None of your project's versions contain external content, so you don't need to worry about obtaining permissions.`,
207207
},
208208
completedTitle: {
209209
id: 'project.settings.permissions.completed.title',
210-
defaultMessage: `Attributions completed!`,
210+
defaultMessage: `Permissions completed!`,
211211
},
212212
completedDescription: {
213213
id: 'project.settings.permissions.completed.description',
214-
defaultMessage: 'All external content has attributions provided.',
214+
defaultMessage:
215+
'All external content has permission information and attributions have been provided.',
215216
},
216217
failTitle: {
217218
id: 'project.settings.permissions.fail.title',
218219
defaultMessage: `Some content can't be included`,
219220
},
220221
failDescription: {
221222
id: 'project.settings.permissions.fail.description',
222-
defaultMessage: `You don't have permission to redistribute some of the external content you've added. In order to publish on Modrinth, remove the infringing content or provide proof that you do have permission to use it.`,
223+
defaultMessage: `You may not have permission to redistribute some of the external content in your project. In order to publish on Modrinth, please remove this content or provide proof that you do have permission to use it.`,
223224
},
224225
attentionNeededTitle: {
225226
id: 'project.settings.permissions.attention-needed.title',
226-
defaultMessage: `Unknown embedded content`,
227+
defaultMessage: `Unknown external content`,
227228
},
228229
attentionNeededDescriptionApproved: {
229230
id: 'project.settings.permissions.attention-needed.description.proj-approved',
230-
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files and any withheld versions will be automatically published.`,
231+
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files. Once completed, withheld versions will be automatically published.`,
231232
},
232233
attentionNeededDescriptionDraft: {
233234
id: 'project.settings.permissions.attention-needed.description.proj-draft',
234-
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files before you can submit your project for review.`,
235+
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files before submitting your project for review.`,
235236
},
236237
noResults: {
237238
id: 'project.settings.permissions.no-results',
238-
defaultMessage: 'No external projects match your search.',
239+
defaultMessage: 'No external files match your search.',
239240
},
240241
})
241242

packages/moderation/src/data/checklist.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { Stage } from '../types/stage'
2-
import modpackPermissionsStage from './modpack-permissions-stage'
32
import categories from './stages/categories'
43
import description from './stages/description'
54
import environment from './stages/environment/environment'
65
import environmentMultiple from './stages/environment/environment-multiple'
76
import gallery from './stages/gallery'
87
import license from './stages/license'
98
import links from './stages/links'
9+
import permissions from './stages/permissions'
1010
import postApproval from './stages/post-approval'
1111
import reupload from './stages/reupload'
1212
import ruleFollowing from './stages/rule-following'
@@ -28,8 +28,8 @@ export default [
2828
gallery,
2929
versions,
3030
reupload,
31+
permissions,
3132
ruleFollowing,
32-
modpackPermissionsStage,
3333
statusAlerts,
3434
undefinedProject,
3535
postApproval,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Proof of Permissions
2+
3+
You may not have the necessary rights or permissions to distribute some of the external content included in your Modpack. </br>
4+
Per section 4 of %RULES%, we ask that you please complete all steps and address all notes left by moderators if any in your project's %PROJECT_PERMISSIONS_FLINK%.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Permissions Incomplete
2+
3+
Per section 4 of %RULES%, we ask that you complete all steps requested in your project's %PROJECT_PERMISSIONS_FLINK%.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Prohibited External Content
2+
3+
Some external content in your mod was found to be prohibited.</br>
4+
This means you cannot include these files in your Modpack on Modrinth, likely because it violates one of %RULES%.
5+
6+
Please view your project's %PROJECT_PERMISSIONS_FLINK% for a list of what content must be removed from your pack before distribution on Modrinth.

packages/moderation/src/data/nags/core.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,33 @@ export const coreNags: Nag[] = [
194194
shouldShow: (context: NagContext) => context.currentRoute !== 'type-project-settings-license',
195195
},
196196
},
197+
{
198+
id: 'review-permissions',
199+
title: defineMessage({
200+
id: 'nags.review-permissions.title',
201+
defaultMessage: 'Review external permissions',
202+
}),
203+
description: (context: NagContext) => {
204+
const { formatMessage } = useVIntl()
205+
return formatMessage(
206+
defineMessage({
207+
id: 'nags.review-permissions.description',
208+
defaultMessage:
209+
'Make sure you have provided proof of your permission to distribute any external content in your Modpack.',
210+
}),
211+
)
212+
},
213+
status: 'required',
214+
shouldShow: (context: NagContext) =>
215+
context.versions.some((version) => (version.files_missing_attribution?.length ?? 0) >= 1),
216+
link: {
217+
path: 'settings/permissions',
218+
title: defineMessage({
219+
id: 'nags.settings.permissions.title',
220+
defaultMessage: 'Visit permissions dashboard',
221+
}),
222+
shouldShow: (context: NagContext) =>
223+
context.currentRoute !== 'type-project-settings-permissions',
224+
},
225+
},
197226
]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { SignatureIcon } from '@modrinth/assets'
2+
3+
import type { Stage } from '../../types/stage'
4+
5+
const permissions: Stage = {
6+
title: 'Does this projects external content have any issues?',
7+
id: 'permissions',
8+
icon: SignatureIcon,
9+
guidance_url: 'https://www.notion.so/2e15ee711bf080e4a41df61bbab49892',
10+
navigate: '/settings/permissions',
11+
actions: [
12+
{
13+
id: 'invalid-permissions',
14+
type: 'button',
15+
label: 'Invalid permissions',
16+
weight: 2000,
17+
suggestedStatus: 'rejected',
18+
severity: 'high',
19+
shouldShow: (project, projectV3) =>
20+
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
21+
message: async () =>
22+
(await import('../messages/externals-permissions/invalid.md?raw')).default,
23+
},
24+
{
25+
id: 'prohibited-extrernal-content',
26+
type: 'button',
27+
label: 'Prohibited externals',
28+
weight: 2001,
29+
suggestedStatus: 'rejected',
30+
severity: 'high',
31+
shouldShow: (project, projectV3) =>
32+
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
33+
message: async () =>
34+
(await import('../messages/externals-permissions/prohibited.md?raw')).default,
35+
},
36+
{
37+
id: 'missing-permissions',
38+
type: 'button',
39+
label: 'Missing permissions',
40+
weight: 2002,
41+
suggestedStatus: 'rejected',
42+
severity: 'high',
43+
shouldShow: (project, projectV3) =>
44+
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
45+
message: async () =>
46+
(await import('../messages/externals-permissions/missing.md?raw')).default,
47+
},
48+
],
49+
}
50+
51+
export default permissions

packages/moderation/src/locales/en-US/index.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@
140140
"nags.multiple-resolution-tags.title": {
141141
"defaultMessage": "Select correct resolution"
142142
},
143+
"nags.review-permissions.description": {
144+
"defaultMessage": "Make sure you have provided proof of your permission to distribute any external content in your Modpack."
145+
},
146+
"nags.review-permissions.title": {
147+
"defaultMessage": "Review external permissions"
148+
},
143149
"nags.select-compatibility.description": {
144150
"defaultMessage": "Select what versions your server supports, choose a Modpack, or upload your own."
145151
},
@@ -182,6 +188,9 @@
182188
"nags.settings.links.title": {
183189
"defaultMessage": "Visit links settings"
184190
},
191+
"nags.settings.permissions.title": {
192+
"defaultMessage": "Visit permissions dashboard"
193+
},
185194
"nags.settings.tags.title": {
186195
"defaultMessage": "Visit tag settings"
187196
},

packages/moderation/src/types/nags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface NagContext {
2828
/**
2929
* The versions associated with the project.
3030
*/
31-
versions: Labrinth.Versions.v2.Version[]
31+
versions: Labrinth.Versions.v3.Version[]
3232
/**
3333
* The current project member viewing the nag.
3434
*/

0 commit comments

Comments
 (0)