From 60c440ae102994e7f7e912863a3011a6a4d7d797 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 24 Sep 2023 23:46:28 +0800 Subject: [PATCH] chore: fix check enable signup --- api/v2/acl_config.go | 1 + frontend/web/src/pages/SignIn.tsx | 2 +- frontend/web/src/pages/SignUp.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/v2/acl_config.go b/api/v2/acl_config.go index 4c0d210..6cc7fff 100644 --- a/api/v2/acl_config.go +++ b/api/v2/acl_config.go @@ -4,6 +4,7 @@ import "strings" var allowedMethodsWhenUnauthorized = map[string]bool{ "/slash.api.v2.WorkspaceService/GetWorkspaceProfile": true, + "/slash.api.v2.WorkspaceService/GetWorkspaceSetting": true, } // isUnauthorizeAllowedMethod returns true if the method is allowed to be called when the user is not authorized. diff --git a/frontend/web/src/pages/SignIn.tsx b/frontend/web/src/pages/SignIn.tsx index ebed857..6df83ce 100644 --- a/frontend/web/src/pages/SignIn.tsx +++ b/frontend/web/src/pages/SignIn.tsx @@ -104,7 +104,7 @@ const SignIn: React.FC = () => { - {workspaceStore.setting.enableSignup && ( + {workspaceStore.profile.enableSignup && (

{"Don't have an account yet?"} diff --git a/frontend/web/src/pages/SignUp.tsx b/frontend/web/src/pages/SignUp.tsx index cefedc0..2035361 100644 --- a/frontend/web/src/pages/SignUp.tsx +++ b/frontend/web/src/pages/SignUp.tsx @@ -27,7 +27,7 @@ const SignUp: React.FC = () => { }); } - if (!workspaceStore.setting.enableSignup) { + if (!workspaceStore.profile.enableSignup) { return navigateTo("/auth", { replace: true, });