Skip to content
Open
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
20 changes: 10 additions & 10 deletions apps/frontend/src/locales/en-US/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2853,43 +2853,43 @@
"message": "URL"
},
"project.settings.permissions.attention-needed.description.proj-approved": {
"message": "Please provide proof that you have permission to redistribute all of the following files and any withheld versions will be automatically published."
"message": "Please provide proof that you have permission to redistribute all of the following files. Once completed, withheld versions will be automatically published."
},
"project.settings.permissions.attention-needed.description.proj-draft": {
"message": "Please provide proof that you have permission to redistribute all of the following files before you can submit your project for review."
"message": "Please provide proof that you have permission to redistribute all of the following files before submitting your project for review."
},
"project.settings.permissions.attention-needed.title": {
"message": "Unknown embedded content"
"message": "Unknown external content"
},
"project.settings.permissions.completed.description": {
"message": "All external content has attributions provided."
"message": "All external content has permission information and attributions have been provided."
},
"project.settings.permissions.completed.title": {
"message": "Attributions completed!"
"message": "Permissions completed!"
},
"project.settings.permissions.empty-state.description": {
"message": "None of your versions contain external content, so you don't need to worry about obtaining permissions."
"message": "None of your project's versions contain external content, so you don't need to worry about obtaining permissions."
},
"project.settings.permissions.empty-state.heading": {
"message": "You're all set!"
},
"project.settings.permissions.fail.description": {
"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."
"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."
},
"project.settings.permissions.fail.title": {
"message": "Some content can't be included"
},
"project.settings.permissions.info-banner.description": {
"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!"
"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!"
},
"project.settings.permissions.info-banner.title": {
"message": "Learn how attributions work"
"message": "Learn about distribution permissions"
},
"project.settings.permissions.learn-more": {
"message": "Learn more"
},
"project.settings.permissions.no-results": {
"message": "No external projects match your search."
"message": "No external files match your search."
},
"project.settings.permissions.search-placeholder": {
"message": "Search {count} {count, plural, one {project} other {projects}}..."
Expand Down
21 changes: 11 additions & 10 deletions apps/frontend/src/pages/[type]/[project]/settings/permissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ const messages = defineMessages({
},
infoBannerTitle: {
id: 'project.settings.permissions.info-banner.title',
defaultMessage: 'Learn how attributions work',
defaultMessage: 'Learn about distribution permissions',
},
infoBannerDescription: {
id: 'project.settings.permissions.info-banner.description',
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!`,
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!`,
},
learnMore: {
id: 'project.settings.permissions.learn-more',
Expand All @@ -203,39 +203,40 @@ const messages = defineMessages({
},
emptyStateDescription: {
id: 'project.settings.permissions.empty-state.description',
defaultMessage: `None of your versions contain external content, so you don't need to worry about obtaining permissions.`,
defaultMessage: `None of your project's versions contain external content, so you don't need to worry about obtaining permissions.`,
},
completedTitle: {
id: 'project.settings.permissions.completed.title',
defaultMessage: `Attributions completed!`,
defaultMessage: `Permissions completed!`,
},
completedDescription: {
id: 'project.settings.permissions.completed.description',
defaultMessage: 'All external content has attributions provided.',
defaultMessage:
'All external content has permission information and attributions have been provided.',
},
failTitle: {
id: 'project.settings.permissions.fail.title',
defaultMessage: `Some content can't be included`,
},
failDescription: {
id: 'project.settings.permissions.fail.description',
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.`,
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.`,
},
attentionNeededTitle: {
id: 'project.settings.permissions.attention-needed.title',
defaultMessage: `Unknown embedded content`,
defaultMessage: `Unknown external content`,
},
attentionNeededDescriptionApproved: {
id: 'project.settings.permissions.attention-needed.description.proj-approved',
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files and any withheld versions will be automatically published.`,
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files. Once completed, withheld versions will be automatically published.`,
},
attentionNeededDescriptionDraft: {
id: 'project.settings.permissions.attention-needed.description.proj-draft',
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files before you can submit your project for review.`,
defaultMessage: `Please provide proof that you have permission to redistribute all of the following files before submitting your project for review.`,
},
noResults: {
id: 'project.settings.permissions.no-results',
defaultMessage: 'No external projects match your search.',
defaultMessage: 'No external files match your search.',
},
})

Expand Down
4 changes: 2 additions & 2 deletions packages/moderation/src/data/checklist.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Stage } from '../types/stage'
import modpackPermissionsStage from './modpack-permissions-stage'
import categories from './stages/categories'
import description from './stages/description'
import environment from './stages/environment/environment'
import environmentMultiple from './stages/environment/environment-multiple'
import gallery from './stages/gallery'
import license from './stages/license'
import links from './stages/links'
import permissions from './stages/permissions'
import postApproval from './stages/post-approval'
import reupload from './stages/reupload'
import ruleFollowing from './stages/rule-following'
Expand All @@ -28,8 +28,8 @@ export default [
gallery,
versions,
reupload,
permissions,
ruleFollowing,
modpackPermissionsStage,
statusAlerts,
undefinedProject,
postApproval,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Proof of Permissions

You may not have the necessary rights or permissions to distribute some of the external content included in your Modpack. </br>
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%.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Permissions Incomplete

Per section 4 of %RULES%, we ask that you complete all steps requested in your project's %PROJECT_PERMISSIONS_FLINK%.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Prohibited External Content

Some external content in your mod was found to be prohibited.</br>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

external content in your mod?

This means you cannot include these files in your Modpack on Modrinth, likely because it violates one of %RULES%.

Please view your project's %PROJECT_PERMISSIONS_FLINK% for a list of what content must be removed from your pack before distribution on Modrinth.
29 changes: 29 additions & 0 deletions packages/moderation/src/data/nags/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,33 @@ export const coreNags: Nag[] = [
shouldShow: (context: NagContext) => context.currentRoute !== 'type-project-settings-license',
},
},
{
id: 'review-permissions',
title: defineMessage({
id: 'nags.review-permissions.title',
defaultMessage: 'Review external permissions',
}),
description: (context: NagContext) => {
const { formatMessage } = useVIntl()
return formatMessage(
defineMessage({
id: 'nags.review-permissions.description',
defaultMessage:
'Make sure you have provided proof of your permission to distribute any external content in your Modpack.',
}),
)
},
status: 'required',
shouldShow: (context: NagContext) =>
context.versions.some((version) => (version.files_missing_attribution?.length ?? 0) >= 1),
link: {
path: 'settings/permissions',
title: defineMessage({
id: 'nags.settings.permissions.title',
defaultMessage: 'Visit permissions dashboard',
}),
shouldShow: (context: NagContext) =>
context.currentRoute !== 'type-project-settings-permissions',
},
},
]
51 changes: 51 additions & 0 deletions packages/moderation/src/data/stages/permissions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { SignatureIcon } from '@modrinth/assets'

import type { Stage } from '../../types/stage'

const permissions: Stage = {
title: 'Does this projects external content have any issues?',
id: 'permissions',
icon: SignatureIcon,
guidance_url: 'https://www.notion.so/2e15ee711bf080e4a41df61bbab49892',
navigate: '/settings/permissions',
actions: [
{
id: 'invalid-permissions',
type: 'button',
label: 'Invalid permissions',
weight: 2000,
suggestedStatus: 'rejected',
severity: 'high',
shouldShow: (project, projectV3) =>
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
message: async () =>
(await import('../messages/externals-permissions/invalid.md?raw')).default,
},
{
id: 'prohibited-extrernal-content',
type: 'button',
label: 'Prohibited externals',
weight: 2001,
suggestedStatus: 'rejected',
severity: 'high',
shouldShow: (project, projectV3) =>
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
message: async () =>
(await import('../messages/externals-permissions/prohibited.md?raw')).default,
},
{
id: 'missing-permissions',
type: 'button',
label: 'Missing permissions',
weight: 2002,
suggestedStatus: 'rejected',
severity: 'high',
shouldShow: (project, projectV3) =>
projectV3.project_types?.includes('modpack') && !projectV3?.minecraft_server,
message: async () =>
(await import('../messages/externals-permissions/missing.md?raw')).default,
},
],
}

export default permissions
9 changes: 9 additions & 0 deletions packages/moderation/src/locales/en-US/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@
"nags.multiple-resolution-tags.title": {
"defaultMessage": "Select correct resolution"
},
"nags.review-permissions.description": {
"defaultMessage": "Make sure you have provided proof of your permission to distribute any external content in your Modpack."
},
"nags.review-permissions.title": {
"defaultMessage": "Review external permissions"
},
"nags.select-compatibility.description": {
"defaultMessage": "Select what versions your server supports, choose a Modpack, or upload your own."
},
Expand Down Expand Up @@ -182,6 +188,9 @@
"nags.settings.links.title": {
"defaultMessage": "Visit links settings"
},
"nags.settings.permissions.title": {
"defaultMessage": "Visit permissions dashboard"
},
"nags.settings.tags.title": {
"defaultMessage": "Visit tag settings"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/moderation/src/types/nags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface NagContext {
/**
* The versions associated with the project.
*/
versions: Labrinth.Versions.v2.Version[]
versions: Labrinth.Versions.v3.Version[]
/**
* The current project member viewing the nag.
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/moderation/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ export function flattenProjectVariables(
vars[`PROJECT_LANGUAGE_SETTINGS`] = `https://modrinth.com/project/${project.id}/settings/server`
vars[`PROJECT_LANGUAGE_SETTINGS_FLINK`] =
`[Language Settings](https://modrinth.com/project/${project.id}/settings/server)`
vars[`PROJECT_PERMISSIONS_LINK`] =
`https://modrinth.com/project/${project.id}/settings/permissions`
vars[`PROJECT_PERMISSIONS_FLINK`] =
`[Permissions dashboard](https://modrinth.com/project/${project.id}/settings/permissions)`

return vars
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
EditIcon,
FileIcon,
PlusIcon,
ReportIcon,
ScaleIcon,
SpinnerIcon,
VersionIcon,
XCircleIcon,
ReportIcon,
XIcon,
} from '@modrinth/assets'
import { useMutation, useQueryClient } from '@tanstack/vue-query'
Expand All @@ -25,6 +25,7 @@ import {
injectNotificationManager,
injectProjectPageContext,
} from '../../providers'
import StyledInput from '../base/StyledInput.vue'
import AddFilesToAttributionGroupModal from './AddFilesToAttributionGroupModal.vue'
import AddToExistingExternalProjectModal from './AddToExistingExternalProjectModal.vue'
import AddToGlobalPermissionsDatabaseModal from './AddToGlobalPermissionsDatabaseModal.vue'
Expand All @@ -39,7 +40,6 @@ import {
parseInitialAttribution,
} from './external-project-utils'
import OriginalPageLink from './OriginalPageLink.vue'
import StyledInput from '../base/StyledInput.vue'

const props = withDefaults(
defineProps<{
Expand Down
30 changes: 15 additions & 15 deletions packages/ui/src/locales/en-US/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,18 @@
"external-files.permissions-card.link-to-work-url-placeholder": {
"defaultMessage": "link-to-work"
},
"external-files.permissions-card.moderation.approved": {
"defaultMessage": "Seems legit"
},
"external-files.permissions-card.moderation.bad-proof": {
"defaultMessage": "Insufficient proof"
},
"external-files.permissions-card.moderation.error.title": {
"defaultMessage": "Could not save moderation review"
},
"external-files.permissions-card.moderation.not-allowed": {
"defaultMessage": "Breaks rules"
},
"external-files.permissions-card.not-used-in-versions": {
"defaultMessage": "These files are not currently used by any version."
},
Expand Down Expand Up @@ -989,6 +1001,9 @@
"external-files.permissions-card.reason.special-permission.description": {
"defaultMessage": "You have obtained special permission to redistribute this work in your modpack."
},
"external-files.permissions-card.review-explanation-placeholder": {
"defaultMessage": "Explanation of review"
},
"external-files.permissions-card.save": {
"defaultMessage": "Save attribution"
},
Expand All @@ -1004,21 +1019,6 @@
"external-files.permissions-card.type-label": {
"defaultMessage": "Permission reason"
},
"external-files.permissions-card.moderation.approved": {
"defaultMessage": "Seems legit"
},
"external-files.permissions-card.moderation.bad-proof": {
"defaultMessage": "Insufficient proof"
},
"external-files.permissions-card.moderation.error.title": {
"defaultMessage": "Could not save moderation review"
},
"external-files.permissions-card.moderation.not-allowed": {
"defaultMessage": "Breaks rules"
},
"external-files.permissions-card.review-explanation-placeholder": {
"defaultMessage": "Explanation of review"
},
"external-files.permissions-card.unnamed-multi-group-title": {
"defaultMessage": "{filename} + {count} more"
},
Expand Down
Loading