mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 21:26:40 +00:00
Moderation Fix: Handle more license cases (#6590)
Apply correct behavior in edge cases
This commit is contained in:
@@ -192,7 +192,10 @@ export const coreNags: Nag[] = [
|
||||
},
|
||||
status: 'required',
|
||||
shouldShow: (context: NagContext) =>
|
||||
context.project.license.id === 'LicenseRef-Unknown' && !context.projectV3?.minecraft_server,
|
||||
(context.project.license.id === 'LicenseRef-Unknown' ||
|
||||
context.project.license.id === 'NOASSERTION' ||
|
||||
context.project.license.id === 'LicenseRef-NOASSERTION') &&
|
||||
!context.projectV3?.minecraft_server,
|
||||
link: {
|
||||
path: 'settings/license',
|
||||
title: defineMessage({
|
||||
@@ -222,10 +225,12 @@ export const coreNags: Nag[] = [
|
||||
},
|
||||
status: 'required',
|
||||
shouldShow: (context: NagContext) =>
|
||||
context.project.license.id === 'LicenseRef-' ||
|
||||
((!context.project.license.url || context.project.license.url === '') &&
|
||||
!context.projectV3?.minecraft_server &&
|
||||
context.project.license.id !== 'LicenseRef-Unknown'),
|
||||
!context.projectV3?.minecraft_server &&
|
||||
(context.project.license.id === 'LicenseRef-' ||
|
||||
(context.project.license.id.search('LicenseRef-') === 0 &&
|
||||
(!context.project.license.url || context.project.license.url === '') &&
|
||||
context.project.license.id !== 'LicenseRef-Unknown' &&
|
||||
context.project.license.id !== 'LicenseRef-All-Rights-Reserved')),
|
||||
link: {
|
||||
path: 'settings/license',
|
||||
title: defineMessage({
|
||||
|
||||
Reference in New Issue
Block a user