Logout menu item is missing when the site only sets logoutUrl

オープン 初心者向け
#357 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

shell/header/app.tsxから始め、Logoutメニュー項目とshell/header/anonymous-menu/LoginButton.tsxのログイン時のフォールバックを比較します。LinkMenuItem.tsxでは、ルートのロールがない場合に何が起こるかを確認できます。issueで説明されているlogoutUrlのフォールバックを追加し、ロールがある場合は引き続きLogoutがそのロールを使い、logoutUrlのみが設定されている場合は表示されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Description

The Logout item in the user menu resolves only through the org.openedx.frontend.role.logout route role. If nothing provides that role, LinkMenuItem renders nothing.

In other words: a site that sets logoutUrl in its site.config, but doesn't also declare an external route for the role, gets a user menu with no way to log out. The template site and tutor-mfe both declare the route, so stock sites are fine. It's a trap for everybody else.

The Login button already does the right thing: it prefers the role and falls back to loginUrl. Logout should fall back to logoutUrl the same way.

主要言語
TypeScript
スター
4
フォーク
13
平均マージ
3日 5時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openedx/frontend-base のほかの issue

openedx/frontend-base の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。