mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-22 12:53:50 +08:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
3b6ec3e7c4 | |||
910816c7a3 | |||
412a8b5da7 | |||
8ebd16a14e | |||
44ec854465 | |||
26e87b0d98 | |||
7e0ea0b8d9 | |||
ace8e9da06 | |||
aac8714d72 | |||
e71e41b343 | |||
6131286cbd | |||
3bda8fb9dc | |||
11f55a474c | |||
4806e76cf6 | |||
edbd3d4018 | |||
3f0a741e6c | |||
d273fdd670 | |||
3ae81716b9 | |||
3a70f4e788 | |||
842d4865b2 | |||
19fb7273bb | |||
943bd82731 |
@ -20,5 +20,5 @@ staticBaseUrl = "https://cdn.casbin.org"
|
||||
isDemoMode = false
|
||||
batchSize = 100
|
||||
ldapServerPort = 389
|
||||
languages = en,zh,es,fr,de,ja,ko,ru
|
||||
languages = en,zh,es,fr,de,ja,ko,ru,vi
|
||||
quota = {"organization": -1, "user": -1, "application": -1, "provider": -1}
|
||||
|
17
conf/conf.go
17
conf/conf.go
@ -105,6 +105,23 @@ func GetConfigDataSourceName() string {
|
||||
return dataSourceName
|
||||
}
|
||||
|
||||
func GetLanguage(language string) string {
|
||||
if language == "" || language == "*" {
|
||||
return "en"
|
||||
}
|
||||
|
||||
if len(language) < 2 {
|
||||
return "en"
|
||||
}
|
||||
|
||||
language = language[0:2]
|
||||
if strings.Contains(GetConfigString("languages"), language) {
|
||||
return language
|
||||
} else {
|
||||
return "en"
|
||||
}
|
||||
}
|
||||
|
||||
func IsDemoMode() bool {
|
||||
return strings.ToLower(GetConfigString("isDemoMode")) == "true"
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ func (c *ApiController) GetLdapUser() {
|
||||
// GetLdaps
|
||||
// @Tag Account API
|
||||
// @Title GetLdaps
|
||||
// @router /get-ldaps [post]
|
||||
// @router /get-ldaps [get]
|
||||
func (c *ApiController) GetLdaps() {
|
||||
owner := c.Input().Get("owner")
|
||||
|
||||
@ -115,7 +115,7 @@ func (c *ApiController) GetLdaps() {
|
||||
// GetLdap
|
||||
// @Tag Account API
|
||||
// @Title GetLdap
|
||||
// @router /get-ldap [post]
|
||||
// @router /get-ldap [get]
|
||||
func (c *ApiController) GetLdap() {
|
||||
id := c.Input().Get("id")
|
||||
|
||||
|
@ -17,7 +17,6 @@ package controllers
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/casdoor/casdoor/conf"
|
||||
"github.com/casdoor/casdoor/i18n"
|
||||
@ -56,11 +55,8 @@ func (c *ApiController) T(error string) string {
|
||||
|
||||
// GetAcceptLanguage ...
|
||||
func (c *ApiController) GetAcceptLanguage() string {
|
||||
lang := c.Ctx.Request.Header.Get("Accept-Language")
|
||||
if lang == "" || !strings.Contains(conf.GetConfigString("languages"), lang[0:2]) {
|
||||
lang = "en"
|
||||
}
|
||||
return lang[0:2]
|
||||
language := c.Ctx.Request.Header.Get("Accept-Language")
|
||||
return conf.GetLanguage(language)
|
||||
}
|
||||
|
||||
// SetTokenErrorHttpStatus ...
|
||||
|
@ -70,15 +70,17 @@ func (c *ApiController) SendVerificationCode() {
|
||||
c.ResponseError(c.T("general:Missing parameter") + ": checkType.")
|
||||
return
|
||||
}
|
||||
if checkKey == "" {
|
||||
c.ResponseError(c.T("general:Missing parameter") + ": checkKey.")
|
||||
return
|
||||
}
|
||||
if !strings.Contains(applicationId, "/") {
|
||||
c.ResponseError(c.T("verification:Wrong parameter") + ": applicationId.")
|
||||
return
|
||||
}
|
||||
|
||||
if checkType != "none" {
|
||||
if checkKey == "" {
|
||||
c.ResponseError(c.T("general:Missing parameter") + ": checkKey.")
|
||||
return
|
||||
}
|
||||
|
||||
if captchaProvider := captcha.GetCaptchaProvider(checkType); captchaProvider == nil {
|
||||
c.ResponseError(c.T("general:don't support captchaProvider: ") + checkType)
|
||||
return
|
||||
@ -89,6 +91,7 @@ func (c *ApiController) SendVerificationCode() {
|
||||
c.ResponseError(c.T("verification:Turing test failed."))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
application := object.GetApplication(applicationId)
|
||||
organization := object.GetOrganization(util.GetId(application.Owner, application.Organization))
|
||||
@ -185,7 +188,7 @@ func (c *ApiController) ResetEmailOrPhone() {
|
||||
checkDest := dest
|
||||
organization := object.GetOrganizationByUser(user)
|
||||
if destType == "phone" {
|
||||
if object.HasUserByField(user.Owner, "phone", user.Phone) {
|
||||
if object.HasUserByField(user.Owner, "phone", dest) {
|
||||
c.ResponseError(c.T("check:Phone already exists"))
|
||||
return
|
||||
}
|
||||
@ -205,7 +208,7 @@ func (c *ApiController) ResetEmailOrPhone() {
|
||||
return
|
||||
}
|
||||
} else if destType == "email" {
|
||||
if object.HasUserByField(user.Owner, "email", user.Email) {
|
||||
if object.HasUserByField(user.Owner, "email", dest) {
|
||||
c.ResponseError(c.T("check:Email already exists"))
|
||||
return
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -9,7 +9,7 @@ require (
|
||||
github.com/beego/beego v1.12.11
|
||||
github.com/beevik/etree v1.1.0
|
||||
github.com/casbin/casbin/v2 v2.30.1
|
||||
github.com/casdoor/go-sms-sender v0.5.1
|
||||
github.com/casdoor/go-sms-sender v0.5.2
|
||||
github.com/casdoor/gomail/v2 v2.0.1
|
||||
github.com/casdoor/oss v1.2.0
|
||||
github.com/casdoor/xorm-adapter/v3 v3.0.4
|
||||
|
4
go.sum
4
go.sum
@ -94,8 +94,8 @@ github.com/casbin/casbin/v2 v2.1.0/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n
|
||||
github.com/casbin/casbin/v2 v2.28.3/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
|
||||
github.com/casbin/casbin/v2 v2.30.1 h1:P5HWadDL7olwUXNdcuKUBk+x75Y2eitFxYTcLNKeKF0=
|
||||
github.com/casbin/casbin/v2 v2.30.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
|
||||
github.com/casdoor/go-sms-sender v0.5.1 h1:1/Wp1OLkVAVY4lEGQhekSNetSAWhnPcxYPV7xpCZgC0=
|
||||
github.com/casdoor/go-sms-sender v0.5.1/go.mod h1:kBykbqwgRDXbXdMAIxmZKinVM1WjdqEbej5LAbUbcfI=
|
||||
github.com/casdoor/go-sms-sender v0.5.2 h1:LRjqoXBAOsH4yxXeJ7kINMesyoyEx5pEoiJz9d7lGJA=
|
||||
github.com/casdoor/go-sms-sender v0.5.2/go.mod h1:kBykbqwgRDXbXdMAIxmZKinVM1WjdqEbej5LAbUbcfI=
|
||||
github.com/casdoor/gomail/v2 v2.0.1 h1:J+FG6x80s9e5lBHUn8Sv0Y56mud34KiWih5YdmudR/w=
|
||||
github.com/casdoor/gomail/v2 v2.0.1/go.mod h1:VnGPslEAtpix5FjHisR/WKB1qvZDBaujbikxDe9d+2Q=
|
||||
github.com/casdoor/oss v1.2.0 h1:ozLAE+nnNdFQBWbzH8U9spzaO8h8NrB57lBcdyMUUQ8=
|
||||
|
@ -30,24 +30,26 @@ func TestGenerateI18nFrontend(t *testing.T) {
|
||||
enData := parseEnData("frontend")
|
||||
writeI18nFile("frontend", "en", enData)
|
||||
|
||||
applyToOtherLanguage("frontend", "de", enData)
|
||||
applyToOtherLanguage("frontend", "zh", enData)
|
||||
applyToOtherLanguage("frontend", "es", enData)
|
||||
applyToOtherLanguage("frontend", "fr", enData)
|
||||
applyToOtherLanguage("frontend", "de", enData)
|
||||
applyToOtherLanguage("frontend", "ja", enData)
|
||||
applyToOtherLanguage("frontend", "ko", enData)
|
||||
applyToOtherLanguage("frontend", "ru", enData)
|
||||
applyToOtherLanguage("frontend", "zh", enData)
|
||||
applyToOtherLanguage("frontend", "vi", enData)
|
||||
}
|
||||
|
||||
func TestGenerateI18nBackend(t *testing.T) {
|
||||
enData := parseEnData("backend")
|
||||
writeI18nFile("backend", "en", enData)
|
||||
|
||||
applyToOtherLanguage("backend", "de", enData)
|
||||
applyToOtherLanguage("backend", "zh", enData)
|
||||
applyToOtherLanguage("backend", "es", enData)
|
||||
applyToOtherLanguage("backend", "fr", enData)
|
||||
applyToOtherLanguage("backend", "de", enData)
|
||||
applyToOtherLanguage("backend", "ja", enData)
|
||||
applyToOtherLanguage("backend", "ko", enData)
|
||||
applyToOtherLanguage("backend", "ru", enData)
|
||||
applyToOtherLanguage("backend", "zh", enData)
|
||||
applyToOtherLanguage("backend", "vi", enData)
|
||||
}
|
||||
|
@ -54,7 +54,7 @@
|
||||
"Username cannot contain white spaces": "Username cannot contain white spaces",
|
||||
"Username cannot start with a digit": "Username cannot start with a digit",
|
||||
"Username is too long (maximum is 39 characters).": "Username is too long (maximum is 39 characters).",
|
||||
"Username must have at least 2 characters": "Username must have at least 2 characters",
|
||||
"Username must have at least 2 characters": "Benutzername muss mindestens 2 Zeichen lang sein",
|
||||
"You have entered the wrong password or code too many times, please wait for %d minutes and try again": "You have entered the wrong password or code too many times, please wait for %d minutes and try again",
|
||||
"Your region is not allow to signup by phone": "Your region is not allow to signup by phone",
|
||||
"password or code is incorrect, you have %d remaining chances": "password or code is incorrect, you have %d remaining chances",
|
||||
|
147
i18n/locales/vi/data.json
Normal file
147
i18n/locales/vi/data.json
Normal file
@ -0,0 +1,147 @@
|
||||
{
|
||||
"account": {
|
||||
"Email: %s": "Email: %s",
|
||||
"Get init score failed, error: %w": "Get init score failed, error: %w",
|
||||
"Invalid information": "Invalid information",
|
||||
"Phone: %s": "Phone: %s",
|
||||
"Please sign out first before signing in": "Please sign out first before signing in",
|
||||
"Please sign out first before signing up": "Please sign out first before signing up",
|
||||
"The application does not allow to sign up new account": "The application does not allow to sign up new account"
|
||||
},
|
||||
"auth": {
|
||||
"Challenge method should be S256": "Challenge method should be S256",
|
||||
"Failed to create user, user information is invalid: %s": "Failed to create user, user information is invalid: %s",
|
||||
"Failed to login in: %s": "Failed to login in: %s",
|
||||
"Invalid token": "Invalid token",
|
||||
"State expected: %s, but got: %s": "State expected: %s, but got: %s",
|
||||
"The account for provider: %s and username: %s (%s) does not exist and is not allowed to sign up as new account via %%s, please use another way to sign up": "The account for provider: %s and username: %s (%s) does not exist and is not allowed to sign up as new account via %%s, please use another way to sign up",
|
||||
"The account for provider: %s and username: %s (%s) does not exist and is not allowed to sign up as new account, please contact your IT support": "The account for provider: %s and username: %s (%s) does not exist and is not allowed to sign up as new account, please contact your IT support",
|
||||
"The account for provider: %s and username: %s (%s) is already linked to another account: %s (%s)": "The account for provider: %s and username: %s (%s) is already linked to another account: %s (%s)",
|
||||
"The application: %s does not exist": "The application: %s does not exist",
|
||||
"The login method: login with password is not enabled for the application": "The login method: login with password is not enabled for the application",
|
||||
"The provider type: %s is not supported": "The provider type: %s is not supported",
|
||||
"The provider: %s is not enabled for the application": "The provider: %s is not enabled for the application",
|
||||
"The user is forbidden to sign in, please contact the administrator": "The user is forbidden to sign in, please contact the administrator",
|
||||
"Turing test failed.": "Turing test failed.",
|
||||
"Unauthorized operation": "Unauthorized operation",
|
||||
"Unknown authentication type (not password or provider), form = %s": "Unknown authentication type (not password or provider), form = %s"
|
||||
},
|
||||
"cas": {
|
||||
"Service %s and %s do not match": "Service %s and %s do not match"
|
||||
},
|
||||
"check": {
|
||||
"Affiliation cannot be blank": "Affiliation cannot be blank",
|
||||
"DisplayName cannot be blank": "DisplayName cannot be blank",
|
||||
"DisplayName is not valid real name": "DisplayName is not valid real name",
|
||||
"Email already exists": "Email already exists",
|
||||
"Email cannot be empty": "Email cannot be empty",
|
||||
"Email is invalid": "Email is invalid",
|
||||
"Empty username.": "Empty username.",
|
||||
"FirstName cannot be blank": "FirstName cannot be blank",
|
||||
"LastName cannot be blank": "LastName cannot be blank",
|
||||
"Ldap user name or password incorrect": "Ldap user name or password incorrect",
|
||||
"Multiple accounts with same uid, please check your ldap server": "Multiple accounts with same uid, please check your ldap server",
|
||||
"Organization does not exist": "Organization does not exist",
|
||||
"Password must have at least 6 characters": "Password must have at least 6 characters",
|
||||
"Phone already exists": "Phone already exists",
|
||||
"Phone cannot be empty": "Phone cannot be empty",
|
||||
"Phone number is invalid": "Phone number is invalid",
|
||||
"Session outdated, please login again": "Session outdated, please login again",
|
||||
"The user is forbidden to sign in, please contact the administrator": "The user is forbidden to sign in, please contact the administrator",
|
||||
"The username may only contain alphanumeric characters, underlines or hyphens, cannot have consecutive hyphens or underlines, and cannot begin or end with a hyphen or underline.": "The username may only contain alphanumeric characters, underlines or hyphens, cannot have consecutive hyphens or underlines, and cannot begin or end with a hyphen or underline.",
|
||||
"Username already exists": "Username already exists",
|
||||
"Username cannot be an email address": "Username cannot be an email address",
|
||||
"Username cannot contain white spaces": "Username cannot contain white spaces",
|
||||
"Username cannot start with a digit": "Username cannot start with a digit",
|
||||
"Username is too long (maximum is 39 characters).": "Username is too long (maximum is 39 characters).",
|
||||
"Username must have at least 2 characters": "Username must have at least 2 characters",
|
||||
"You have entered the wrong password or code too many times, please wait for %d minutes and try again": "You have entered the wrong password or code too many times, please wait for %d minutes and try again",
|
||||
"Your region is not allow to signup by phone": "Your region is not allow to signup by phone",
|
||||
"password or code is incorrect, you have %d remaining chances": "password or code is incorrect, you have %d remaining chances",
|
||||
"unsupported password type: %s": "unsupported password type: %s"
|
||||
},
|
||||
"general": {
|
||||
"Missing parameter": "Missing parameter",
|
||||
"Please login first": "Please login first",
|
||||
"The user: %s doesn't exist": "The user: %s doesn't exist",
|
||||
"don't support captchaProvider: ": "don't support captchaProvider: "
|
||||
},
|
||||
"ldap": {
|
||||
"Ldap server exist": "Ldap server exist"
|
||||
},
|
||||
"link": {
|
||||
"Please link first": "Please link first",
|
||||
"This application has no providers": "This application has no providers",
|
||||
"This application has no providers of type": "This application has no providers of type",
|
||||
"This provider can't be unlinked": "This provider can't be unlinked",
|
||||
"You are not the global admin, you can't unlink other users": "You are not the global admin, you can't unlink other users",
|
||||
"You can't unlink yourself, you are not a member of any application": "You can't unlink yourself, you are not a member of any application"
|
||||
},
|
||||
"organization": {
|
||||
"Only admin can modify the %s.": "Only admin can modify the %s.",
|
||||
"The %s is immutable.": "The %s is immutable.",
|
||||
"Unknown modify rule %s.": "Unknown modify rule %s."
|
||||
},
|
||||
"provider": {
|
||||
"Invalid application id": "Invalid application id",
|
||||
"the provider: %s does not exist": "the provider: %s does not exist"
|
||||
},
|
||||
"resource": {
|
||||
"User is nil for tag: avatar": "User is nil for tag: avatar",
|
||||
"Username or fullFilePath is empty: username = %s, fullFilePath = %s": "Username or fullFilePath is empty: username = %s, fullFilePath = %s"
|
||||
},
|
||||
"saml": {
|
||||
"Application %s not found": "Application %s not found"
|
||||
},
|
||||
"saml_sp": {
|
||||
"provider %s's category is not SAML": "provider %s's category is not SAML"
|
||||
},
|
||||
"service": {
|
||||
"Empty parameters for emailForm: %v": "Empty parameters for emailForm: %v",
|
||||
"Invalid Email receivers: %s": "Invalid Email receivers: %s",
|
||||
"Invalid phone receivers: %s": "Invalid phone receivers: %s"
|
||||
},
|
||||
"storage": {
|
||||
"The objectKey: %s is not allowed": "The objectKey: %s is not allowed",
|
||||
"The provider type: %s is not supported": "The provider type: %s is not supported"
|
||||
},
|
||||
"token": {
|
||||
"Empty clientId or clientSecret": "Empty clientId or clientSecret",
|
||||
"Grant_type: %s is not supported in this application": "Grant_type: %s is not supported in this application",
|
||||
"Invalid application or wrong clientSecret": "Invalid application or wrong clientSecret",
|
||||
"Invalid client_id": "Invalid client_id",
|
||||
"Redirect URI: %s doesn't exist in the allowed Redirect URI list": "Redirect URI: %s doesn't exist in the allowed Redirect URI list",
|
||||
"Token not found, invalid accessToken": "Token not found, invalid accessToken"
|
||||
},
|
||||
"user": {
|
||||
"Display name cannot be empty": "Display name cannot be empty",
|
||||
"New password cannot contain blank space.": "New password cannot contain blank space.",
|
||||
"New password must have at least 6 characters": "New password must have at least 6 characters"
|
||||
},
|
||||
"user_upload": {
|
||||
"Failed to import users": "Failed to import users"
|
||||
},
|
||||
"util": {
|
||||
"No application is found for userId: %s": "No application is found for userId: %s",
|
||||
"No provider for category: %s is found for application: %s": "No provider for category: %s is found for application: %s",
|
||||
"The provider: %s is not found": "The provider: %s is not found"
|
||||
},
|
||||
"verification": {
|
||||
"Code has not been sent yet!": "Code has not been sent yet!",
|
||||
"Email is invalid": "Email is invalid",
|
||||
"Invalid captcha provider.": "Invalid captcha provider.",
|
||||
"Organization does not exist": "Organization does not exist",
|
||||
"Phone number is invalid in your region %s": "Phone number is invalid in your region %s",
|
||||
"Turing test failed.": "Turing test failed.",
|
||||
"Unable to get the email modify rule.": "Unable to get the email modify rule.",
|
||||
"Unable to get the phone modify rule.": "Unable to get the phone modify rule.",
|
||||
"Unknown type": "Unknown type",
|
||||
"Wrong parameter": "Wrong parameter",
|
||||
"You should verify your code in %d min!": "You should verify your code in %d min!",
|
||||
"the user does not exist, please sign up first": "the user does not exist, please sign up first"
|
||||
},
|
||||
"webauthn": {
|
||||
"Found no credentials for this user": "Found no credentials for this user",
|
||||
"Please call WebAuthnSigninBegin first": "Please call WebAuthnSigninBegin first"
|
||||
}
|
||||
}
|
@ -39,26 +39,8 @@ func InitDb() {
|
||||
initWebAuthn()
|
||||
}
|
||||
|
||||
func initBuiltInOrganization() bool {
|
||||
organization := getOrganization("admin", "built-in")
|
||||
if organization != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
organization = &Organization{
|
||||
Owner: "admin",
|
||||
Name: "built-in",
|
||||
CreatedTime: util.GetCurrentTime(),
|
||||
DisplayName: "Built-in Organization",
|
||||
WebsiteUrl: "https://example.com",
|
||||
Favicon: fmt.Sprintf("%s/img/casbin/favicon.ico", conf.GetConfigString("staticBaseUrl")),
|
||||
PasswordType: "plain",
|
||||
CountryCodes: []string{"CN"},
|
||||
DefaultAvatar: fmt.Sprintf("%s/img/casbin.svg", conf.GetConfigString("staticBaseUrl")),
|
||||
Tags: []string{},
|
||||
Languages: []string{"en", "zh", "es", "fr", "de", "ja", "ko", "ru"},
|
||||
InitScore: 2000,
|
||||
AccountItems: []*AccountItem{
|
||||
func getBuiltInAccountItems() []*AccountItem {
|
||||
return []*AccountItem{
|
||||
{Name: "Organization", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "ID", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "Name", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
@ -68,7 +50,7 @@ func initBuiltInOrganization() bool {
|
||||
{Name: "Password", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Email", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Phone", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "CountryCode", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Country code", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Country/Region", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Location", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Affiliation", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
@ -87,7 +69,29 @@ func initBuiltInOrganization() bool {
|
||||
{Name: "Is deleted", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "WebAuthn credentials", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Managed accounts", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func initBuiltInOrganization() bool {
|
||||
organization := getOrganization("admin", "built-in")
|
||||
if organization != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
organization = &Organization{
|
||||
Owner: "admin",
|
||||
Name: "built-in",
|
||||
CreatedTime: util.GetCurrentTime(),
|
||||
DisplayName: "Built-in Organization",
|
||||
WebsiteUrl: "https://example.com",
|
||||
Favicon: fmt.Sprintf("%s/img/casbin/favicon.ico", conf.GetConfigString("staticBaseUrl")),
|
||||
PasswordType: "plain",
|
||||
CountryCodes: []string{"CN"},
|
||||
DefaultAvatar: fmt.Sprintf("%s/img/casbin.svg", conf.GetConfigString("staticBaseUrl")),
|
||||
Tags: []string{},
|
||||
Languages: []string{"en", "zh", "es", "fr", "de", "ja", "ko", "ru", "vi"},
|
||||
InitScore: 2000,
|
||||
AccountItems: getBuiltInAccountItems(),
|
||||
}
|
||||
AddOrganization(organization)
|
||||
return false
|
||||
|
@ -179,34 +179,7 @@ func initDefinedOrganization(organization *Organization) {
|
||||
return
|
||||
}
|
||||
organization.CreatedTime = util.GetCurrentTime()
|
||||
organization.AccountItems = []*AccountItem{
|
||||
{Name: "Organization", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "ID", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "Name", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Display name", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Avatar", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "User type", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Password", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Email", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Phone", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "CountryCode", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Country/Region", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Location", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Affiliation", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Title", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Homepage", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Bio", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Tag", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Signup application", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Roles", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "Permissions", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "3rd-party logins", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Properties", Visible: false, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is global admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is forbidden", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is deleted", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
}
|
||||
organization.AccountItems = getBuiltInAccountItems()
|
||||
|
||||
AddOrganization(organization)
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ func DoMigration() {
|
||||
&Migrator_1_101_0_PR_1083{},
|
||||
&Migrator_1_235_0_PR_1530{},
|
||||
&Migrator_1_240_0_PR_1539{},
|
||||
&Migrator_1_245_0_PR_1557{},
|
||||
// more migrators add here in chronological order...
|
||||
}
|
||||
|
||||
|
@ -1,92 +0,0 @@
|
||||
// Copyright 2023 The Casdoor Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package object
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/casdoor/casdoor/util"
|
||||
"github.com/nyaruka/phonenumbers"
|
||||
"github.com/xorm-io/xorm"
|
||||
"github.com/xorm-io/xorm/migrate"
|
||||
)
|
||||
|
||||
type Migrator_1_245_0_PR_1557 struct{}
|
||||
|
||||
func (*Migrator_1_245_0_PR_1557) IsMigrationNeeded() bool {
|
||||
exist, _ := adapter.Engine.IsTableExist("organization")
|
||||
|
||||
if exist {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (*Migrator_1_245_0_PR_1557) DoMigration() *migrate.Migration {
|
||||
migration := migrate.Migration{
|
||||
ID: "20230215organization--transfer phonePrefix to defaultCountryCode, countryCodes",
|
||||
Migrate: func(engine *xorm.Engine) error {
|
||||
organizations := []*Organization{}
|
||||
err := engine.Table("organization").Find(&organizations, &Organization{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for _, organization := range organizations {
|
||||
organization.AccountItems = []*AccountItem{
|
||||
{Name: "Organization", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "ID", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "Name", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Display name", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Avatar", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "User type", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Password", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Email", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Phone", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "CountryCode", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Country/Region", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Location", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Affiliation", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Title", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Homepage", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Bio", Visible: true, ViewRule: "Public", ModifyRule: "Self"},
|
||||
{Name: "Tag", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Signup application", Visible: true, ViewRule: "Public", ModifyRule: "Admin"},
|
||||
{Name: "Roles", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "Permissions", Visible: true, ViewRule: "Public", ModifyRule: "Immutable"},
|
||||
{Name: "3rd-party logins", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Properties", Visible: false, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is global admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is forbidden", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "Is deleted", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||
{Name: "WebAuthn credentials", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
{Name: "Managed accounts", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||
}
|
||||
|
||||
sql := fmt.Sprintf("select phone_prefix from organization where owner='%s' and name='%s'", organization.Owner, organization.Name)
|
||||
results, _ := engine.Query(sql)
|
||||
|
||||
phonePrefix := util.ParseInt(string(results[0]["phone_prefix"]))
|
||||
organization.CountryCodes = []string{phonenumbers.GetRegionCodeForCountryCode(phonePrefix)}
|
||||
|
||||
UpdateOrganization(util.GetId(organization.Owner, organization.Name), organization)
|
||||
}
|
||||
return err
|
||||
},
|
||||
}
|
||||
|
||||
return &migration
|
||||
}
|
@ -211,6 +211,10 @@ func GetAccountItemByName(name string, organization *Organization) *AccountItem
|
||||
}
|
||||
|
||||
func CheckAccountItemModifyRule(accountItem *AccountItem, user *User, lang string) (bool, string) {
|
||||
if accountItem == nil {
|
||||
return true, ""
|
||||
}
|
||||
|
||||
switch accountItem.ModifyRule {
|
||||
case "Admin":
|
||||
if user == nil || !user.IsAdmin && !user.IsGlobalAdmin {
|
||||
|
@ -64,7 +64,7 @@ func NewSamlResponse(user *User, host string, certificate string, destination st
|
||||
assertion.CreateAttr("IssueInstant", now)
|
||||
assertion.CreateElement("saml:Issuer").SetText(host)
|
||||
subject := assertion.CreateElement("saml:Subject")
|
||||
subject.CreateElement("saml:NameID").SetText(user.Email)
|
||||
subject.CreateElement("saml:NameID").SetText(user.Name)
|
||||
subjectConfirmation := subject.CreateElement("saml:SubjectConfirmation")
|
||||
subjectConfirmation.CreateAttr("Method", "urn:oasis:names:tc:SAML:2.0:cm:bearer")
|
||||
subjectConfirmationData := subjectConfirmation.CreateElement("saml:SubjectConfirmationData")
|
||||
@ -230,16 +230,20 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
|
||||
// base64 decode
|
||||
defated, err := base64.StdEncoding.DecodeString(samlRequest)
|
||||
if err != nil {
|
||||
return "", "", method, fmt.Errorf("err: %s", err.Error())
|
||||
return "", "", method, fmt.Errorf("err: Failed to decode SAML request , %s", err.Error())
|
||||
}
|
||||
|
||||
// decompress
|
||||
var buffer bytes.Buffer
|
||||
rdr := flate.NewReader(bytes.NewReader(defated))
|
||||
io.Copy(&buffer, rdr)
|
||||
_, err = io.Copy(&buffer, rdr)
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
var authnRequest saml.AuthnRequest
|
||||
err = xml.Unmarshal(buffer.Bytes(), &authnRequest)
|
||||
if err != nil {
|
||||
return "", "", method, fmt.Errorf("err: %s", err.Error())
|
||||
return "", "", method, fmt.Errorf("err: Failed to unmarshal AuthnRequest, please check the SAML request. %s", err.Error())
|
||||
}
|
||||
|
||||
// verify samlRequest
|
||||
@ -252,14 +256,15 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
|
||||
block, _ := pem.Decode([]byte(cert.Certificate))
|
||||
certificate := base64.StdEncoding.EncodeToString(block.Bytes)
|
||||
|
||||
_, originBackend := getOriginFromHost(host)
|
||||
|
||||
// redirect Url (Assertion Consumer Url)
|
||||
if application.SamlReplyUrl != "" {
|
||||
method = "POST"
|
||||
authnRequest.AssertionConsumerServiceURL = application.SamlReplyUrl
|
||||
} else if authnRequest.AssertionConsumerServiceURL == "" {
|
||||
return "", "", "", fmt.Errorf("err: SAML request don't has attribute 'AssertionConsumerServiceURL' in <samlp:AuthnRequest>")
|
||||
}
|
||||
|
||||
_, originBackend := getOriginFromHost(host)
|
||||
// build signedResponse
|
||||
samlResponse, _ := NewSamlResponse(user, originBackend, certificate, authnRequest.AssertionConsumerServiceURL, authnRequest.Issuer.Url, authnRequest.ID, application.RedirectUris)
|
||||
randomKeyStore := &X509Key{
|
||||
@ -279,7 +284,7 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
|
||||
doc.SetRoot(samlResponse)
|
||||
xmlBytes, err := doc.WriteToBytes()
|
||||
if err != nil {
|
||||
return "", "", method, fmt.Errorf("err: %s", err.Error())
|
||||
return "", "", method, fmt.Errorf("err: Failed to serializes the SAML request into bytes, %s", err.Error())
|
||||
}
|
||||
|
||||
// compress
|
||||
@ -287,15 +292,21 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
|
||||
flated := bytes.NewBuffer(nil)
|
||||
writer, err := flate.NewWriter(flated, flate.DefaultCompression)
|
||||
if err != nil {
|
||||
return "", "", method, fmt.Errorf("err: %s", err.Error())
|
||||
return "", "", method, err
|
||||
}
|
||||
_, err = writer.Write(xmlBytes)
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
err = writer.Close()
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
writer.Write(xmlBytes)
|
||||
writer.Close()
|
||||
xmlBytes = flated.Bytes()
|
||||
}
|
||||
// base64 encode
|
||||
res := base64.StdEncoding.EncodeToString(xmlBytes)
|
||||
return res, authnRequest.AssertionConsumerServiceURL, method, nil
|
||||
return res, authnRequest.AssertionConsumerServiceURL, method, err
|
||||
}
|
||||
|
||||
// NewSamlResponse11 return a saml1.1 response(not 2.0)
|
||||
@ -359,7 +370,10 @@ func NewSamlResponse11(user *User, requestID string, host string) *etree.Element
|
||||
|
||||
data, _ := json.Marshal(user)
|
||||
tmp := map[string]string{}
|
||||
json.Unmarshal(data, &tmp)
|
||||
err := json.Unmarshal(data, &tmp)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for k, v := range tmp {
|
||||
if v != "" {
|
||||
|
@ -19,6 +19,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/beego/beego/context"
|
||||
"github.com/casdoor/casdoor/conf"
|
||||
"github.com/casdoor/casdoor/i18n"
|
||||
"github.com/casdoor/casdoor/object"
|
||||
"github.com/casdoor/casdoor/util"
|
||||
)
|
||||
@ -46,8 +48,17 @@ func responseError(ctx *context.Context, error string, data ...interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
func getAcceptLanguage(ctx *context.Context) string {
|
||||
language := ctx.Request.Header.Get("Accept-Language")
|
||||
return conf.GetLanguage(language)
|
||||
}
|
||||
|
||||
func T(ctx *context.Context, error string) string {
|
||||
return i18n.Translate(getAcceptLanguage(ctx), error)
|
||||
}
|
||||
|
||||
func denyRequest(ctx *context.Context) {
|
||||
responseError(ctx, "Unauthorized operation")
|
||||
responseError(ctx, T(ctx, "auth:Unauthorized operation"))
|
||||
}
|
||||
|
||||
func getUsernameByClientIdSecret(ctx *context.Context) string {
|
||||
|
@ -119,8 +119,8 @@ func initAPI() {
|
||||
beego.Router("/api/get-captcha", &controllers.ApiController{}, "GET:GetCaptcha")
|
||||
|
||||
beego.Router("/api/get-ldap-user", &controllers.ApiController{}, "POST:GetLdapUser")
|
||||
beego.Router("/api/get-ldaps", &controllers.ApiController{}, "POST:GetLdaps")
|
||||
beego.Router("/api/get-ldap", &controllers.ApiController{}, "POST:GetLdap")
|
||||
beego.Router("/api/get-ldaps", &controllers.ApiController{}, "GET:GetLdaps")
|
||||
beego.Router("/api/get-ldap", &controllers.ApiController{}, "GET:GetLdap")
|
||||
beego.Router("/api/add-ldap", &controllers.ApiController{}, "POST:AddLdap")
|
||||
beego.Router("/api/update-ldap", &controllers.ApiController{}, "POST:UpdateLdap")
|
||||
beego.Router("/api/delete-ldap", &controllers.ApiController{}, "POST:DeleteLdap")
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/cssinjs": "^1.5.6",
|
||||
"@ant-design/icons": "^4.7.0",
|
||||
"@craco/craco": "^6.4.5",
|
||||
"@crowdin/cli": "^3.7.10",
|
||||
|
@ -261,7 +261,7 @@ class AdapterListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -16,8 +16,9 @@ import React, {Component} from "react";
|
||||
import "./App.less";
|
||||
import {Helmet} from "react-helmet";
|
||||
import * as Setting from "./Setting";
|
||||
import {BarsOutlined, DownOutlined, LogoutOutlined, SettingOutlined} from "@ant-design/icons";
|
||||
import {Avatar, Button, Card, ConfigProvider, Drawer, Dropdown, FloatButton, Layout, Menu, Result} from "antd";
|
||||
import {StyleProvider} from "@ant-design/cssinjs";
|
||||
import {BarsOutlined, DownOutlined, InfoCircleFilled, LogoutOutlined, SettingOutlined} from "@ant-design/icons";
|
||||
import {Alert, Avatar, Button, Card, ConfigProvider, Drawer, Dropdown, FloatButton, Layout, Menu, Result} from "antd";
|
||||
import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom";
|
||||
import OrganizationListPage from "./OrganizationListPage";
|
||||
import OrganizationEditPage from "./OrganizationEditPage";
|
||||
@ -671,6 +672,9 @@ class App extends Component {
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
this.renderBanner()
|
||||
}
|
||||
<FloatButton.BackTop />
|
||||
<CustomGithubCorner />
|
||||
{
|
||||
@ -680,6 +684,32 @@ class App extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderBanner() {
|
||||
if (!Conf.IsDemoMode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const language = Setting.getLanguage();
|
||||
if (language === "en" || language === "zh") {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Alert type="info" banner showIcon={false} closable message={
|
||||
<div style={{textAlign: "center"}}>
|
||||
<InfoCircleFilled style={{color: "rgb(87,52,211)"}} />
|
||||
|
||||
{i18next.t("general:Found some texts still not translated? Please help us translate at")}
|
||||
|
||||
<a target="_blank" rel="noreferrer" href={"https://crowdin.com/project/casdoor-site"}>
|
||||
Crowdin
|
||||
</a>
|
||||
! 🙏
|
||||
</div>
|
||||
} />
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
@ -700,9 +730,11 @@ class App extends Component {
|
||||
},
|
||||
algorithm: Setting.getAlgorithm(this.state.themeAlgorithm),
|
||||
}}>
|
||||
<StyleProvider hashPriority="high">
|
||||
{
|
||||
this.renderPage()
|
||||
}
|
||||
</StyleProvider>
|
||||
</ConfigProvider>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
@ -287,7 +287,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -228,7 +228,7 @@ class CertListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -201,7 +201,7 @@ class ModelListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -37,7 +37,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
defaultAvatar: `${Setting.StaticBaseUrl}/img/casbin.svg`,
|
||||
defaultApplication: "",
|
||||
tags: [],
|
||||
languages: ["en", "zh", "es", "fr", "de", "ja", "ko", "ru"],
|
||||
languages: ["en", "zh", "es", "fr", "de", "ja", "ko", "ru", "vi"],
|
||||
masterPassword: "",
|
||||
enableSoftDeletion: false,
|
||||
isProfilePublic: true,
|
||||
@ -284,7 +284,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -279,7 +279,7 @@ class PaymentListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -359,7 +359,7 @@ class PermissionListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -296,7 +296,7 @@ class ProductListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -82,20 +82,20 @@ class ProviderEditPage extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
getClientIdLabel() {
|
||||
switch (this.state.provider.category) {
|
||||
getClientIdLabel(provider) {
|
||||
switch (provider.category) {
|
||||
case "Email":
|
||||
return Setting.getLabel(i18next.t("signup:Username"), i18next.t("signup:Username - Tooltip"));
|
||||
case "SMS":
|
||||
if (this.state.provider.type === "Volc Engine SMS") {
|
||||
if (provider.type === "Volc Engine SMS") {
|
||||
return Setting.getLabel(i18next.t("provider:Access key"), i18next.t("provider:Access key - Tooltip"));
|
||||
} else if (this.state.provider.type === "Huawei Cloud SMS") {
|
||||
} else if (provider.type === "Huawei Cloud SMS") {
|
||||
return Setting.getLabel(i18next.t("provider:App key"), i18next.t("provider:App key - Tooltip"));
|
||||
} else {
|
||||
return Setting.getLabel(i18next.t("provider:Client ID"), i18next.t("provider:Client ID - Tooltip"));
|
||||
}
|
||||
case "Captcha":
|
||||
if (this.state.provider.type === "Aliyun Captcha") {
|
||||
if (provider.type === "Aliyun Captcha") {
|
||||
return Setting.getLabel(i18next.t("provider:Access key"), i18next.t("provider:Access key - Tooltip"));
|
||||
} else {
|
||||
return Setting.getLabel(i18next.t("provider:Site key"), i18next.t("provider:Site key - Tooltip"));
|
||||
@ -105,20 +105,20 @@ class ProviderEditPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
getClientSecretLabel() {
|
||||
switch (this.state.provider.category) {
|
||||
getClientSecretLabel(provider) {
|
||||
switch (provider.category) {
|
||||
case "Email":
|
||||
return Setting.getLabel(i18next.t("login:Password"), i18next.t("login:Password - Tooltip"));
|
||||
case "SMS":
|
||||
if (this.state.provider.type === "Volc Engine SMS") {
|
||||
if (provider.type === "Volc Engine SMS") {
|
||||
return Setting.getLabel(i18next.t("provider:Secret access key"), i18next.t("provider:SecretAccessKey - Tooltip"));
|
||||
} else if (this.state.provider.type === "Huawei Cloud SMS") {
|
||||
} else if (provider.type === "Huawei Cloud SMS") {
|
||||
return Setting.getLabel(i18next.t("provider:App secret"), i18next.t("provider:AppSecret - Tooltip"));
|
||||
} else {
|
||||
return Setting.getLabel(i18next.t("provider:Client secret"), i18next.t("provider:Client secret - Tooltip"));
|
||||
}
|
||||
case "Captcha":
|
||||
if (this.state.provider.type === "Aliyun Captcha") {
|
||||
if (provider.type === "Aliyun Captcha") {
|
||||
return Setting.getLabel(i18next.t("provider:Secret access key"), i18next.t("provider:SecretAccessKey - Tooltip"));
|
||||
} else {
|
||||
return Setting.getLabel(i18next.t("provider:Secret key"), i18next.t("provider:Secret key - Tooltip"));
|
||||
@ -128,40 +128,52 @@ class ProviderEditPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
getAppIdRow() {
|
||||
let text, tooltip;
|
||||
if (this.state.provider.category === "SMS" && this.state.provider.type === "Tencent Cloud SMS") {
|
||||
getAppIdRow(provider) {
|
||||
let text = "";
|
||||
let tooltip = "";
|
||||
|
||||
if (provider.category === "OAuth") {
|
||||
if (provider.type === "WeCom" && provider.subType === "Internal") {
|
||||
text = i18next.t("provider:Agent ID");
|
||||
tooltip = i18next.t("provider:Agent ID - Tooltip");
|
||||
} else if (provider.type === "Infoflow") {
|
||||
text = i18next.t("provider:Agent ID");
|
||||
tooltip = i18next.t("provider:Agent ID - Tooltip");
|
||||
}
|
||||
} else if (provider.category === "SMS") {
|
||||
if (provider.type === "Tencent Cloud SMS") {
|
||||
text = i18next.t("provider:App ID");
|
||||
tooltip = i18next.t("provider:App ID - Tooltip");
|
||||
} else if (this.state.provider.type === "WeCom" && this.state.provider.subType === "Internal") {
|
||||
text = i18next.t("provider:Agent ID");
|
||||
tooltip = i18next.t("provider:Agent ID - Tooltip");
|
||||
} else if (this.state.provider.type === "Infoflow") {
|
||||
text = i18next.t("provider:Agent ID");
|
||||
tooltip = i18next.t("provider:Agent ID - Tooltip");
|
||||
} else if (this.state.provider.category === "SMS" && this.state.provider.type === "Volc Engine SMS") {
|
||||
} else if (provider.type === "Volc Engine SMS") {
|
||||
text = i18next.t("provider:SMS account");
|
||||
tooltip = i18next.t("provider:SMS account - Tooltip");
|
||||
} else if (this.state.provider.category === "SMS" && this.state.provider.type === "Huawei Cloud SMS") {
|
||||
} else if (provider.type === "Huawei Cloud SMS") {
|
||||
text = i18next.t("provider:Channel No.");
|
||||
tooltip = i18next.t("provider:Channel No. - Tooltip");
|
||||
} else if (this.state.provider.category === "Email" && this.state.provider.type === "SUBMAIL") {
|
||||
}
|
||||
} else if (provider.category === "Email") {
|
||||
if (provider.type === "SUBMAIL") {
|
||||
text = i18next.t("provider:App ID");
|
||||
tooltip = i18next.t("provider:App ID - Tooltip");
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return <Row style={{marginTop: "20px"}} >
|
||||
if (text === "" && tooltip === "") {
|
||||
return null;
|
||||
} else {
|
||||
return (
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(text, tooltip)} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.appId} onChange={e => {
|
||||
<Input value={provider.appId} onChange={e => {
|
||||
this.updateProviderField("appId", e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>;
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
loadSamlConfiguration() {
|
||||
@ -404,7 +416,7 @@ class ProviderEditPage extends React.Component {
|
||||
<React.Fragment>
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientIdLabel()}
|
||||
{this.getClientIdLabel(this.state.provider)}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientId} onChange={e => {
|
||||
@ -414,7 +426,7 @@ class ProviderEditPage extends React.Component {
|
||||
</Row>
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientSecretLabel()}
|
||||
{this.getClientSecretLabel(this.state.provider)}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientSecret} onChange={e => {
|
||||
@ -750,7 +762,7 @@ class ProviderEditPage extends React.Component {
|
||||
</React.Fragment>
|
||||
) : null
|
||||
}
|
||||
{this.getAppIdRow()}
|
||||
{this.getAppIdRow(this.state.provider)}
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("provider:Provider URL"), i18next.t("provider:Provider URL - Tooltip"))} :
|
||||
|
@ -267,7 +267,7 @@ class ProviderListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -232,7 +232,7 @@ class RoleListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -148,7 +148,7 @@ class SessionListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -32,13 +32,14 @@ export const ServerUrl = "";
|
||||
export const StaticBaseUrl = "https://cdn.casbin.org";
|
||||
|
||||
export const Countries = [{label: "English", key: "en", country: "US", alt: "English"},
|
||||
{label: "简体中文", key: "zh", country: "CN", alt: "简体中文"},
|
||||
{label: "中文", key: "zh", country: "CN", alt: "中文"},
|
||||
{label: "Español", key: "es", country: "ES", alt: "Español"},
|
||||
{label: "Français", key: "fr", country: "FR", alt: "Français"},
|
||||
{label: "Deutsch", key: "de", country: "DE", alt: "Deutsch"},
|
||||
{label: "日本語", key: "ja", country: "JP", alt: "日本語"},
|
||||
{label: "한국어", key: "ko", country: "KR", alt: "한국어"},
|
||||
{label: "Русский", key: "ru", country: "RU", alt: "Русский"},
|
||||
{label: "TiếngViệt", key: "vi", country: "VI", alt: "TiếngViệt"},
|
||||
];
|
||||
|
||||
export function getThemeData(organization, application) {
|
||||
@ -262,6 +263,13 @@ export function isProviderVisible(providerItem) {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function isResponseDenied(data) {
|
||||
if (data.msg === "Unauthorized operation" || data.msg === "未授权的操作") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isProviderVisibleForSignUp(providerItem) {
|
||||
if (providerItem.canSignUp === false) {
|
||||
return false;
|
||||
|
@ -289,7 +289,7 @@ class SyncerListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -254,7 +254,7 @@ class TokenListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -404,7 +404,7 @@ class UserListPage extends BaseListPage {
|
||||
this.getOrganization(users[0].owner);
|
||||
}
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
@ -432,7 +432,7 @@ class UserListPage extends BaseListPage {
|
||||
this.getOrganization(users[0].owner);
|
||||
}
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -254,7 +254,7 @@ class WebhookListPage extends BaseListPage {
|
||||
searchedColumn: params.searchedColumn,
|
||||
});
|
||||
} else {
|
||||
if (res.msg.includes("Unauthorized")) {
|
||||
if (Setting.isResponseDenied(res)) {
|
||||
this.setState({
|
||||
loading: false,
|
||||
isAuthorized: false,
|
||||
|
@ -16,6 +16,7 @@ import React from "react";
|
||||
import {Button, Checkbox, Col, Form, Input, Result, Row, Spin, Tabs} from "antd";
|
||||
import {LockOutlined, UserOutlined} from "@ant-design/icons";
|
||||
import * as UserWebauthnBackend from "../backend/UserWebauthnBackend";
|
||||
import * as Conf from "../Conf";
|
||||
import * as AuthBackend from "./AuthBackend";
|
||||
import * as OrganizationBackend from "../backend/OrganizationBackend";
|
||||
import * as ApplicationBackend from "../backend/ApplicationBackend";
|
||||
@ -384,6 +385,8 @@ class LoginPage extends React.Component {
|
||||
organization: application.organization,
|
||||
application: application.name,
|
||||
autoSignin: true,
|
||||
username: Conf.ShowGithubCorner ? "admin" : "",
|
||||
password: Conf.ShowGithubCorner ? "123" : "",
|
||||
}}
|
||||
onFinish={(values) => {
|
||||
this.onFinish(values);
|
||||
|
@ -21,8 +21,9 @@ import * as Setting from "../Setting";
|
||||
const {confirm} = Modal;
|
||||
const {fetch: originalFetch} = window;
|
||||
|
||||
const demoModeCallback = async(url, option) => {
|
||||
if (option.method === "POST") {
|
||||
const demoModeCallback = (res) => {
|
||||
res.json().then(data => {
|
||||
if (Setting.isResponseDenied(data)) {
|
||||
confirm({
|
||||
title: i18next.t("general:This is a read-only demo site!"),
|
||||
icon: <ExclamationCircleFilled />,
|
||||
@ -30,26 +31,28 @@ const demoModeCallback = async(url, option) => {
|
||||
okText: i18next.t("user:OK"),
|
||||
cancelText: i18next.t("general:Cancel"),
|
||||
onOk() {
|
||||
Setting.openLink(`https://demo.casdoor.com${location.path}${location.search}?username=built-in/admin&password=123`);
|
||||
Setting.openLink(`https://demo.casdoor.com${location.pathname}${location.search}?username=built-in/admin&password=123`);
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
|
||||
return option;
|
||||
});
|
||||
};
|
||||
|
||||
const requestFilters = [];
|
||||
const responseFilters = [];
|
||||
|
||||
if (Conf.IsDemoMode) {
|
||||
requestFilters.push(demoModeCallback);
|
||||
responseFilters.push(demoModeCallback);
|
||||
}
|
||||
|
||||
window.fetch = async(url, option = {}) => {
|
||||
requestFilters.forEach(filter => filter(url, option));
|
||||
|
||||
const response = await originalFetch(url, option);
|
||||
responseFilters.forEach(filter => (response) => filter(response));
|
||||
return response;
|
||||
return new Promise((resolve, reject) => {
|
||||
originalFetch(url, option).then(res => {
|
||||
responseFilters.forEach(filter => filter(res.clone()));
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ import * as Setting from "../Setting";
|
||||
|
||||
export function getLdaps(owner) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-ldaps?owner=${owner}`, {
|
||||
method: "POST",
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Accept-Language": Setting.getAcceptLanguage(),
|
||||
@ -26,7 +26,7 @@ export function getLdaps(owner) {
|
||||
|
||||
export function getLdap(id) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-ldap?id=${id}`, {
|
||||
method: "POST",
|
||||
method: "GET",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Accept-Language": Setting.getAcceptLanguage(),
|
||||
|
@ -13,26 +13,28 @@
|
||||
// limitations under the License.
|
||||
|
||||
import i18n from "i18next";
|
||||
import zh from "./locales/zh/data.json";
|
||||
import en from "./locales/en/data.json";
|
||||
import zh from "./locales/zh/data.json";
|
||||
import es from "./locales/es/data.json";
|
||||
import fr from "./locales/fr/data.json";
|
||||
import de from "./locales/de/data.json";
|
||||
import ja from "./locales/ja/data.json";
|
||||
import ko from "./locales/ko/data.json";
|
||||
import ru from "./locales/ru/data.json";
|
||||
import ja from "./locales/ja/data.json";
|
||||
import es from "./locales/es/data.json";
|
||||
import vi from "./locales/vi/data.json";
|
||||
import * as Conf from "./Conf";
|
||||
import {initReactI18next} from "react-i18next";
|
||||
|
||||
const resources = {
|
||||
en: en,
|
||||
es: es,
|
||||
zh: zh,
|
||||
es: es,
|
||||
fr: fr,
|
||||
de: de,
|
||||
ja: ja,
|
||||
ko: ko,
|
||||
ru: ru,
|
||||
ja: ja,
|
||||
vi: vi,
|
||||
};
|
||||
|
||||
function initLanguage() {
|
||||
@ -43,17 +45,20 @@ function initLanguage() {
|
||||
} else {
|
||||
const userLanguage = navigator.language;
|
||||
switch (userLanguage) {
|
||||
case "en":
|
||||
language = "en";
|
||||
break;
|
||||
case "en-US":
|
||||
language = "en";
|
||||
break;
|
||||
case "zh-CN":
|
||||
language = "zh";
|
||||
break;
|
||||
case "zh":
|
||||
language = "zh";
|
||||
break;
|
||||
case "en":
|
||||
language = "en";
|
||||
break;
|
||||
case "en-US":
|
||||
language = "en";
|
||||
case "es":
|
||||
language = "es";
|
||||
break;
|
||||
case "fr":
|
||||
language = "fr";
|
||||
@ -61,14 +66,17 @@ function initLanguage() {
|
||||
case "de":
|
||||
language = "de";
|
||||
break;
|
||||
case "ja":
|
||||
language = "ja";
|
||||
break;
|
||||
case "ko":
|
||||
language = "ko";
|
||||
break;
|
||||
case "ru":
|
||||
language = "ru";
|
||||
break;
|
||||
case "ja":
|
||||
language = "ja";
|
||||
case "vi":
|
||||
language = "vi";
|
||||
break;
|
||||
default:
|
||||
language = Conf.DefaultLanguage;
|
||||
|
@ -5,45 +5,45 @@
|
||||
"Sign Up": "Registrieren"
|
||||
},
|
||||
"adapter": {
|
||||
"Edit Adapter": "Edit Adapter",
|
||||
"Failed to sync policies": "Failed to sync policies",
|
||||
"New Adapter": "New Adapter",
|
||||
"Policies": "Policies",
|
||||
"Policies - Tooltip": "Policies - Tooltip",
|
||||
"Repeated policy rules": "Repeated policy rules",
|
||||
"Sync": "Sync",
|
||||
"Sync policies successfully": "Sync policies successfully"
|
||||
"Edit Adapter": "Adapter bearbeiten",
|
||||
"Failed to sync policies": "Fehler beim Synchronisieren der Richtlinien",
|
||||
"New Adapter": "Neuer Adapter",
|
||||
"Policies": "Richtlinien",
|
||||
"Policies - Tooltip": "Richtlinien - Tooltip",
|
||||
"Repeated policy rules": "Wiederholte Regeln der Richtlinien",
|
||||
"Sync": "Synchronisation",
|
||||
"Sync policies successfully": "Richtlinien erfolgreich synchronisiert"
|
||||
},
|
||||
"application": {
|
||||
"Always": "Always",
|
||||
"Auto signin": "Auto signin",
|
||||
"Auto signin - Tooltip": "Auto signin - Tooltip",
|
||||
"Background URL": "Background URL",
|
||||
"Background URL - Tooltip": "Background URL - Tooltip",
|
||||
"Center": "Center",
|
||||
"Copy SAML metadata URL": "Copy SAML metadata URL",
|
||||
"Always": "Immer",
|
||||
"Auto signin": "Automatische Anmeldung",
|
||||
"Auto signin - Tooltip": "Automatische Anmeldung - Tooltip",
|
||||
"Background URL": "Hintergrund-URL",
|
||||
"Background URL - Tooltip": "Hintergrund-URL - Kurzinfo",
|
||||
"Center": "Zentriert",
|
||||
"Copy SAML metadata URL": "SAML-Metadaten URL kopieren",
|
||||
"Copy prompt page URL": "Copy prompt page URL",
|
||||
"Copy signin page URL": "Copy signin page URL",
|
||||
"Copy signup page URL": "Copy signup page URL",
|
||||
"Copy signin page URL": "URL der Anmeldeseite kopieren",
|
||||
"Copy signup page URL": "URL der Registrierungsseite kopieren",
|
||||
"Edit Application": "Anwendung bearbeiten",
|
||||
"Enable SAML compress": "Enable SAML compress",
|
||||
"Enable SAML compress - Tooltip": "Enable SAML compress - Tooltip",
|
||||
"Enable WebAuthn signin": "Enable WebAuthn signin",
|
||||
"Enable WebAuthn signin - Tooltip": "Enable WebAuthn signin - Tooltip",
|
||||
"Enable SAML compress": "SAML-Komprimierung aktivieren",
|
||||
"Enable SAML compress - Tooltip": "SAML-Komprimierung aktivieren - Tooltip",
|
||||
"Enable WebAuthn signin": "WebAuthn Anmeldung aktivieren",
|
||||
"Enable WebAuthn signin - Tooltip": "WebAuthn Anmeldung aktivieren - Tooltip",
|
||||
"Enable code signin": "Code-Anmeldung aktivieren",
|
||||
"Enable code signin - Tooltip": "Aktiviere Codeanmeldung - Tooltip",
|
||||
"Enable link accounts that with the same email": "Enable link accounts that with the same email",
|
||||
"Enable link accounts that with the same email - Tooltip": "Enable link accounts that with the same email - Tooltip",
|
||||
"Enable side panel": "Enable side panel",
|
||||
"Enable side panel": "Seitenmenü aktivieren",
|
||||
"Enable signin session - Tooltip": "Aktiviere Anmeldesession - Tooltip",
|
||||
"Enable signup": "Anmeldung aktivieren",
|
||||
"Enable signup - Tooltip": "Whether to allow users to sign up",
|
||||
"Failed to sign in": "Failed to sign in",
|
||||
"Failed to sign in": "Anmeldung fehlgeschlagen",
|
||||
"File uploaded successfully": "Datei erfolgreich hochgeladen",
|
||||
"Follow organization theme": "Follow organization theme",
|
||||
"Form CSS": "Form CSS",
|
||||
"Form CSS - Edit": "Form CSS - Edit",
|
||||
"Form CSS - Tooltip": "Form CSS - Tooltip",
|
||||
"Form CSS": "Formular-CSS",
|
||||
"Form CSS - Edit": "Formular-CSS - Bearbeiten",
|
||||
"Form CSS - Tooltip": "Formular-CSS - Tooltip",
|
||||
"Form position": "Form position",
|
||||
"Form position - Tooltip": "Form position - Tooltip",
|
||||
"Grant types": "Grant types",
|
||||
@ -181,6 +181,7 @@
|
||||
"First name": "First name",
|
||||
"Forget URL": "URL vergessen",
|
||||
"Forget URL - Tooltip": "Unique string-style identifier",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Zuhause",
|
||||
"Home - Tooltip": "Application homepage",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "First name",
|
||||
"Forget URL": "Forget URL",
|
||||
"Forget URL - Tooltip": "Forget URL - Tooltip",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Home",
|
||||
"Home - Tooltip": "Home - Tooltip",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "Nombre",
|
||||
"Forget URL": "URL de olvido",
|
||||
"Forget URL - Tooltip": "URL de olvido - Tooltip",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Inicio",
|
||||
"Home - Tooltip": "Inicio - Tooltip",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "First name",
|
||||
"Forget URL": "Oublier l'URL",
|
||||
"Forget URL - Tooltip": "Unique string-style identifier",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Domicile",
|
||||
"Home - Tooltip": "Application homepage",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "First name",
|
||||
"Forget URL": "URLを忘れた",
|
||||
"Forget URL - Tooltip": "Unique string-style identifier",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "ホーム",
|
||||
"Home - Tooltip": "Application homepage",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "First name",
|
||||
"Forget URL": "Forget URL",
|
||||
"Forget URL - Tooltip": "Unique string-style identifier",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Home",
|
||||
"Home - Tooltip": "Application homepage",
|
||||
|
@ -181,6 +181,7 @@
|
||||
"First name": "Имя",
|
||||
"Forget URL": "Забыть URL",
|
||||
"Forget URL - Tooltip": "Unique string-style identifier",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Домашний",
|
||||
"Home - Tooltip": "Application homepage",
|
||||
|
805
web/src/locales/vi/data.json
Normal file
805
web/src/locales/vi/data.json
Normal file
@ -0,0 +1,805 @@
|
||||
{
|
||||
"account": {
|
||||
"Logout": "Logout",
|
||||
"My Account": "My Account",
|
||||
"Sign Up": "Sign Up"
|
||||
},
|
||||
"adapter": {
|
||||
"Edit Adapter": "Edit Adapter",
|
||||
"Failed to sync policies": "Failed to sync policies",
|
||||
"New Adapter": "New Adapter",
|
||||
"Policies": "Policies",
|
||||
"Policies - Tooltip": "Policies - Tooltip",
|
||||
"Repeated policy rules": "Repeated policy rules",
|
||||
"Sync": "Sync",
|
||||
"Sync policies successfully": "Sync policies successfully"
|
||||
},
|
||||
"application": {
|
||||
"Always": "Always",
|
||||
"Auto signin": "Auto signin",
|
||||
"Auto signin - Tooltip": "Auto signin - Tooltip",
|
||||
"Background URL": "Background URL",
|
||||
"Background URL - Tooltip": "Background URL - Tooltip",
|
||||
"Center": "Center",
|
||||
"Copy SAML metadata URL": "Copy SAML metadata URL",
|
||||
"Copy prompt page URL": "Copy prompt page URL",
|
||||
"Copy signin page URL": "Copy signin page URL",
|
||||
"Copy signup page URL": "Copy signup page URL",
|
||||
"Edit Application": "Edit Application",
|
||||
"Enable SAML compress": "Enable SAML compress",
|
||||
"Enable SAML compress - Tooltip": "Enable SAML compress - Tooltip",
|
||||
"Enable WebAuthn signin": "Enable WebAuthn signin",
|
||||
"Enable WebAuthn signin - Tooltip": "Enable WebAuthn signin - Tooltip",
|
||||
"Enable code signin": "Enable code signin",
|
||||
"Enable code signin - Tooltip": "Enable code signin - Tooltip",
|
||||
"Enable link accounts that with the same email": "Enable link accounts that with the same email",
|
||||
"Enable link accounts that with the same email - Tooltip": "Enable link accounts that with the same email - Tooltip",
|
||||
"Enable side panel": "Enable side panel",
|
||||
"Enable signin session - Tooltip": "Enable signin session - Tooltip",
|
||||
"Enable signup": "Enable signup",
|
||||
"Enable signup - Tooltip": "Enable signup - Tooltip",
|
||||
"Failed to sign in": "Failed to sign in",
|
||||
"File uploaded successfully": "File uploaded successfully",
|
||||
"Follow organization theme": "Follow organization theme",
|
||||
"Form CSS": "Form CSS",
|
||||
"Form CSS - Edit": "Form CSS - Edit",
|
||||
"Form CSS - Tooltip": "Form CSS - Tooltip",
|
||||
"Form position": "Form position",
|
||||
"Form position - Tooltip": "Form position - Tooltip",
|
||||
"Grant types": "Grant types",
|
||||
"Grant types - Tooltip": "Grant types - Tooltip",
|
||||
"Left": "Left",
|
||||
"Logged in successfully": "Logged in successfully",
|
||||
"Logged out successfully": "Logged out successfully",
|
||||
"New Application": "New Application",
|
||||
"None": "None",
|
||||
"Password ON": "Password ON",
|
||||
"Password ON - Tooltip": "Password ON - Tooltip",
|
||||
"Please input your application!": "Please input your application!",
|
||||
"Please input your organization!": "Please input your organization!",
|
||||
"Please select a HTML file": "Please select a HTML file",
|
||||
"Prompt page URL copied to clipboard successfully, please paste it into the incognito window or another browser": "Prompt page URL copied to clipboard successfully, please paste it into the incognito window or another browser",
|
||||
"Redirect URL": "Redirect URL",
|
||||
"Redirect URL (Assertion Consumer Service POST Binding URL) - Tooltip": "Redirect URL (Assertion Consumer Service POST Binding URL) - Tooltip",
|
||||
"Redirect URLs": "Redirect URLs",
|
||||
"Redirect URLs - Tooltip": "Redirect URLs - Tooltip",
|
||||
"Refresh token expire": "Refresh token expire",
|
||||
"Refresh token expire - Tooltip": "Refresh token expire - Tooltip",
|
||||
"Right": "Right",
|
||||
"Rule": "Rule",
|
||||
"SAML Reply URL": "SAML Reply URL",
|
||||
"SAML metadata": "SAML metadata",
|
||||
"SAML metadata - Tooltip": "SAML metadata - Tooltip",
|
||||
"SAML metadata URL copied to clipboard successfully": "SAML metadata URL copied to clipboard successfully",
|
||||
"Side panel HTML": "Side panel HTML",
|
||||
"Side panel HTML - Edit": "Side panel HTML - Edit",
|
||||
"Side panel HTML - Tooltip": "Side panel HTML - Tooltip",
|
||||
"Sign Up Error": "Sign Up Error",
|
||||
"Signin page URL copied to clipboard successfully, please paste it into the incognito window or another browser": "Signin page URL copied to clipboard successfully, please paste it into the incognito window or another browser",
|
||||
"Signin session": "Signin session",
|
||||
"Signup items": "Signup items",
|
||||
"Signup items - Tooltip": "Signup items - Tooltip",
|
||||
"Signup page URL copied to clipboard successfully, please paste it into the incognito window or another browser": "Signup page URL copied to clipboard successfully, please paste it into the incognito window or another browser",
|
||||
"The application does not allow to sign up new account": "The application does not allow to sign up new account",
|
||||
"Token expire": "Token expire",
|
||||
"Token expire - Tooltip": "Token expire - Tooltip",
|
||||
"Token format": "Token format",
|
||||
"Token format - Tooltip": "Token format - Tooltip",
|
||||
"You are unexpected to see this prompt page": "You are unexpected to see this prompt page"
|
||||
},
|
||||
"cert": {
|
||||
"Bit size": "Bit size",
|
||||
"Bit size - Tooltip": "Bit size - Tooltip",
|
||||
"Certificate": "Certificate",
|
||||
"Certificate - Tooltip": "Certificate - Tooltip",
|
||||
"Certificate copied to clipboard successfully": "Certificate copied to clipboard successfully",
|
||||
"Copy certificate": "Copy certificate",
|
||||
"Copy private key": "Copy private key",
|
||||
"Crypto algorithm": "Crypto algorithm",
|
||||
"Crypto algorithm - Tooltip": "Crypto algorithm - Tooltip",
|
||||
"Download certificate": "Download certificate",
|
||||
"Download private key": "Download private key",
|
||||
"Edit Cert": "Edit Cert",
|
||||
"Expire in years": "Expire in years",
|
||||
"Expire in years - Tooltip": "Expire in years - Tooltip",
|
||||
"New Cert": "New Cert",
|
||||
"Private key": "Private key",
|
||||
"Private key - Tooltip": "Private key - Tooltip",
|
||||
"Private key copied to clipboard successfully": "Private key copied to clipboard successfully",
|
||||
"Scope": "Scope",
|
||||
"Scope - Tooltip": "Scope - Tooltip",
|
||||
"Type": "Type",
|
||||
"Type - Tooltip": "Type - Tooltip"
|
||||
},
|
||||
"code": {
|
||||
"Code You Received": "Code You Received",
|
||||
"Email code": "Email code",
|
||||
"Empty Code": "Empty Code",
|
||||
"Enter your code": "Enter your code",
|
||||
"Phone code": "Phone code",
|
||||
"Please input your phone verification code!": "Please input your phone verification code!",
|
||||
"Please input your verification code!": "Please input your verification code!",
|
||||
"Send Code": "Send Code",
|
||||
"Sending Code": "Sending Code",
|
||||
"Submit and complete": "Submit and complete"
|
||||
},
|
||||
"forget": {
|
||||
"Account": "Account",
|
||||
"Change Password": "Change Password",
|
||||
"Choose email or phone": "Choose email or phone",
|
||||
"Confirm": "Confirm",
|
||||
"Next Step": "Next Step",
|
||||
"Password": "Password",
|
||||
"Please input your username!": "Please input your username!",
|
||||
"Reset": "Reset",
|
||||
"Retrieve password": "Retrieve password",
|
||||
"Unknown forget type: ": "Unknown forget type: ",
|
||||
"Verify": "Verify"
|
||||
},
|
||||
"general": {
|
||||
"Action": "Action",
|
||||
"Adapter": "Adapter",
|
||||
"Adapter - Tooltip": "Adapter - Tooltip",
|
||||
"Adapters": "Adapters",
|
||||
"Add": "Add",
|
||||
"Affiliation URL": "Affiliation URL",
|
||||
"Affiliation URL - Tooltip": "Affiliation URL - Tooltip",
|
||||
"Application": "Application",
|
||||
"Applications": "Applications",
|
||||
"Applications that require authentication": "Applications that require authentication",
|
||||
"Avatar": "Avatar",
|
||||
"Avatar - Tooltip": "Avatar - Tooltip",
|
||||
"Back Home": "Back Home",
|
||||
"Cancel": "Cancel",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certs",
|
||||
"Click to Upload": "Click to Upload",
|
||||
"Client IP": "Client IP",
|
||||
"Close": "Close",
|
||||
"Created time": "Created time",
|
||||
"Default application": "Default application",
|
||||
"Default application - Tooltip": "Default application - Tooltip",
|
||||
"Default avatar": "Default avatar",
|
||||
"Default avatar - Tooltip": "Default avatar - Tooltip",
|
||||
"Delete": "Delete",
|
||||
"Description": "Description",
|
||||
"Description - Tooltip": "Description - Tooltip",
|
||||
"Display name": "Display name",
|
||||
"Display name - Tooltip": "Display name - Tooltip",
|
||||
"Down": "Down",
|
||||
"Edit": "Edit",
|
||||
"Email": "Email",
|
||||
"Email - Tooltip": "Email - Tooltip",
|
||||
"Failed to add": "Failed to add",
|
||||
"Failed to connect to server": "Failed to connect to server",
|
||||
"Failed to delete": "Failed to delete",
|
||||
"Failed to save": "Failed to save",
|
||||
"Favicon": "Favicon",
|
||||
"Favicon - Tooltip": "Favicon - Tooltip",
|
||||
"First name": "First name",
|
||||
"Forget URL": "Forget URL",
|
||||
"Forget URL - Tooltip": "Forget URL - Tooltip",
|
||||
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
|
||||
"Go to writable demo site?": "Go to writable demo site?",
|
||||
"Home": "Home",
|
||||
"Home - Tooltip": "Home - Tooltip",
|
||||
"ID": "ID",
|
||||
"ID - Tooltip": "ID - Tooltip",
|
||||
"Is enabled": "Is enabled",
|
||||
"Is enabled - Tooltip": "Is enabled - Tooltip",
|
||||
"LDAPs": "LDAPs",
|
||||
"LDAPs - Tooltip": "LDAPs - Tooltip",
|
||||
"Languages": "Languages",
|
||||
"Languages - Tooltip": "Languages - Tooltip",
|
||||
"Last name": "Last name",
|
||||
"Logo": "Logo",
|
||||
"Logo - Tooltip": "Logo - Tooltip",
|
||||
"Master password": "Master password",
|
||||
"Master password - Tooltip": "Master password - Tooltip",
|
||||
"Menu": "Menu",
|
||||
"Method": "Method",
|
||||
"Model": "Model",
|
||||
"Model - Tooltip": "Model - Tooltip",
|
||||
"Models": "Models",
|
||||
"Name": "Name",
|
||||
"Name - Tooltip": "Name - Tooltip",
|
||||
"OAuth providers": "OAuth providers",
|
||||
"Organization": "Organization",
|
||||
"Organization - Tooltip": "Organization - Tooltip",
|
||||
"Organizations": "Organizations",
|
||||
"Password": "Password",
|
||||
"Password - Tooltip": "Password - Tooltip",
|
||||
"Password salt": "Password salt",
|
||||
"Password salt - Tooltip": "Password salt - Tooltip",
|
||||
"Password type": "Password type",
|
||||
"Password type - Tooltip": "Password type - Tooltip",
|
||||
"Payments": "Payments",
|
||||
"Permissions": "Permissions",
|
||||
"Permissions - Tooltip": "Permissions - Tooltip",
|
||||
"Phone": "Phone",
|
||||
"Phone - Tooltip": "Phone - Tooltip",
|
||||
"Preview": "Preview",
|
||||
"Preview - Tooltip": "Preview - Tooltip",
|
||||
"Products": "Products",
|
||||
"Provider": "Provider",
|
||||
"Provider - Tooltip": "Provider - Tooltip",
|
||||
"Providers": "Providers",
|
||||
"Providers - Tooltip": "Providers - Tooltip",
|
||||
"Real name": "Real name",
|
||||
"Records": "Records",
|
||||
"Request URI": "Request URI",
|
||||
"Resources": "Resources",
|
||||
"Roles": "Roles",
|
||||
"Roles - Tooltip": "Roles - Tooltip",
|
||||
"Save": "Save",
|
||||
"Save & Exit": "Save & Exit",
|
||||
"Session ID": "Session ID",
|
||||
"Sessions": "Sessions",
|
||||
"Signin URL": "Signin URL",
|
||||
"Signin URL - Tooltip": "Signin URL - Tooltip",
|
||||
"Signup URL": "Signup URL",
|
||||
"Signup URL - Tooltip": "Signup URL - Tooltip",
|
||||
"Signup application": "Signup application",
|
||||
"Signup application - Tooltip": "Signup application - Tooltip",
|
||||
"Sorry, the page you visited does not exist.": "Sorry, the page you visited does not exist.",
|
||||
"Sorry, the user you visited does not exist or you are not authorized to access this user.": "Sorry, the user you visited does not exist or you are not authorized to access this user.",
|
||||
"Sorry, you do not have permission to access this page or logged in status invalid.": "Sorry, you do not have permission to access this page or logged in status invalid.",
|
||||
"State": "State",
|
||||
"State - Tooltip": "State - Tooltip",
|
||||
"Successfully added": "Successfully added",
|
||||
"Successfully deleted": "Successfully deleted",
|
||||
"Successfully saved": "Successfully saved",
|
||||
"Supported country code": "Supported country code",
|
||||
"Supported country code - Tooltip": "Supported country code - Tooltip",
|
||||
"Swagger": "Swagger",
|
||||
"Sync": "Sync",
|
||||
"Syncers": "Syncers",
|
||||
"SysInfo": "SysInfo",
|
||||
"This is a read-only demo site!": "This is a read-only demo site!",
|
||||
"Timestamp": "Timestamp",
|
||||
"Tokens": "Tokens",
|
||||
"URL": "URL",
|
||||
"URL - Tooltip": "URL - Tooltip",
|
||||
"Up": "Up",
|
||||
"User": "User",
|
||||
"User - Tooltip": "User - Tooltip",
|
||||
"User containers": "User containers",
|
||||
"User type": "User type",
|
||||
"User type - Tooltip": "User type - Tooltip",
|
||||
"Users": "Users",
|
||||
"Users under all organizations": "Users under all organizations",
|
||||
"Webhooks": "Webhooks",
|
||||
"{total} in total": "{total} in total"
|
||||
},
|
||||
"ldap": {
|
||||
"Address": "Address",
|
||||
"Admin": "Admin",
|
||||
"Admin - Tooltip": "Admin - Tooltip",
|
||||
"Admin Password": "Admin Password",
|
||||
"Admin Password - Tooltip": "Admin Password - Tooltip",
|
||||
"Auto Sync": "Auto Sync",
|
||||
"Auto Sync - Tooltip": "Auto Sync - Tooltip",
|
||||
"Base DN": "Base DN",
|
||||
"Base DN - Tooltip": "Base DN - Tooltip",
|
||||
"CN": "CN",
|
||||
"Edit LDAP": "Edit LDAP",
|
||||
"Email": "Email",
|
||||
"Group Id": "Group Id",
|
||||
"ID": "ID",
|
||||
"Last Sync": "Last Sync",
|
||||
"Phone": "Phone",
|
||||
"Server": "Server",
|
||||
"Server Host": "Server Host",
|
||||
"Server Host - Tooltip": "Server Host - Tooltip",
|
||||
"Server Name": "Server Name",
|
||||
"Server Name - Tooltip": "Server Name - Tooltip",
|
||||
"Server Port": "Server Port",
|
||||
"Server Port - Tooltip": "Server Port - Tooltip",
|
||||
"Sync": "Sync",
|
||||
"The Auto Sync option will sync all users to specify organization": "The Auto Sync option will sync all users to specify organization",
|
||||
"UidNumber / Uid": "UidNumber / Uid"
|
||||
},
|
||||
"login": {
|
||||
"Auto sign in": "Auto sign in",
|
||||
"Continue with": "Continue with",
|
||||
"Email or phone": "Email or phone",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"Loading": "Loading",
|
||||
"Logging out...": "Logging out...",
|
||||
"No account?": "No account?",
|
||||
"Or sign in with another account": "Or sign in with another account",
|
||||
"Password": "Password",
|
||||
"Password - Tooltip": "Password - Tooltip",
|
||||
"Please input your Email or Phone!": "Please input your Email or Phone!",
|
||||
"Please input your code!": "Please input your code!",
|
||||
"Please input your password!": "Please input your password!",
|
||||
"Please input your password, at least 6 characters!": "Please input your password, at least 6 characters!",
|
||||
"Redirecting, please wait.": "Redirecting, please wait.",
|
||||
"Sign In": "Sign In",
|
||||
"Sign in with WebAuthn": "Sign in with WebAuthn",
|
||||
"Sign in with {type}": "Sign in with {type}",
|
||||
"Signing in...": "Signing in...",
|
||||
"Successfully logged in with webauthn credentials": "Successfully logged in with webauthn credentials",
|
||||
"The input is not valid Email or Phone!": "The input is not valid Email or Phone!",
|
||||
"To access": "To access",
|
||||
"Verification Code": "Verification Code",
|
||||
"WebAuthn": "WebAuthn",
|
||||
"sign up now": "sign up now",
|
||||
"username, Email or phone": "username, Email or phone"
|
||||
},
|
||||
"model": {
|
||||
"Edit Model": "Edit Model",
|
||||
"Model text": "Model text",
|
||||
"Model text - Tooltip": "Model text - Tooltip",
|
||||
"New Model": "New Model"
|
||||
},
|
||||
"organization": {
|
||||
"Account items": "Account items",
|
||||
"Account items - Tooltip": "Account items - Tooltip",
|
||||
"Default avatar": "Default avatar",
|
||||
"Edit Organization": "Edit Organization",
|
||||
"Favicon": "Favicon",
|
||||
"Follow global theme": "Follow global theme",
|
||||
"InitScore": "InitScore",
|
||||
"Is profile public": "Is profile public",
|
||||
"Is profile public - Tooltip": "Is profile public - Tooltip",
|
||||
"Modify rule": "Modify rule",
|
||||
"New Organization": "New Organization",
|
||||
"Soft deletion": "Soft deletion",
|
||||
"Soft deletion - Tooltip": "Soft deletion - Tooltip",
|
||||
"Tags": "Tags",
|
||||
"Tags - Tooltip": "Tags - Tooltip",
|
||||
"The user's initScore - Tooltip": "The user's initScore - Tooltip",
|
||||
"View rule": "View rule",
|
||||
"Visible": "Visible",
|
||||
"Website URL": "Website URL",
|
||||
"Website URL - Tooltip": "Website URL - Tooltip"
|
||||
},
|
||||
"payment": {
|
||||
"Confirm your invoice information": "Confirm your invoice information",
|
||||
"Currency": "Currency",
|
||||
"Currency - Tooltip": "Currency - Tooltip",
|
||||
"Download Invoice": "Download Invoice",
|
||||
"Edit Payment": "Edit Payment",
|
||||
"Individual": "Individual",
|
||||
"Invoice URL": "Invoice URL",
|
||||
"Invoice URL - Tooltip": "Invoice URL - Tooltip",
|
||||
"Invoice actions": "Invoice actions",
|
||||
"Invoice actions - Tooltip": "Invoice actions - Tooltip",
|
||||
"Invoice remark": "Invoice remark",
|
||||
"Invoice remark - Tooltip": "Invoice remark - Tooltip",
|
||||
"Invoice tax ID": "Invoice tax ID",
|
||||
"Invoice tax ID - Tooltip": "Invoice tax ID - Tooltip",
|
||||
"Invoice title": "Invoice title",
|
||||
"Invoice title - Tooltip": "Invoice title - Tooltip",
|
||||
"Invoice type": "Invoice type",
|
||||
"Invoice type - Tooltip": "Invoice type - Tooltip",
|
||||
"Issue Invoice": "Issue Invoice",
|
||||
"Message": "Message",
|
||||
"Message - Tooltip": "Message - Tooltip",
|
||||
"New Payment": "New Payment",
|
||||
"Organization": "Organization",
|
||||
"Person Email": "Person Email",
|
||||
"Person Email - Tooltip": "Person Email - Tooltip",
|
||||
"Person ID card": "Person ID card",
|
||||
"Person ID card - Tooltip": "Person ID card - Tooltip",
|
||||
"Person name": "Person name",
|
||||
"Person name - Tooltip": "Person name - Tooltip",
|
||||
"Person phone": "Person phone",
|
||||
"Person phone - Tooltip": "Person phone - Tooltip",
|
||||
"Please carefully check your invoice information. Once the invoice is issued, it cannot be withdrawn or modified.": "Please carefully check your invoice information. Once the invoice is issued, it cannot be withdrawn or modified.",
|
||||
"Please click the below button to return to the original website": "Please click the below button to return to the original website",
|
||||
"Please pay the order first!": "Please pay the order first!",
|
||||
"Price": "Price",
|
||||
"Price - Tooltip": "Price - Tooltip",
|
||||
"Processing...": "Processing...",
|
||||
"Product": "Product",
|
||||
"Product - Tooltip": "Product - Tooltip",
|
||||
"Result": "Result",
|
||||
"Return to Website": "Return to Website",
|
||||
"State": "State",
|
||||
"State - Tooltip": "State - Tooltip",
|
||||
"The payment has failed": "The payment has failed",
|
||||
"The payment is still under processing": "The payment is still under processing",
|
||||
"Type": "Type",
|
||||
"Type - Tooltip": "Type - Tooltip",
|
||||
"You have successfully completed the payment": "You have successfully completed the payment",
|
||||
"please wait for a few seconds...": "please wait for a few seconds...",
|
||||
"the current state is": "the current state is"
|
||||
},
|
||||
"permission": {
|
||||
"Actions": "Actions",
|
||||
"Actions - Tooltip": "Actions - Tooltip",
|
||||
"Admin": "Admin",
|
||||
"Allow": "Allow",
|
||||
"Approve time": "Approve time",
|
||||
"Approve time - Tooltip": "Approve time - Tooltip",
|
||||
"Approved": "Approved",
|
||||
"Approver": "Approver",
|
||||
"Approver - Tooltip": "Approver - Tooltip",
|
||||
"Deny": "Deny",
|
||||
"Edit Permission": "Edit Permission",
|
||||
"Effect": "Effect",
|
||||
"Effect - Tooltip": "Effect - Tooltip",
|
||||
"New Permission": "New Permission",
|
||||
"Pending": "Pending",
|
||||
"Read": "Read",
|
||||
"Resource type": "Resource type",
|
||||
"Resource type - Tooltip": "Resource type - Tooltip",
|
||||
"Resources": "Resources",
|
||||
"Resources - Tooltip": "Resources - Tooltip",
|
||||
"State": "State",
|
||||
"State - Tooltip": "State - Tooltip",
|
||||
"Submitter": "Submitter",
|
||||
"Submitter - Tooltip": "Submitter - Tooltip",
|
||||
"TreeNode": "TreeNode",
|
||||
"Write": "Write"
|
||||
},
|
||||
"product": {
|
||||
"Alipay": "Alipay",
|
||||
"Buy": "Buy",
|
||||
"Buy Product": "Buy Product",
|
||||
"CNY": "CNY",
|
||||
"Currency": "Currency",
|
||||
"Currency - Tooltip": "Currency - Tooltip",
|
||||
"Description": "Description",
|
||||
"Description - Tooltip": "Description - Tooltip",
|
||||
"Detail": "Detail",
|
||||
"Detail - Tooltip": "Detail - Tooltip",
|
||||
"Edit Product": "Edit Product",
|
||||
"I have completed the payment": "I have completed the payment",
|
||||
"Image": "Image",
|
||||
"Image - Tooltip": "Image - Tooltip",
|
||||
"New Product": "New Product",
|
||||
"Pay": "Pay",
|
||||
"Payment providers": "Payment providers",
|
||||
"Payment providers - Tooltip": "Payment providers - Tooltip",
|
||||
"Paypal": "Paypal",
|
||||
"Placing order...": "Placing order...",
|
||||
"Please provide your username in the remark": "Please provide your username in the remark",
|
||||
"Please scan the QR code to pay": "Please scan the QR code to pay",
|
||||
"Price": "Price",
|
||||
"Price - Tooltip": "Price - Tooltip",
|
||||
"Quantity": "Quantity",
|
||||
"Quantity - Tooltip": "Quantity - Tooltip",
|
||||
"Return URL": "Return URL",
|
||||
"Return URL - Tooltip": "Return URL - Tooltip",
|
||||
"SKU": "SKU",
|
||||
"Sold": "Sold",
|
||||
"Sold - Tooltip": "Sold - Tooltip",
|
||||
"Tag": "Tag",
|
||||
"Tag - Tooltip": "Tag - Tooltip",
|
||||
"Test buy page..": "Test buy page..",
|
||||
"There is no payment channel for this product.": "There is no payment channel for this product.",
|
||||
"This product is currently not in sale.": "This product is currently not in sale.",
|
||||
"USD": "USD",
|
||||
"WeChat Pay": "WeChat Pay"
|
||||
},
|
||||
"provider": {
|
||||
"Access key": "Access key",
|
||||
"Access key - Tooltip": "Access key - Tooltip",
|
||||
"Agent ID": "Agent ID",
|
||||
"Agent ID - Tooltip": "Agent ID - Tooltip",
|
||||
"App ID": "App ID",
|
||||
"App ID - Tooltip": "App ID - Tooltip",
|
||||
"App key": "App key",
|
||||
"App key - Tooltip": "App key - Tooltip",
|
||||
"App secret": "App secret",
|
||||
"AppSecret - Tooltip": "AppSecret - Tooltip",
|
||||
"Auth URL": "Auth URL",
|
||||
"Auth URL - Tooltip": "Auth URL - Tooltip",
|
||||
"Bucket": "Bucket",
|
||||
"Bucket - Tooltip": "Bucket - Tooltip",
|
||||
"Can not parse Metadata": "Can not parse Metadata",
|
||||
"Can signin": "Can signin",
|
||||
"Can signup": "Can signup",
|
||||
"Can unlink": "Can unlink",
|
||||
"Category": "Category",
|
||||
"Category - Tooltip": "Category - Tooltip",
|
||||
"Channel No.": "Channel No.",
|
||||
"Channel No. - Tooltip": "Channel No. - Tooltip",
|
||||
"Client ID": "Client ID",
|
||||
"Client ID - Tooltip": "Client ID - Tooltip",
|
||||
"Client ID 2": "Client ID 2",
|
||||
"Client ID 2 - Tooltip": "Client ID 2 - Tooltip",
|
||||
"Client secret": "Client secret",
|
||||
"Client secret - Tooltip": "Client secret - Tooltip",
|
||||
"Client secret 2": "Client secret 2",
|
||||
"Client secret 2 - Tooltip": "Client secret 2 - Tooltip",
|
||||
"Copy": "Copy",
|
||||
"Disable SSL": "Disable SSL",
|
||||
"Disable SSL - Tooltip": "Disable SSL - Tooltip",
|
||||
"Domain": "Domain",
|
||||
"Domain - Tooltip": "Domain - Tooltip",
|
||||
"Edit Provider": "Edit Provider",
|
||||
"Email Content": "Email Content",
|
||||
"Email Content - Tooltip": "Email Content - Tooltip",
|
||||
"Email Title": "Email Title",
|
||||
"Email Title - Tooltip": "Email Title - Tooltip",
|
||||
"Enable QR code": "Enable QR code",
|
||||
"Enable QR code - Tooltip": "Enable QR code - Tooltip",
|
||||
"Endpoint": "Endpoint",
|
||||
"Endpoint (Intranet)": "Endpoint (Intranet)",
|
||||
"Host": "Host",
|
||||
"Host - Tooltip": "Host - Tooltip",
|
||||
"IdP": "IdP",
|
||||
"IdP certificate": "IdP certificate",
|
||||
"Issuer URL": "Issuer URL",
|
||||
"Issuer URL - Tooltip": "Issuer URL - Tooltip",
|
||||
"Link copied to clipboard successfully": "Link copied to clipboard successfully",
|
||||
"Metadata": "Metadata",
|
||||
"Metadata - Tooltip": "Metadata - Tooltip",
|
||||
"Method": "Method",
|
||||
"Method - Tooltip": "Method - Tooltip",
|
||||
"Name": "Name",
|
||||
"New Provider": "New Provider",
|
||||
"Parse": "Parse",
|
||||
"Parse Metadata successfully": "Parse Metadata successfully",
|
||||
"Path prefix": "Path prefix",
|
||||
"Please use WeChat and scan the QR code to sign in": "Please use WeChat and scan the QR code to sign in",
|
||||
"Port": "Port",
|
||||
"Port - Tooltip": "Port - Tooltip",
|
||||
"Prompted": "Prompted",
|
||||
"Provider URL": "Provider URL",
|
||||
"Provider URL - Tooltip": "Provider URL - Tooltip",
|
||||
"Region ID": "Region ID",
|
||||
"Region ID - Tooltip": "Region ID - Tooltip",
|
||||
"Region endpoint for Internet": "Region endpoint for Internet",
|
||||
"Region endpoint for Intranet": "Region endpoint for Intranet",
|
||||
"Required": "Required",
|
||||
"SAML 2.0 Endpoint (HTTP)": "SAML 2.0 Endpoint (HTTP)",
|
||||
"SMS account": "SMS account",
|
||||
"SMS account - Tooltip": "SMS account - Tooltip",
|
||||
"SP ACS URL": "SP ACS URL",
|
||||
"SP ACS URL - Tooltip": "SP ACS URL - Tooltip",
|
||||
"SP Entity ID": "SP Entity ID",
|
||||
"Scene": "Scene",
|
||||
"Scene - Tooltip": "Scene - Tooltip",
|
||||
"Scope": "Scope",
|
||||
"Scope - Tooltip": "Scope - Tooltip",
|
||||
"Secret access key": "Secret access key",
|
||||
"Secret key": "Secret key",
|
||||
"Secret key - Tooltip": "Secret key - Tooltip",
|
||||
"SecretAccessKey - Tooltip": "SecretAccessKey - Tooltip",
|
||||
"Send Test Email": "Send Test Email",
|
||||
"Sign Name": "Sign Name",
|
||||
"Sign Name - Tooltip": "Sign Name - Tooltip",
|
||||
"Sign request": "Sign request",
|
||||
"Sign request - Tooltip": "Sign request - Tooltip",
|
||||
"Signin HTML": "Signin HTML",
|
||||
"Signin HTML - Edit": "Signin HTML - Edit",
|
||||
"Signin HTML - Tooltip": "Signin HTML - Tooltip",
|
||||
"Signup HTML": "Signup HTML",
|
||||
"Signup HTML - Edit": "Signup HTML - Edit",
|
||||
"Signup HTML - Tooltip": "Signup HTML - Tooltip",
|
||||
"Site key": "Site key",
|
||||
"Site key - Tooltip": "Site key - Tooltip",
|
||||
"Sub type": "Sub type",
|
||||
"Sub type - Tooltip": "Sub type - Tooltip",
|
||||
"Template Code": "Template Code",
|
||||
"Template Code - Tooltip": "Template Code - Tooltip",
|
||||
"Terms of Use": "Terms of Use",
|
||||
"Terms of Use - Tooltip": "Terms of Use - Tooltip",
|
||||
"Test Connection": "Test Connection",
|
||||
"Test Email": "Test Email",
|
||||
"Test Email - Tooltip": "Test Email - Tooltip",
|
||||
"The prefix path of the file - Tooltip": "The prefix path of the file - Tooltip",
|
||||
"Token URL": "Token URL",
|
||||
"Token URL - Tooltip": "Token URL - Tooltip",
|
||||
"Type": "Type",
|
||||
"Type - Tooltip": "Type - Tooltip",
|
||||
"UserInfo URL": "UserInfo URL",
|
||||
"UserInfo URL - Tooltip": "UserInfo URL - Tooltip",
|
||||
"Visible": "Visible",
|
||||
"admin (share)": "admin (share)",
|
||||
"alertType": "alertType"
|
||||
},
|
||||
"record": {
|
||||
"Is Triggered": "Is Triggered"
|
||||
},
|
||||
"resource": {
|
||||
"Application": "Application",
|
||||
"Copy Link": "Copy Link",
|
||||
"File name": "File name",
|
||||
"File size": "File size",
|
||||
"Format": "Format",
|
||||
"Link copied to clipboard successfully": "Link copied to clipboard successfully",
|
||||
"Parent": "Parent",
|
||||
"Tag": "Tag",
|
||||
"Type": "Type",
|
||||
"Upload a file...": "Upload a file...",
|
||||
"User": "User"
|
||||
},
|
||||
"role": {
|
||||
"Edit Role": "Edit Role",
|
||||
"New Role": "New Role",
|
||||
"Sub domains": "Sub domains",
|
||||
"Sub domains - Tooltip": "Sub domains - Tooltip",
|
||||
"Sub roles": "Sub roles",
|
||||
"Sub roles - Tooltip": "Sub roles - Tooltip",
|
||||
"Sub users": "Sub users",
|
||||
"Sub users - Tooltip": "Sub users - Tooltip"
|
||||
},
|
||||
"signup": {
|
||||
"Accept": "Accept",
|
||||
"Agreement": "Agreement",
|
||||
"Confirm": "Confirm",
|
||||
"Decline": "Decline",
|
||||
"Have account?": "Have account?",
|
||||
"Please accept the agreement!": "Please accept the agreement!",
|
||||
"Please click the below button to sign in": "Please click the below button to sign in",
|
||||
"Please confirm your password!": "Please confirm your password!",
|
||||
"Please input the correct ID card number!": "Please input the correct ID card number!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Please input your ID card number!": "Please input your ID card number!",
|
||||
"Please input your address!": "Please input your address!",
|
||||
"Please input your affiliation!": "Please input your affiliation!",
|
||||
"Please input your display name!": "Please input your display name!",
|
||||
"Please input your first name!": "Please input your first name!",
|
||||
"Please input your last name!": "Please input your last name!",
|
||||
"Please input your phone number!": "Please input your phone number!",
|
||||
"Please input your real name!": "Please input your real name!",
|
||||
"Please select your country code!": "Please select your country code!",
|
||||
"Please select your country/region!": "Please select your country/region!",
|
||||
"Terms of Use": "Terms of Use",
|
||||
"The input is not invoice Tax ID!": "The input is not invoice Tax ID!",
|
||||
"The input is not invoice title!": "The input is not invoice title!",
|
||||
"The input is not valid Email!": "The input is not valid Email!",
|
||||
"The input is not valid Phone!": "The input is not valid Phone!",
|
||||
"Username": "Username",
|
||||
"Username - Tooltip": "Username - Tooltip",
|
||||
"Your account has been created!": "Your account has been created!",
|
||||
"Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!",
|
||||
"sign in now": "sign in now"
|
||||
},
|
||||
"syncer": {
|
||||
"Affiliation table": "Affiliation table",
|
||||
"Affiliation table - Tooltip": "Affiliation table - Tooltip",
|
||||
"Avatar base URL": "Avatar base URL",
|
||||
"Avatar base URL - Tooltip": "Avatar base URL - Tooltip",
|
||||
"Casdoor column": "Casdoor column",
|
||||
"Column name": "Column name",
|
||||
"Column type": "Column type",
|
||||
"Database": "Database",
|
||||
"Database - Tooltip": "Database - Tooltip",
|
||||
"Database type": "Database type",
|
||||
"Database type - Tooltip": "Database type - Tooltip",
|
||||
"Edit Syncer": "Edit Syncer",
|
||||
"Error text": "Error text",
|
||||
"Error text - Tooltip": "Error text - Tooltip",
|
||||
"Is hashed": "Is hashed",
|
||||
"New Syncer": "New Syncer",
|
||||
"Sync interval": "Sync interval",
|
||||
"Sync interval - Tooltip": "Sync interval - Tooltip",
|
||||
"Table": "Table",
|
||||
"Table - Tooltip": "Table - Tooltip",
|
||||
"Table columns": "Table columns",
|
||||
"Table columns - Tooltip": "Table columns - Tooltip",
|
||||
"Table primary key": "Table primary key",
|
||||
"Table primary key - Tooltip": "Table primary key - Tooltip"
|
||||
},
|
||||
"system": {
|
||||
"About Casdoor": "About Casdoor",
|
||||
"An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS": "An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS",
|
||||
"CPU Usage": "CPU Usage",
|
||||
"Community": "Community",
|
||||
"Get CPU Usage Failed": "Get CPU Usage Failed",
|
||||
"Get Memory Usage Failed": "Get Memory Usage Failed",
|
||||
"Memory Usage": "Memory Usage",
|
||||
"Official Website": "Official Website",
|
||||
"Unknown Version": "Unknown Version",
|
||||
"Version": "Version"
|
||||
},
|
||||
"theme": {
|
||||
"Blossom": "Blossom",
|
||||
"Border radius": "Border radius",
|
||||
"Compact": "Compact",
|
||||
"Customize theme": "Customize theme",
|
||||
"Dark": "Dark",
|
||||
"Default": "Default",
|
||||
"Document": "Document",
|
||||
"Is compact": "Is compact",
|
||||
"Primary color": "Primary color",
|
||||
"Theme": "Theme",
|
||||
"Theme - Tooltip": "Theme - Tooltip"
|
||||
},
|
||||
"token": {
|
||||
"Access token": "Access token",
|
||||
"Authorization code": "Authorization code",
|
||||
"Edit Token": "Edit Token",
|
||||
"Expires in": "Expires in",
|
||||
"New Token": "New Token",
|
||||
"Scope": "Scope",
|
||||
"Token type": "Token type"
|
||||
},
|
||||
"user": {
|
||||
"\" + destType + \" reset": "\" + destType + \" reset",
|
||||
"3rd-party logins": "3rd-party logins",
|
||||
"3rd-party logins - Tooltip": "3rd-party logins - Tooltip",
|
||||
"Address": "Address",
|
||||
"Address - Tooltip": "Address - Tooltip",
|
||||
"Affiliation": "Affiliation",
|
||||
"Affiliation - Tooltip": "Affiliation - Tooltip",
|
||||
"Bio": "Bio",
|
||||
"Bio - Tooltip": "Bio - Tooltip",
|
||||
"Cancel": "Cancel",
|
||||
"Captcha Verify Failed": "Captcha Verify Failed",
|
||||
"Captcha Verify Success": "Captcha Verify Success",
|
||||
"Code Sent": "Code Sent",
|
||||
"Country code": "Country code",
|
||||
"Country/Region": "Country/Region",
|
||||
"Country/Region - Tooltip": "Country/Region - Tooltip",
|
||||
"Edit User": "Edit User",
|
||||
"Email cannot be empty": "Email cannot be empty",
|
||||
"Empty input!": "Empty input!",
|
||||
"Homepage": "Homepage",
|
||||
"Homepage - Tooltip": "Homepage - Tooltip",
|
||||
"ID card": "ID card",
|
||||
"Input your email": "Input your email",
|
||||
"Input your phone number": "Input your phone number",
|
||||
"Is admin": "Is admin",
|
||||
"Is admin - Tooltip": "Is admin - Tooltip",
|
||||
"Is deleted": "Is deleted",
|
||||
"Is deleted - Tooltip": "Is deleted - Tooltip",
|
||||
"Is forbidden": "Is forbidden",
|
||||
"Is forbidden - Tooltip": "Is forbidden - Tooltip",
|
||||
"Is global admin": "Is global admin",
|
||||
"Is global admin - Tooltip": "Is global admin - Tooltip",
|
||||
"Keys": "Keys",
|
||||
"Link": "Link",
|
||||
"Location": "Location",
|
||||
"Location - Tooltip": "Location - Tooltip",
|
||||
"Managed accounts": "Managed accounts",
|
||||
"Modify password...": "Modify password...",
|
||||
"New Email": "New Email",
|
||||
"New Password": "New Password",
|
||||
"New User": "New User",
|
||||
"New phone": "New phone",
|
||||
"OK": "OK",
|
||||
"Old Password": "Old Password",
|
||||
"Password": "Password",
|
||||
"Password Set": "Password Set",
|
||||
"Phone cannot be empty": "Phone cannot be empty",
|
||||
"Please select avatar from resources": "Please select avatar from resources",
|
||||
"Properties": "Properties",
|
||||
"Properties - Tooltip": "Properties - Tooltip",
|
||||
"Re-enter New": "Re-enter New",
|
||||
"Reset Email...": "Reset Email...",
|
||||
"Reset Phone...": "Reset Phone...",
|
||||
"Select a photo...": "Select a photo...",
|
||||
"Set Password": "Set Password",
|
||||
"Set new profile picture": "Set new profile picture",
|
||||
"Set password...": "Set password...",
|
||||
"Tag": "Tag",
|
||||
"Tag - Tooltip": "Tag - Tooltip",
|
||||
"Title": "Title",
|
||||
"Title - Tooltip": "Title - Tooltip",
|
||||
"Two passwords you typed do not match.": "Two passwords you typed do not match.",
|
||||
"Unlink": "Unlink",
|
||||
"Upload (.xlsx)": "Upload (.xlsx)",
|
||||
"Upload a photo": "Upload a photo",
|
||||
"Values": "Values",
|
||||
"WebAuthn credentials": "WebAuthn credentials",
|
||||
"input password": "input password"
|
||||
},
|
||||
"webhook": {
|
||||
"Content type": "Content type",
|
||||
"Content type - Tooltip": "Content type - Tooltip",
|
||||
"Edit Webhook": "Edit Webhook",
|
||||
"Events": "Events",
|
||||
"Events - Tooltip": "Events - Tooltip",
|
||||
"Headers": "Headers",
|
||||
"Headers - Tooltip": "Headers - Tooltip",
|
||||
"Is user extended": "Is user extended",
|
||||
"Is user extended - Tooltip": "Is user extended - Tooltip",
|
||||
"Method": "Method",
|
||||
"Method - Tooltip": "Method - Tooltip",
|
||||
"Name": "Name",
|
||||
"New Webhook": "New Webhook",
|
||||
"URL": "URL",
|
||||
"URL - Tooltip": "URL - Tooltip",
|
||||
"Value": "Value"
|
||||
}
|
||||
}
|
@ -181,6 +181,7 @@
|
||||
"First name": "名字",
|
||||
"Forget URL": "忘记密码URL",
|
||||
"Forget URL - Tooltip": "忘记密码URL",
|
||||
"Found some texts still not translated? Please help us translate at": "发现有些文字尚未翻译?请移步这里帮我们翻译:",
|
||||
"Go to writable demo site?": "跳转至可写演示站点?",
|
||||
"Home": "首页",
|
||||
"Home - Tooltip": "应用的首页",
|
||||
|
Reference in New Issue
Block a user