From 0f6b7984d4e0a5d893450ae050d847e90ba13eb4 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 17 Jan 2024 13:07:44 +0800 Subject: [PATCH] feat: improve isAllowedInDemoMode() --- authz/authz.go | 2 +- web/src/locales/zh/data.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authz/authz.go b/authz/authz.go index b52c13bd..c437954c 100644 --- a/authz/authz.go +++ b/authz/authz.go @@ -150,7 +150,7 @@ func IsAllowed(subOwner string, subName string, method string, urlPath string, o func isAllowedInDemoMode(subOwner string, subName string, method string, urlPath string, objOwner string, objName string) bool { if method == "POST" { - if strings.HasPrefix(urlPath, "/api/login") || urlPath == "/api/logout" || urlPath == "/api/signup" || urlPath == "/api/callback" || urlPath == "/api/send-verification-code" || urlPath == "/api/send-email" || urlPath == "/api/verify-captcha" || urlPath == "/api/check-user-password" || strings.HasPrefix(urlPath, "/api/mfa/") { + if strings.HasPrefix(urlPath, "/api/login") || urlPath == "/api/logout" || urlPath == "/api/signup" || urlPath == "/api/callback" || urlPath == "/api/send-verification-code" || urlPath == "/api/send-email" || urlPath == "/api/verify-captcha" || urlPath == "/api/verify-code" || urlPath == "/api/check-user-password" || strings.HasPrefix(urlPath, "/api/mfa/") { return true } else if urlPath == "/api/update-user" { // Allow ordinary users to update their own information diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index ebe63673..dc24ec27 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -271,7 +271,7 @@ "Non-LDAP": "禁用LDAP", "None": "无", "OAuth providers": "OAuth提供方", - "OK": "OK", + "OK": "确定", "Organization": "组织", "Organization - Tooltip": "类似于租户、用户池等概念,每个用户和应用都从属于一个组织", "Organizations": "组织",