Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: admin guard render 403

shuaiaf7307d704d5
diff --git a/ui/src/utils/guard.ts b/ui/src/utils/guard.ts
index 280df4df..7c852986 100644
--- a/ui/src/utils/guard.ts
+++ b/ui/src/utils/guard.ts
@@ -174,7 +174,7 @@ export const admin = () => {
const us = deriveLoginState();
if (gr.ok && !us.isAdmin) {
gr.ok = false;
- gr.redirect = RouteAlias.home;
+ gr.redirect = '';
}
return gr;
};