Skip to content

Commit d95f0c3

Browse files
authored
FIX: Require login for AI bot conversations page (#36669)
Unauthenticated users visiting `/discourse-ai/ai-bot/conversations` saw a blank page. This adds a route file that checks for `currentUser` and shows the login modal if not logged in, following the same pattern used by `new-topic`, `new-message`, and other authenticated routes.
1 parent b39afff commit d95f0c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { service } from "@ember/service";
2+
import DiscourseRoute from "discourse/routes/discourse";
3+
4+
export default class DiscourseAiBotConversationsRoute extends DiscourseRoute {
5+
@service currentUser;
6+
7+
beforeModel(transition) {
8+
if (!this.currentUser) {
9+
transition.send("showLogin");
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)