Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ロールにNSFWを強制的につけるオプションを追加 #10731

Merged
merged 9 commits into from
May 5, 2023

Conversation

nenohi
Copy link
Contributor

@nenohi nenohi commented Apr 28, 2023

What

ロールにてNSFWを強制的に付与するオプションの追加(Policy

Why

運営からの警告を無視してNSFWの投稿を行うユーザーが見られるため
ロールによって付与する

Additional info (optional)

ローカルにてテスト済み
・ファイルアップロード時にNSFWの付与
・NSFWが外せないように

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR labels Apr 28, 2023
@nenohi
Copy link
Contributor Author

nenohi commented Apr 28, 2023

外そうとしたときにAPIエラーを出したいのでDraftで(メモ

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #10731 (1900338) into develop (58c3fc6) will increase coverage by 0.02%.
The diff coverage is 96.96%.

@@             Coverage Diff             @@
##           develop   #10731      +/-   ##
===========================================
+ Coverage    77.37%   77.39%   +0.02%     
===========================================
  Files          899      899              
  Lines        89419    89447      +28     
  Branches      6534     6545      +11     
===========================================
+ Hits         69184    69224      +40     
+ Misses       20235    20223      -12     
Impacted Files Coverage Δ
packages/backend/src/core/DriveService.ts 60.05% <85.71%> (+0.17%) ⬆️
packages/backend/src/core/RoleService.ts 74.24% <100.00%> (+1.58%) ⬆️
...ckend/src/core/activitypub/models/ApNoteService.ts 55.77% <100.00%> (ø)
...end/src/server/api/endpoints/drive/files/update.ts 98.56% <100.00%> (+0.09%) ⬆️
...kages/backend/src/server/api/endpoints/i/update.ts 95.38% <100.00%> (+0.10%) ⬆️
packages/frontend/src/const.ts 97.50% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

@nenohi nenohi marked this pull request as ready for review April 29, 2023 19:08
@github-actions github-actions bot requested review from syuilo and tamaina April 29, 2023 19:09
iconUrl: null,
displayOrder: 0,
target: 'manual',
condFormula: {
Copy link
Member

Choose a reason for hiding this comment

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

targetがmanualなら要らなそう

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ロールの確認としてテスト記載したけど不要であれば削除します

Copy link
Member

Choose a reason for hiding this comment

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

いやテストは要るけどcondFormulaの指定は不要じゃない?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

えっと。。。
image

Copy link
Member

Choose a reason for hiding this comment

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

空じゃダメかしら

Copy link
Contributor Author

Choose a reason for hiding this comment

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

空で行けたので修正しました!

@syuilo syuilo merged commit 2d84e04 into misskey-dev:develop May 5, 2023
@syuilo
Copy link
Member

syuilo commented May 5, 2023

👍

sasagar pushed a commit to sasagar/misskey that referenced this pull request May 9, 2023
* ロールにNSFWを強制的につけるオプションを追加

* すでにあるファイルにNSFWが付与できない

* NSFWを付与しようとするとエラーに

* add test

* Update packages/backend/src/core/RoleService.ts

Co-authored-by: syuilo <[email protected]>

* spacingで怒られたので

* ロール作成時のプロパティ削除

---------

Co-authored-by: syuilo <[email protected]>
na2na-p pushed a commit to na2na-p/misskey that referenced this pull request May 10, 2023
* ロールにNSFWを強制的につけるオプションを追加

* すでにあるファイルにNSFWが付与できない

* NSFWを付与しようとするとエラーに

* add test

* Update packages/backend/src/core/RoleService.ts

Co-authored-by: syuilo <[email protected]>

* spacingで怒られたので

* ロール作成時のプロパティ削除

---------

Co-authored-by: syuilo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants