Logout menu item is missing when the site only sets logoutUrl

未关闭 适合新手
#357 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 时 Logout 会显示。

由索引模型根据 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 小时
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openedx/frontend-base 的其他 Issue

查看 openedx/frontend-base 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。