Skip to content

Commit

Permalink
feat: improve isAllowedInDemoMode()
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Jan 17, 2024
1 parent ba9d6e5 commit 0f6b798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion authz/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/src/locales/zh/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
"Non-LDAP": "禁用LDAP",
"None": "",
"OAuth providers": "OAuth提供方",
"OK": "OK",
"OK": "确定",
"Organization": "组织",
"Organization - Tooltip": "类似于租户、用户池等概念,每个用户和应用都从属于一个组织",
"Organizations": "组织",
Expand Down

0 comments on commit 0f6b798

Please sign in to comment.