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

fix(frontend): コントロールパネルにおいて、管理者しか操作できないメニュー項目をモデレーターに表示しないように #13708

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

camilla-ett
Copy link
Contributor

@camilla-ett camilla-ett commented Apr 13, 2024

What

Fix of #13707

Why

リンク先のissueの通りです。
コントロールパネルにおいて、管理者しか操作できないメニュー項目をモデレーターに表示しないようにします。

既に、管理者しか操作できない項目については、画面遷移先でもエラーになるようになっていますが。そもそもメニューにも出させないようにします。

Additional info (optional)

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 the packages/frontend Client side specific issue/PR label Apr 13, 2024
Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.99%. Comparing base (5c7c44c) to head (b75bb11).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #13708       +/-   ##
============================================
+ Coverage    64.93%   77.99%   +13.06%     
============================================
  Files          985      185      -800     
  Lines       111598    25454    -86144     
  Branches      4437      486     -3951     
============================================
- Hits         72465    19853    -52612     
+ Misses       39101     5594    -33507     
+ Partials        32        7       -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -223,7 +224,8 @@ const menuDef = computed(() => [{
to: '/admin/database',
active: currentPage.value?.route.name === 'database',
}],
}]);
// filter out when moderator operating
}].filter(menu => iAmAdmin || (iAmModerator && (menu.title !== i18n.ts.info && menu.title !== i18n.ts.settings))));
Copy link
Member

Choose a reason for hiding this comment

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

タイトルでの比較はなんかバグ生みそう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
2 participants