Compare commits

...

26 Commits

Author SHA1 Message Date
4123d47174 feat: callback will jump to blank page when from param start with "http" (#2778) 2024-03-06 01:07:52 +08:00
fbdd5a926d Fix normal user my-account page blank bug 2024-03-06 01:07:28 +08:00
92b6fda0f6 feat: support more objects in init_data JSON (#2776) 2024-03-05 23:41:46 +08:00
6a7ac35e65 fix: fix wechat media account can not bind issue (#2774)
* fix: fix wechat media account can not bind

* fix: improve code format
2024-03-05 18:46:28 +08:00
fc137b9f76 feat: fix custom JS doesn't reload after refresh bug (#2773) 2024-03-05 15:03:25 +08:00
11dbd5ba9a fix: fix duplicated load bug of custom JS (#2771) 2024-03-05 00:09:37 +08:00
19942a8bd4 Add webhook.SingleOrgOnly 2024-03-04 21:14:52 +08:00
f9ee8a68cb Support Chrome extension redirecting 2024-03-04 18:31:56 +08:00
Ron
f241336ad7 feat: add OSON SMS provider (#2769)
* implemented SMS provider 'OSON SMS' for frontend

* feat: add 'OSON SMS' provider for frontend
2024-03-04 01:05:53 +08:00
8b64d113fb Upgrade go-sms-sender dependency to 0.20.0 2024-03-04 01:05:28 +08:00
a8800c4d5c fix: add missing / for style tag in signin items (#2768) 2024-03-03 23:46:57 +08:00
75fc9ab9f7 Improve GetMaskedApplication()'s logic 2024-03-03 22:01:49 +08:00
d06da76c3d feat: fix bug in /get-organization-applications API 2024-03-03 21:08:36 +08:00
bc399837cc Rename label to "Custom CSS" 2024-03-03 20:45:14 +08:00
265abfe102 fix: handle error in storage.GetStorageProvider() 2024-03-03 18:18:54 +08:00
12acb24dbc feat: add transaction pages (#2761) 2024-03-02 10:41:16 +08:00
ba1ddc7e50 fix: admin can modify user ID now 2024-02-28 18:07:53 +08:00
59e07a35aa Add balance to user 2024-02-28 16:54:30 +08:00
cabe830f55 feat: use dynamic import to load web3Auth (#2757)
* feat: use dynamic import to load web3Auth and success reduce the size of signin page to 720KB when web3 idp disabled

* feat: avoid frequent import in OAuthWidget.js which may cause e2e test EPIPE error

* feat: remove import may cause e2e error

* feat: remove import may cause e2e error

* feat: remove bug may cause e2e error

* feat: try use chrome in ci/cd instead of electron to solve e2e error
2024-02-28 15:58:04 +08:00
78af5daec3 feat: use resourcesToBackend to load i18n files (#2755) 2024-02-28 01:43:55 +08:00
6c76913f71 fix: Set default value for email and SMS rule to all instead of none (#2754) 2024-02-28 01:28:59 +08:00
5a0d1bcb6e Support login by user ID 2024-02-28 01:28:24 +08:00
37232faa07 feat: fix bug for missing SMS and Email provider in application 2024-02-27 22:54:35 +08:00
4d9c81ef96 Fix broken error messages 2024-02-27 22:48:33 +08:00
b0d87f60ae feat: use lazy load to load management pages (#2752) 2024-02-27 22:31:02 +08:00
a5499219d1 fix: refactor out ManagementPage.js from App.js (#2750)
* feat: basic separate

* feat: nearly fully separate

* feat: add License

* feat: full load application in /login url, lazy load in /login/oauth... etc

* fix: fix onChangeTheme error in organization edit page

* fix: revert lazy load
2024-02-27 18:49:23 +08:00
69 changed files with 2406 additions and 816 deletions

View File

@ -108,6 +108,7 @@ jobs:
working-directory: ./web
- uses: cypress-io/github-action@v5
with:
browser: chrome
start: yarn start
wait-on: 'http://localhost:7001'
wait-on-timeout: 210

View File

@ -177,7 +177,7 @@ func (c *ApiController) GetOrganizationApplications() {
return
}
applications, err = object.GetAllowedApplications(applications, userId)
applications, err = object.GetAllowedApplications(applications, userId, c.GetAcceptLanguage())
if err != nil {
c.ResponseError(err.Error())
return
@ -194,13 +194,19 @@ func (c *ApiController) GetOrganizationApplications() {
}
paginator := pagination.SetPaginator(c.Ctx, limit, count)
application, err := object.GetPaginationOrganizationApplications(owner, organization, paginator.Offset(), limit, field, value, sortField, sortOrder)
applications, err := object.GetPaginationOrganizationApplications(owner, organization, paginator.Offset(), limit, field, value, sortField, sortOrder)
if err != nil {
c.ResponseError(err.Error())
return
}
applications := object.GetMaskedApplications(application, userId)
applications, err = object.GetAllowedApplications(applications, userId, c.GetAcceptLanguage())
if err != nil {
c.ResponseError(err.Error())
return
}
applications = object.GetMaskedApplications(applications, userId)
c.ResponseOk(applications, paginator.Nums())
}
}

167
controllers/transaction.go Normal file
View File

@ -0,0 +1,167 @@
// Copyright 2024 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 controllers
import (
"encoding/json"
"github.com/beego/beego/utils/pagination"
"github.com/casdoor/casdoor/object"
"github.com/casdoor/casdoor/util"
)
// GetTransactions
// @Title GetTransactions
// @Tag Transaction API
// @Description get transactions
// @Param owner query string true "The owner of transactions"
// @Success 200 {array} object.Transaction The Response object
// @router /get-transactions [get]
func (c *ApiController) GetTransactions() {
owner := c.Input().Get("owner")
limit := c.Input().Get("pageSize")
page := c.Input().Get("p")
field := c.Input().Get("field")
value := c.Input().Get("value")
sortField := c.Input().Get("sortField")
sortOrder := c.Input().Get("sortOrder")
if limit == "" || page == "" {
transactions, err := object.GetTransactions(owner)
if err != nil {
c.ResponseError(err.Error())
return
}
c.ResponseOk(transactions)
} else {
limit := util.ParseInt(limit)
count, err := object.GetTransactionCount(owner, field, value)
if err != nil {
c.ResponseError(err.Error())
return
}
paginator := pagination.SetPaginator(c.Ctx, limit, count)
transactions, err := object.GetPaginationTransactions(owner, paginator.Offset(), limit, field, value, sortField, sortOrder)
if err != nil {
c.ResponseError(err.Error())
return
}
c.ResponseOk(transactions, paginator.Nums())
}
}
// GetUserTransactions
// @Title GetUserTransaction
// @Tag Transaction API
// @Description get transactions for a user
// @Param owner query string true "The owner of transactions"
// @Param organization query string true "The organization of the user"
// @Param user query string true "The username of the user"
// @Success 200 {array} object.Transaction The Response object
// @router /get-user-transactions [get]
func (c *ApiController) GetUserTransactions() {
owner := c.Input().Get("owner")
user := c.Input().Get("user")
transactions, err := object.GetUserTransactions(owner, user)
if err != nil {
c.ResponseError(err.Error())
return
}
c.ResponseOk(transactions)
}
// GetTransaction
// @Title GetTransaction
// @Tag Transaction API
// @Description get transaction
// @Param id query string true "The id ( owner/name ) of the transaction"
// @Success 200 {object} object.Transaction The Response object
// @router /get-transaction [get]
func (c *ApiController) GetTransaction() {
id := c.Input().Get("id")
transaction, err := object.GetTransaction(id)
if err != nil {
c.ResponseError(err.Error())
return
}
c.ResponseOk(transaction)
}
// UpdateTransaction
// @Title UpdateTransaction
// @Tag Transaction API
// @Description update transaction
// @Param id query string true "The id ( owner/name ) of the transaction"
// @Param body body object.Transaction true "The details of the transaction"
// @Success 200 {object} controllers.Response The Response object
// @router /update-transaction [post]
func (c *ApiController) UpdateTransaction() {
id := c.Input().Get("id")
var transaction object.Transaction
err := json.Unmarshal(c.Ctx.Input.RequestBody, &transaction)
if err != nil {
c.ResponseError(err.Error())
return
}
c.Data["json"] = wrapActionResponse(object.UpdateTransaction(id, &transaction))
c.ServeJSON()
}
// AddTransaction
// @Title AddTransaction
// @Tag Transaction API
// @Description add transaction
// @Param body body object.Transaction true "The details of the transaction"
// @Success 200 {object} controllers.Response The Response object
// @router /add-transaction [post]
func (c *ApiController) AddTransaction() {
var transaction object.Transaction
err := json.Unmarshal(c.Ctx.Input.RequestBody, &transaction)
if err != nil {
c.ResponseError(err.Error())
return
}
c.Data["json"] = wrapActionResponse(object.AddTransaction(&transaction))
c.ServeJSON()
}
// DeleteTransaction
// @Title DeleteTransaction
// @Tag Transaction API
// @Description delete transaction
// @Param body body object.Transaction true "The details of the transaction"
// @Success 200 {object} controllers.Response The Response object
// @router /delete-transaction [post]
func (c *ApiController) DeleteTransaction() {
var transaction object.Transaction
err := json.Unmarshal(c.Ctx.Input.RequestBody, &transaction)
if err != nil {
c.ResponseError(err.Error())
return
}
c.Data["json"] = wrapActionResponse(object.DeleteTransaction(&transaction))
c.ServeJSON()
}

View File

@ -27,7 +27,10 @@ import (
)
func deployStaticFiles(provider *object.Provider) {
storageProvider := storage.GetStorageProvider(provider.Type, provider.ClientId, provider.ClientSecret, provider.RegionId, provider.Bucket, provider.Endpoint)
storageProvider, err := storage.GetStorageProvider(provider.Type, provider.ClientId, provider.ClientSecret, provider.RegionId, provider.Bucket, provider.Endpoint)
if err != nil {
panic(err)
}
if storageProvider == nil {
panic(fmt.Sprintf("the provider type: %s is not supported", provider.Type))
}

4
go.mod
View File

@ -9,10 +9,10 @@ require (
github.com/beego/beego v1.12.12
github.com/beevik/etree v1.1.0
github.com/casbin/casbin/v2 v2.77.2
github.com/casdoor/go-sms-sender v0.19.0
github.com/casdoor/go-sms-sender v0.20.0
github.com/casdoor/gomail/v2 v2.0.1
github.com/casdoor/notify v0.45.0
github.com/casdoor/oss v1.5.0
github.com/casdoor/oss v1.6.0
github.com/casdoor/xorm-adapter/v3 v3.1.0
github.com/casvisor/casvisor-go-sdk v1.0.3
github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f

8
go.sum
View File

@ -1083,14 +1083,14 @@ github.com/casbin/casbin/v2 v2.77.2 h1:yQinn/w9x8AswiwqwtrXz93VU48R1aYTXdHEx4RI3
github.com/casbin/casbin/v2 v2.77.2/go.mod h1:mzGx0hYW9/ksOSpw3wNjk3NRAroq5VMFYUQ6G43iGPk=
github.com/casdoor/go-reddit/v2 v2.1.0 h1:kIbfdJ7AA7H0uTQ8s0q4GGZqSS5V9wVE74RrXyD9XPs=
github.com/casdoor/go-reddit/v2 v2.1.0/go.mod h1:eagkvwlZ4Hcsuc/uQsLHYEulz5jN65SVSwV/AIE7zsc=
github.com/casdoor/go-sms-sender v0.19.0 h1:qVz7RLXx8aGgfzLUGvhNe6pbhxDqP2/qNY+XPepfpyQ=
github.com/casdoor/go-sms-sender v0.19.0/go.mod h1:cQs7qqohMJBgIVZebOCB8ko09naG1vzFJEH59VNIscs=
github.com/casdoor/go-sms-sender v0.20.0 h1:yLbCakV04DzzehhgBklOrSeCFjMwpfKBeemz9b+Y8OM=
github.com/casdoor/go-sms-sender v0.20.0/go.mod h1:cQs7qqohMJBgIVZebOCB8ko09naG1vzFJEH59VNIscs=
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/notify v0.45.0 h1:OlaFvcQFjGOgA4mRx07M8AH1gvb5xNo21mcqrVGlLgk=
github.com/casdoor/notify v0.45.0/go.mod h1:wNHQu0tiDROMBIvz0j3Om3Lhd5yZ+AIfnFb8MYb8OLQ=
github.com/casdoor/oss v1.5.0 h1:mi1htaXR5fynskDry1S3wk+Dd2nRY1z1pVcnGsqMqP4=
github.com/casdoor/oss v1.5.0/go.mod h1:rJAWA0hLhtu94t6IRpotLUkXO1NWMASirywQYaGizJE=
github.com/casdoor/oss v1.6.0 h1:IOWrGLJ+VO82qS796eaRnzFPPA1Sn3cotYTi7O/VIlQ=
github.com/casdoor/oss v1.6.0/go.mod h1:rJAWA0hLhtu94t6IRpotLUkXO1NWMASirywQYaGizJE=
github.com/casdoor/xorm-adapter/v3 v3.1.0 h1:NodWayRtSLVSeCvL9H3Hc61k0G17KhV9IymTCNfh3kk=
github.com/casdoor/xorm-adapter/v3 v3.1.0/go.mod h1:4WTcUw+bTgBylGHeGHzTtBvuTXRS23dtwzFLl9tsgFM=
github.com/casvisor/casvisor-go-sdk v1.0.3 h1:TKJQWKnhtznEBhzLPEdNsp7nJK2GgdD8JsB0lFPMW7U=

View File

@ -19,6 +19,7 @@ import (
"regexp"
"strings"
"github.com/casdoor/casdoor/i18n"
"github.com/casdoor/casdoor/util"
"github.com/xorm-io/core"
)
@ -222,7 +223,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Logo",
Visible: true,
Label: "\n<style>\n .login-logo-box {\n }\n<style>\n",
Label: "\n<style>\n .login-logo-box {\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -230,7 +231,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Signin methods",
Visible: true,
Label: "\n<style>\n .signin-methods {\n }\n<style>\n",
Label: "\n<style>\n .signin-methods {\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -238,7 +239,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Username",
Visible: true,
Label: "\n<style>\n .login-username {\n }\n<style>\n",
Label: "\n<style>\n .login-username {\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -246,7 +247,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Password",
Visible: true,
Label: "\n<style>\n .login-password {\n }\n<style>\n",
Label: "\n<style>\n .login-password {\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -254,7 +255,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Agreement",
Visible: true,
Label: "\n<style>\n .login-agreement {\n }\n<style>\n",
Label: "\n<style>\n .login-agreement {\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -262,7 +263,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Forgot password?",
Visible: true,
Label: "\n<style>\n .login-forget-password {\n display: inline-flex;\n justify-content: space-between;\n width: 320px;\n margin-bottom: 25px;\n }\n<style>\n",
Label: "\n<style>\n .login-forget-password {\n display: inline-flex;\n justify-content: space-between;\n width: 320px;\n margin-bottom: 25px;\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -270,7 +271,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Login button",
Visible: true,
Label: "\n<style>\n .login-button-box {\n margin-bottom: 5px;\n }\n .login-button {\n width: 100%;\n }\n<style>\n",
Label: "\n<style>\n .login-button-box {\n margin-bottom: 5px;\n }\n .login-button {\n width: 100%;\n }\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -278,7 +279,7 @@ func extendApplicationWithSigninItems(application *Application) (err error) {
signinItem = &SigninItem{
Name: "Signup link",
Visible: true,
Label: "\n<style>\n .login-signup-link {\n margin-bottom: 24px;\n display: flex;\n justify-content: end;\n}\n<style>\n",
Label: "\n<style>\n .login-signup-link {\n margin-bottom: 24px;\n display: flex;\n justify-content: end;\n}\n</style>\n",
Placeholder: "",
Rule: "None",
}
@ -468,36 +469,70 @@ func GetMaskedApplication(application *Application, userId string) *Application
application.FailedSigninFrozenTime = DefaultFailedSigninFrozenTime
}
isOrgUser := false
if userId != "" {
if isUserIdGlobalAdmin(userId) {
return application
}
user, _ := GetUser(userId)
if user != nil && user.IsApplicationAdmin(application) {
return application
user, err := GetUser(userId)
if err != nil {
panic(err)
}
if user != nil {
if user.IsApplicationAdmin(application) {
return application
}
if user.Owner == application.Organization {
isOrgUser = true
}
}
}
if application.ClientSecret != "" {
application.ClientSecret = "***"
application.ClientSecret = "***"
application.Cert = "***"
application.EnablePassword = false
application.EnableSigninSession = false
application.EnableCodeSignin = false
application.EnableSamlCompress = false
application.EnableSamlC14n10 = false
application.EnableSamlPostBinding = false
application.EnableWebAuthn = false
application.EnableLinkWithEmail = false
application.SamlReplyUrl = "***"
providerItems := []*ProviderItem{}
for _, providerItem := range application.Providers {
if providerItem.Provider != nil && (providerItem.Provider.Category == "OAuth" || providerItem.Provider.Category == "Web3") {
providerItems = append(providerItems, providerItem)
}
}
application.Providers = providerItems
application.GrantTypes = nil
application.Tags = nil
application.RedirectUris = nil
application.TokenFormat = "***"
application.TokenFields = nil
application.ExpireInHours = -1
application.RefreshExpireInHours = -1
application.FailedSigninLimit = -1
application.FailedSigninFrozenTime = -1
if application.OrganizationObj != nil {
if application.OrganizationObj.MasterPassword != "" {
application.OrganizationObj.MasterPassword = "***"
}
if application.OrganizationObj.DefaultPassword != "" {
application.OrganizationObj.DefaultPassword = "***"
}
if application.OrganizationObj.MasterVerificationCode != "" {
application.OrganizationObj.MasterVerificationCode = "***"
}
if application.OrganizationObj.PasswordType != "" {
application.OrganizationObj.PasswordType = "***"
}
if application.OrganizationObj.PasswordSalt != "" {
application.OrganizationObj.PasswordSalt = "***"
application.OrganizationObj.MasterPassword = "***"
application.OrganizationObj.DefaultPassword = "***"
application.OrganizationObj.MasterVerificationCode = "***"
application.OrganizationObj.PasswordType = "***"
application.OrganizationObj.PasswordSalt = "***"
application.OrganizationObj.InitScore = -1
application.OrganizationObj.EnableSoftDeletion = false
application.OrganizationObj.IsProfilePublic = false
if !isOrgUser {
application.OrganizationObj.MfaItems = nil
application.OrganizationObj.AccountItems = nil
}
}
@ -515,8 +550,12 @@ func GetMaskedApplications(applications []*Application, userId string) []*Applic
return applications
}
func GetAllowedApplications(applications []*Application, userId string) ([]*Application, error) {
if userId == "" || isUserIdGlobalAdmin(userId) {
func GetAllowedApplications(applications []*Application, userId string, lang string) ([]*Application, error) {
if userId == "" {
return nil, fmt.Errorf(i18n.Translate(lang, "auth:Unauthorized operation"))
}
if isUserIdGlobalAdmin(userId) {
return applications, nil
}
@ -524,7 +563,11 @@ func GetAllowedApplications(applications []*Application, userId string) ([]*Appl
if err != nil {
return nil, err
}
if user != nil && user.IsAdmin {
if user == nil {
return nil, fmt.Errorf(i18n.Translate(lang, "auth:Unauthorized operation"))
}
if user.IsAdmin {
return applications, nil
}
@ -639,7 +682,7 @@ func (application *Application) GetId() string {
}
func (application *Application) IsRedirectUriValid(redirectUri string) bool {
redirectUris := append([]string{"http://localhost:", "https://localhost:", "http://127.0.0.1:", "http://casdoor-app"}, application.RedirectUris...)
redirectUris := append([]string{"http://localhost:", "https://localhost:", "http://127.0.0.1:", "http://casdoor-app", ".chromiumapp.org"}, application.RedirectUris...)
for _, targetUri := range redirectUris {
targetUriRegex := regexp.MustCompile(targetUri)
if targetUriRegex.MatchString(redirectUri) || strings.Contains(redirectUri, targetUri) {

View File

@ -54,7 +54,7 @@ func (application *Application) GetProviderByCategoryAndRule(category string, me
}
for _, providerItem := range application.Providers {
if providerItem.Rule == method || providerItem.Rule == "all" {
if providerItem.Rule == method || (providerItem.Rule == "all" || providerItem.Rule == "" || providerItem.Rule == "None") {
if provider, ok := m[providerItem.Name]; ok {
return provider, nil
}

View File

@ -17,29 +17,35 @@ package object
import (
"github.com/casdoor/casdoor/conf"
"github.com/casdoor/casdoor/util"
"github.com/casvisor/casvisor-go-sdk/casvisorsdk"
)
type InitData struct {
Organizations []*Organization `json:"organizations"`
Applications []*Application `json:"applications"`
Users []*User `json:"users"`
Certs []*Cert `json:"certs"`
Providers []*Provider `json:"providers"`
Ldaps []*Ldap `json:"ldaps"`
Models []*Model `json:"models"`
Permissions []*Permission `json:"permissions"`
Payments []*Payment `json:"payments"`
Products []*Product `json:"products"`
Resources []*Resource `json:"resources"`
Roles []*Role `json:"roles"`
Syncers []*Syncer `json:"syncers"`
Tokens []*Token `json:"tokens"`
Webhooks []*Webhook `json:"webhooks"`
Groups []*Group `json:"groups"`
Adapters []*Adapter `json:"adapters"`
Enforcers []*Enforcer `json:"enforcers"`
Plans []*Plan `json:"plans"`
Pricings []*Pricing `json:"pricings"`
Organizations []*Organization `json:"organizations"`
Applications []*Application `json:"applications"`
Users []*User `json:"users"`
Certs []*Cert `json:"certs"`
Providers []*Provider `json:"providers"`
Ldaps []*Ldap `json:"ldaps"`
Models []*Model `json:"models"`
Permissions []*Permission `json:"permissions"`
Payments []*Payment `json:"payments"`
Products []*Product `json:"products"`
Resources []*Resource `json:"resources"`
Roles []*Role `json:"roles"`
Syncers []*Syncer `json:"syncers"`
Tokens []*Token `json:"tokens"`
Webhooks []*Webhook `json:"webhooks"`
Groups []*Group `json:"groups"`
Adapters []*Adapter `json:"adapters"`
Enforcers []*Enforcer `json:"enforcers"`
Plans []*Plan `json:"plans"`
Pricings []*Pricing `json:"pricings"`
Invitations []*Invitation `json:"invitations"`
Records []*casvisorsdk.Record `json:"records"`
Sessions []*Session `json:"sessions"`
Subscriptions []*Subscription `json:"subscriptions"`
Transactions []*Transaction `json:"transactions"`
}
func InitFromFile() {
@ -114,6 +120,21 @@ func InitFromFile() {
for _, pricing := range initData.Pricings {
initDefinedPricing(pricing)
}
for _, invitation := range initData.Invitations {
initDefinedInvitation(invitation)
}
for _, record := range initData.Records {
initDefinedRecord(record)
}
for _, session := range initData.Sessions {
initDefinedSession(session)
}
for _, subscription := range initData.Subscriptions {
initDefinedSubscription(subscription)
}
for _, transaction := range initData.Transactions {
initDefinedTransaction(transaction)
}
}
}
@ -145,6 +166,11 @@ func readInitDataFromFile(filePath string) (*InitData, error) {
Enforcers: []*Enforcer{},
Plans: []*Plan{},
Pricings: []*Pricing{},
Invitations: []*Invitation{},
Records: []*casvisorsdk.Record{},
Sessions: []*Session{},
Subscriptions: []*Subscription{},
Transactions: []*Transaction{},
}
err := util.JsonToStruct(s, data)
if err != nil {
@ -225,6 +251,11 @@ func readInitDataFromFile(filePath string) (*InitData, error) {
pricing.Plans = []string{}
}
}
for _, session := range data.Sessions {
if session.SessionId == nil {
session.SessionId = []string{}
}
}
return data, nil
}
@ -543,3 +574,61 @@ func initDefinedPricing(pricing *Pricing) {
panic(err)
}
}
func initDefinedInvitation(invitation *Invitation) {
existed, err := getInvitation(invitation.Owner, invitation.Name)
if err != nil {
panic(err)
}
if existed != nil {
return
}
invitation.CreatedTime = util.GetCurrentTime()
_, err = AddInvitation(invitation, "en")
if err != nil {
panic(err)
}
}
func initDefinedRecord(record *casvisorsdk.Record) {
record.CreatedTime = util.GetCurrentTime()
_ = AddRecord(record)
}
func initDefinedSession(session *Session) {
session.CreatedTime = util.GetCurrentTime()
_, err := AddSession(session)
if err != nil {
panic(err)
}
}
func initDefinedSubscription(subscription *Subscription) {
existed, err := getSubscription(subscription.Owner, subscription.Name)
if err != nil {
panic(err)
}
if existed != nil {
return
}
subscription.CreatedTime = util.GetCurrentTime()
_, err = AddSubscription(subscription)
if err != nil {
panic(err)
}
}
func initDefinedTransaction(transaction *Transaction) {
existed, err := getTransaction(transaction.Owner, transaction.Name)
if err != nil {
panic(err)
}
if existed != nil {
return
}
transaction.CreatedTime = util.GetCurrentTime()
_, err = AddTransaction(transaction)
if err != nil {
panic(err)
}
}

View File

@ -121,6 +121,31 @@ func writeInitDataToFile(filePath string) error {
return err
}
invitations, err := GetInvitations("")
if err != nil {
return err
}
records, err := GetRecords()
if err != nil {
return err
}
sessions, err := GetSessions("")
if err != nil {
return err
}
subscriptions, err := GetSubscriptions("")
if err != nil {
return err
}
transactions, err := GetTransactions("")
if err != nil {
return err
}
data := &InitData{
Organizations: organizations,
Applications: applications,
@ -142,6 +167,11 @@ func writeInitDataToFile(filePath string) error {
Enforcers: enforcers,
Plans: plans,
Pricings: pricings,
Invitations: invitations,
Records: records,
Sessions: sessions,
Subscriptions: subscriptions,
Transactions: transactions,
}
text := util.StructToJsonFormatted(data)

View File

@ -388,6 +388,11 @@ func (a *Ormer) createTable() {
panic(err)
}
err = a.Engine.Sync2(new(Transaction))
if err != nil {
panic(err)
}
err = a.Engine.Sync2(new(Syncer))
if err != nil {
panic(err)

View File

@ -134,13 +134,19 @@ func GetRecordsByField(record *casvisorsdk.Record) ([]*casvisorsdk.Record, error
return records, nil
}
func getFilteredWebhooks(webhooks []*Webhook, action string) []*Webhook {
func getFilteredWebhooks(webhooks []*Webhook, organization string, action string) []*Webhook {
res := []*Webhook{}
for _, webhook := range webhooks {
if !webhook.IsEnabled {
continue
}
if webhook.SingleOrgOnly {
if webhook.Organization != organization {
continue
}
}
matched := false
for _, event := range webhook.Events {
if action == event {
@ -163,7 +169,7 @@ func SendWebhooks(record *casvisorsdk.Record) error {
}
errs := []error{}
webhooks = getFilteredWebhooks(webhooks, record.Action)
webhooks = getFilteredWebhooks(webhooks, record.Organization, record.Action)
for _, webhook := range webhooks {
var user *User
if webhook.IsUserExtended {

View File

@ -109,14 +109,17 @@ func GetUploadFileUrl(provider *Provider, fullFilePath string, hasTimestamp bool
func getStorageProvider(provider *Provider, lang string) (oss.StorageInterface, error) {
endpoint := getProviderEndpoint(provider)
storageProvider := storage.GetStorageProvider(provider.Type, provider.ClientId, provider.ClientSecret, provider.RegionId, provider.Bucket, endpoint)
storageProvider, err := storage.GetStorageProvider(provider.Type, provider.ClientId, provider.ClientSecret, provider.RegionId, provider.Bucket, endpoint)
if err != nil {
return nil, err
}
if storageProvider == nil {
return nil, fmt.Errorf(i18n.Translate(lang, "storage:The provider type: %s is not supported"), provider.Type)
}
if provider.Domain == "" {
provider.Domain = storageProvider.GetEndpoint()
_, err := UpdateProvider(provider.GetId(), provider)
_, err = UpdateProvider(provider.GetId(), provider)
if err != nil {
return nil, err
}

144
object/transaction.go Normal file
View File

@ -0,0 +1,144 @@
// Copyright 2024 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/xorm-io/core"
)
type Transaction struct {
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
Name string `xorm:"varchar(100) notnull pk" json:"name"`
CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
DisplayName string `xorm:"varchar(100)" json:"displayName"`
// Transaction Provider Info
Provider string `xorm:"varchar(100)" json:"provider"`
Category string `xorm:"varchar(100)" json:"category"`
Type string `xorm:"varchar(100)" json:"type"`
// Product Info
ProductName string `xorm:"varchar(100)" json:"productName"`
ProductDisplayName string `xorm:"varchar(100)" json:"productDisplayName"`
Detail string `xorm:"varchar(255)" json:"detail"`
Tag string `xorm:"varchar(100)" json:"tag"`
Currency string `xorm:"varchar(100)" json:"currency"`
Amount float64 `json:"amount"`
ReturnUrl string `xorm:"varchar(1000)" json:"returnUrl"`
// User Info
User string `xorm:"varchar(100)" json:"user"`
Application string `xorm:"varchar(100)" json:"application"`
Payment string `xorm:"varchar(100)" json:"payment"`
State string `xorm:"varchar(100)" json:"state"`
}
func GetTransactionCount(owner, field, value string) (int64, error) {
session := GetSession(owner, -1, -1, field, value, "", "")
return session.Count(&Transaction{Owner: owner})
}
func GetTransactions(owner string) ([]*Transaction, error) {
transactions := []*Transaction{}
err := ormer.Engine.Desc("created_time").Find(&transactions, &Transaction{Owner: owner})
if err != nil {
return nil, err
}
return transactions, nil
}
func GetUserTransactions(owner, user string) ([]*Transaction, error) {
transactions := []*Transaction{}
err := ormer.Engine.Desc("created_time").Find(&transactions, &Transaction{Owner: owner, User: user})
if err != nil {
return nil, err
}
return transactions, nil
}
func GetPaginationTransactions(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Transaction, error) {
transactions := []*Transaction{}
session := GetSession(owner, offset, limit, field, value, sortField, sortOrder)
err := session.Find(&transactions, &Transaction{Owner: owner})
if err != nil {
return nil, err
}
return transactions, nil
}
func getTransaction(owner string, name string) (*Transaction, error) {
if owner == "" || name == "" {
return nil, nil
}
transaction := Transaction{Owner: owner, Name: name}
existed, err := ormer.Engine.Get(&transaction)
if err != nil {
return nil, err
}
if existed {
return &transaction, nil
} else {
return nil, nil
}
}
func GetTransaction(id string) (*Transaction, error) {
owner, name := util.GetOwnerAndNameFromId(id)
return getTransaction(owner, name)
}
func UpdateTransaction(id string, transaction *Transaction) (bool, error) {
owner, name := util.GetOwnerAndNameFromId(id)
if p, err := getTransaction(owner, name); err != nil {
return false, err
} else if p == nil {
return false, nil
}
affected, err := ormer.Engine.ID(core.PK{owner, name}).AllCols().Update(transaction)
if err != nil {
return false, err
}
return affected != 0, nil
}
func AddTransaction(transaction *Transaction) (bool, error) {
affected, err := ormer.Engine.Insert(transaction)
if err != nil {
return false, err
}
return affected != 0, nil
}
func DeleteTransaction(transaction *Transaction) (bool, error) {
affected, err := ormer.Engine.ID(core.PK{transaction.Owner, transaction.Name}).Delete(&Transaction{})
if err != nil {
return false, err
}
return affected != 0, nil
}
func (transaction *Transaction) GetId() string {
return fmt.Sprintf("%s/%s", transaction.Owner, transaction.Name)
}

View File

@ -86,6 +86,8 @@ type User struct {
Score int `json:"score"`
Karma int `json:"karma"`
Ranking int `json:"ranking"`
Balance float64 `json:"balance"`
Currency string `xorm:"varchar(100)" json:"currency"`
IsDefaultAvatar bool `json:"isDefaultAvatar"`
IsOnline bool `json:"isOnline"`
IsAdmin bool `json:"isAdmin"`
@ -675,7 +677,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er
}
}
if isAdmin {
columns = append(columns, "name", "email", "phone", "country_code", "type")
columns = append(columns, "name", "id", "email", "phone", "country_code", "type")
}
columns = append(columns, "updated_time")

View File

@ -77,6 +77,12 @@ func GetUserByFields(organization string, field string) (*User, error) {
return user, err
}
// check user ID
user, err = GetUserByField(organization, "id", field)
if user != nil || err != nil {
return user, err
}
// check ID card
user, err = GetUserByField(organization, "id_card", field)
if user != nil || err != nil {

View File

@ -39,6 +39,7 @@ type Webhook struct {
Headers []*Header `xorm:"mediumtext" json:"headers"`
Events []string `xorm:"varchar(1000)" json:"events"`
IsUserExtended bool `json:"isUserExtended"`
SingleOrgOnly bool `json:"singleOrgOnly"`
IsEnabled bool `json:"isEnabled"`
}

View File

@ -48,7 +48,7 @@ func CorsFilter(ctx *context.Context) {
originHostname := getHostname(origin)
host := removePort(ctx.Request.Host)
if strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "https://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") || strings.HasPrefix(origin, "http://casdoor-app") {
if strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "https://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") || strings.HasPrefix(origin, "http://casdoor-app") || strings.Contains(origin, ".chromiumapp.org") {
setCorsHeaders(ctx, origin)
return
}

View File

@ -221,6 +221,12 @@ func initAPI() {
beego.Router("/api/add-subscription", &controllers.ApiController{}, "POST:AddSubscription")
beego.Router("/api/delete-subscription", &controllers.ApiController{}, "POST:DeleteSubscription")
beego.Router("/api/get-transactions", &controllers.ApiController{}, "GET:GetTransactions")
beego.Router("/api/get-transaction", &controllers.ApiController{}, "GET:GetTransaction")
beego.Router("/api/update-transaction", &controllers.ApiController{}, "POST:UpdateTransaction")
beego.Router("/api/add-transaction", &controllers.ApiController{}, "POST:AddTransaction")
beego.Router("/api/delete-transaction", &controllers.ApiController{}, "POST:DeleteTransaction")
beego.Router("/api/get-system-info", &controllers.ApiController{}, "GET:GetSystemInfo")
beego.Router("/api/get-version-info", &controllers.ApiController{}, "GET:GetVersionInfo")
beego.Router("/api/health", &controllers.ApiController{}, "GET:Health")

View File

@ -19,8 +19,8 @@ import (
"github.com/casdoor/oss/qiniu"
)
func NewQiniuCloudKodoStorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface {
sp := qiniu.New(&qiniu.Config{
func NewQiniuCloudKodoStorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) (oss.StorageInterface, error) {
sp, err := qiniu.New(&qiniu.Config{
AccessID: clientId,
AccessKey: clientSecret,
Region: region,
@ -28,5 +28,5 @@ func NewQiniuCloudKodoStorageProvider(clientId string, clientSecret string, regi
Endpoint: endpoint,
})
return sp
return sp, err
}

View File

@ -16,27 +16,27 @@ package storage
import "github.com/casdoor/oss"
func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface {
func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, bucket string, endpoint string) (oss.StorageInterface, error) {
switch providerType {
case "Local File System":
return NewLocalFileSystemStorageProvider()
return NewLocalFileSystemStorageProvider(), nil
case "AWS S3":
return NewAwsS3StorageProvider(clientId, clientSecret, region, bucket, endpoint)
return NewAwsS3StorageProvider(clientId, clientSecret, region, bucket, endpoint), nil
case "MinIO":
return NewMinIOS3StorageProvider(clientId, clientSecret, "_", bucket, endpoint)
return NewMinIOS3StorageProvider(clientId, clientSecret, "_", bucket, endpoint), nil
case "Aliyun OSS":
return NewAliyunOssStorageProvider(clientId, clientSecret, region, bucket, endpoint)
return NewAliyunOssStorageProvider(clientId, clientSecret, region, bucket, endpoint), nil
case "Tencent Cloud COS":
return NewTencentCloudCosStorageProvider(clientId, clientSecret, region, bucket, endpoint)
return NewTencentCloudCosStorageProvider(clientId, clientSecret, region, bucket, endpoint), nil
case "Azure Blob":
return NewAzureBlobStorageProvider(clientId, clientSecret, region, bucket, endpoint)
return NewAzureBlobStorageProvider(clientId, clientSecret, region, bucket, endpoint), nil
case "Qiniu Cloud Kodo":
return NewQiniuCloudKodoStorageProvider(clientId, clientSecret, region, bucket, endpoint)
case "Google Cloud Storage":
return NewGoogleCloudStorageProvider(clientSecret, bucket, endpoint)
return NewGoogleCloudStorageProvider(clientSecret, bucket, endpoint), nil
case "Synology":
return NewSynologyNasStorageProvider(clientId, clientSecret, endpoint)
return NewSynologyNasStorageProvider(clientId, clientSecret, endpoint), nil
}
return nil
return nil, nil
}

View File

@ -12,67 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import React, {Component} from "react";
import React, {Component, Suspense, lazy} from "react";
import "./App.less";
import {Helmet} from "react-helmet";
import * as Setting from "./Setting";
import {StyleProvider, legacyLogicalPropertiesTransformer} from "@ant-design/cssinjs";
import {AppstoreTwoTone, BarsOutlined, DeploymentUnitOutlined, DollarTwoTone, DownOutlined, GithubOutlined, HomeTwoTone, InfoCircleFilled, LockTwoTone, LogoutOutlined, SafetyCertificateTwoTone, SettingOutlined, SettingTwoTone, ShareAltOutlined, WalletTwoTone} from "@ant-design/icons";
import {Alert, Avatar, Button, Card, ConfigProvider, Drawer, Dropdown, FloatButton, Layout, Menu, Result, Tooltip} from "antd";
import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom";
import AccountPage from "./account/AccountPage";
import Dashboard from "./basic/Dashboard";
import ShortcutsPage from "./basic/ShortcutsPage";
import AppListPage from "./basic/AppListPage";
import OrganizationListPage from "./OrganizationListPage";
import OrganizationEditPage from "./OrganizationEditPage";
import GroupEditPage from "./GroupEdit";
import GroupListPage from "./GroupList";
import GroupTreePage from "./GroupTreePage";
import UserListPage from "./UserListPage";
import UserEditPage from "./UserEditPage";
import InvitationListPage from "./InvitationListPage";
import InvitationEditPage from "./InvitationEditPage";
import ApplicationListPage from "./ApplicationListPage";
import ApplicationEditPage from "./ApplicationEditPage";
import ProviderListPage from "./ProviderListPage";
import ProviderEditPage from "./ProviderEditPage";
import ResourceListPage from "./ResourceListPage";
import CertListPage from "./CertListPage";
import CertEditPage from "./CertEditPage";
import RoleListPage from "./RoleListPage";
import RoleEditPage from "./RoleEditPage";
import PermissionListPage from "./PermissionListPage";
import PermissionEditPage from "./PermissionEditPage";
import ModelListPage from "./ModelListPage";
import ModelEditPage from "./ModelEditPage";
import AdapterListPage from "./AdapterListPage";
import AdapterEditPage from "./AdapterEditPage";
import EnforcerEditPage from "./EnforcerEditPage";
import EnforcerListPage from "./EnforcerListPage";
import SessionListPage from "./SessionListPage";
import TokenListPage from "./TokenListPage";
import TokenEditPage from "./TokenEditPage";
import ProductListPage from "./ProductListPage";
import ProductEditPage from "./ProductEditPage";
import ProductBuyPage from "./ProductBuyPage";
import PaymentListPage from "./PaymentListPage";
import PaymentEditPage from "./PaymentEditPage";
import PaymentResultPage from "./PaymentResultPage";
import PricingListPage from "./PricingListPage";
import PricingEditPage from "./PricingEditPage";
import PlanListPage from "./PlanListPage";
import PlanEditPage from "./PlanEditPage";
import SubscriptionListPage from "./SubscriptionListPage";
import SubscriptionEditPage from "./SubscriptionEditPage";
import SystemInfo from "./SystemInfo";
import SyncerListPage from "./SyncerListPage";
import SyncerEditPage from "./SyncerEditPage";
import WebhookListPage from "./WebhookListPage";
import WebhookEditPage from "./WebhookEditPage";
import LdapEditPage from "./LdapEditPage";
import LdapSyncPage from "./LdapSyncPage";
import MfaSetupPage from "./auth/MfaSetupPage";
import {GithubOutlined, InfoCircleFilled, ShareAltOutlined} from "@ant-design/icons";
import {Alert, Button, ConfigProvider, Drawer, FloatButton, Layout, Result, Tooltip} from "antd";
import {Route, Switch, withRouter} from "react-router-dom";
import CustomGithubCorner from "./common/CustomGithubCorner";
import * as Conf from "./Conf";
@ -80,22 +27,13 @@ import * as Auth from "./auth/Auth";
import EntryPage from "./EntryPage";
import * as AuthBackend from "./auth/AuthBackend";
import AuthCallback from "./auth/AuthCallback";
import OdicDiscoveryPage from "./auth/OidcDiscoveryPage";
import SamlCallback from "./auth/SamlCallback";
import i18next from "i18next";
import {withTranslation} from "react-i18next";
import EnableMfaNotification from "./common/notifaction/EnableMfaNotification";
import LanguageSelect from "./common/select/LanguageSelect";
import ThemeSelect from "./common/select/ThemeSelect";
import OrganizationSelect from "./common/select/OrganizationSelect";
import {clearWeb3AuthToken} from "./auth/Web3Auth";
import AccountAvatar from "./account/AccountAvatar";
import OpenTour from "./common/OpenTour";
const {Header, Footer, Content} = Layout;
const ManagementPage = lazy(() => import("./ManagementPage"));
const {Footer, Content} = Layout;
import {setTwoToneColor} from "@ant-design/icons";
import RecordListPage from "./RecordListPage";
setTwoToneColor("rgb(87,52,211)");
@ -113,7 +51,6 @@ class App extends Component {
selectedMenuKey: 0,
account: undefined,
uri: null,
menuVisible: false,
themeAlgorithm: storageThemeAlgorithm,
themeData: Conf.ThemeDefault,
logo: this.getLogo(storageThemeAlgorithm),
@ -292,391 +229,12 @@ class App extends Component {
});
}
logout() {
this.setState({
expired: false,
submitted: false,
});
AuthBackend.logout()
.then((res) => {
if (res.status === "ok") {
const owner = this.state.account.owner;
this.setState({
account: null,
themeAlgorithm: ["default"],
});
clearWeb3AuthToken();
Setting.showMessage("success", i18next.t("application:Logged out successfully"));
const redirectUri = res.data2;
if (redirectUri !== null && redirectUri !== undefined && redirectUri !== "") {
Setting.goToLink(redirectUri);
} else if (owner !== "built-in") {
Setting.goToLink(`${window.location.origin}/login/${owner}`);
} else {
Setting.goToLinkSoft(this, "/");
}
} else {
Setting.showMessage("error", `Failed to log out: ${res.msg}`);
}
});
}
onUpdateAccount(account) {
this.setState({
account: account,
});
}
renderAvatar() {
if (this.state.account.avatar === "") {
return (
<Avatar style={{backgroundColor: Setting.getAvatarColor(this.state.account.name), verticalAlign: "middle"}} size="large">
{Setting.getShortName(this.state.account.name)}
</Avatar>
);
} else {
return (
<Avatar src={this.state.account.avatar} style={{verticalAlign: "middle"}} size="large"
icon={<AccountAvatar src={this.state.account.avatar} style={{verticalAlign: "middle"}} size={40} />}
>
{Setting.getShortName(this.state.account.name)}
</Avatar>
);
}
}
renderRightDropdown() {
const items = [];
if (this.state.requiredEnableMfa === false) {
items.push(Setting.getItem(<><SettingOutlined />&nbsp;&nbsp;{i18next.t("account:My Account")}</>,
"/account"
));
}
items.push(Setting.getItem(<><LogoutOutlined />&nbsp;&nbsp;{i18next.t("account:Logout")}</>,
"/logout"));
const onClick = (e) => {
if (e.key === "/account") {
this.props.history.push("/account");
} else if (e.key === "/subscription") {
this.props.history.push("/subscription");
} else if (e.key === "/logout") {
this.logout();
}
};
return (
<Dropdown key="/rightDropDown" menu={{items, onClick}} >
<div className="rightDropDown">
{
this.renderAvatar()
}
&nbsp;
&nbsp;
{Setting.isMobile() ? null : Setting.getShortText(Setting.getNameAtLeast(this.state.account.displayName), 30)} &nbsp; <DownOutlined />
&nbsp;
&nbsp;
&nbsp;
</div>
</Dropdown>
);
}
renderAccountMenu() {
if (this.state.account === undefined) {
return null;
} else if (this.state.account === null) {
return (
<React.Fragment>
<LanguageSelect />
</React.Fragment>
);
} else {
return (
<React.Fragment>
{this.renderRightDropdown()}
<ThemeSelect
themeAlgorithm={this.state.themeAlgorithm}
onChange={(nextThemeAlgorithm) => {
this.setState({
themeAlgorithm: nextThemeAlgorithm,
logo: this.getLogo(nextThemeAlgorithm),
});
localStorage.setItem("themeAlgorithm", JSON.stringify(nextThemeAlgorithm));
}} />
<LanguageSelect languages={this.state.account.organization.languages} />
<Tooltip title="Click to open AI assitant">
<div className="select-box" onClick={() => {
this.setState({
isAiAssistantOpen: true,
});
}}>
<DeploymentUnitOutlined style={{fontSize: "24px"}} />
</div>
</Tooltip>
<OpenTour />
{Setting.isAdminUser(this.state.account) && !Setting.isMobile() && (this.state.uri.indexOf("/trees") === -1) &&
<OrganizationSelect
initValue={Setting.getOrganization()}
withAll={true}
style={{marginRight: "20px", width: "180px", display: "flex"}}
onChange={(value) => {
Setting.setOrganization(value);
}}
className="select-box"
/>
}
</React.Fragment>
);
}
}
getMenuItems() {
const res = [];
if (this.state.account === null || this.state.account === undefined) {
return [];
}
const textColor = this.state.themeAlgorithm.includes("dark") ? "white" : "black";
const twoToneColor = this.state.themeData.colorPrimary;
res.push(Setting.getItem(<Link style={{color: textColor}} to="/">{i18next.t("general:Home")}</Link>, "/home", <HomeTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/">{i18next.t("general:Dashboard")}</Link>, "/"),
Setting.getItem(<Link to="/shortcuts">{i18next.t("general:Shortcuts")}</Link>, "/shortcuts"),
Setting.getItem(<Link to="/apps">{i18next.t("general:Apps")}</Link>, "/apps"),
].filter(item => {
return Setting.isLocalAdminUser(this.state.account);
})));
if (Setting.isLocalAdminUser(this.state.account)) {
if (Conf.ShowGithubCorner) {
res.push(Setting.getItem(<a href={"https://casdoor.com"}>
<span style={{fontWeight: "bold", backgroundColor: "rgba(87,52,211,0.4)", marginTop: "12px", paddingLeft: "5px", paddingRight: "5px", display: "flex", alignItems: "center", height: "40px", borderRadius: "5px"}}>
🚀 SaaS Hosting 🔥
</span>
</a>, "#"));
}
res.push(Setting.getItem(<Link style={{color: textColor}} to="/organizations">{i18next.t("general:User Management")}</Link>, "/orgs", <AppstoreTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/organizations">{i18next.t("general:Organizations")}</Link>, "/organizations"),
Setting.getItem(<Link to="/groups">{i18next.t("general:Groups")}</Link>, "/groups"),
Setting.getItem(<Link to="/users">{i18next.t("general:Users")}</Link>, "/users"),
Setting.getItem(<Link to="/invitations">{i18next.t("general:Invitations")}</Link>, "/invitations"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/applications">{i18next.t("general:Identity")}</Link>, "/identity", <LockTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/applications">{i18next.t("general:Applications")}</Link>, "/applications"),
Setting.getItem(<Link to="/providers">{i18next.t("general:Providers")}</Link>, "/providers"),
Setting.getItem(<Link to="/resources">{i18next.t("general:Resources")}</Link>, "/resources"),
Setting.getItem(<Link to="/certs">{i18next.t("general:Certs")}</Link>, "/certs"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/roles">{i18next.t("general:Authorization")}</Link>, "/auth", <SafetyCertificateTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/roles">{i18next.t("general:Roles")}</Link>, "/roles"),
Setting.getItem(<Link to="/permissions">{i18next.t("general:Permissions")}</Link>, "/permissions"),
Setting.getItem(<Link to="/models">{i18next.t("general:Models")}</Link>, "/models"),
Setting.getItem(<Link to="/adapters">{i18next.t("general:Adapters")}</Link>, "/adapters"),
Setting.getItem(<Link to="/enforcers">{i18next.t("general:Enforcers")}</Link>, "/enforcers"),
].filter(item => {
if (!Setting.isLocalAdminUser(this.state.account) && ["/models", "/adapters", "/enforcers"].includes(item.key)) {
return false;
} else {
return true;
}
})));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/sessions">{i18next.t("general:Logging & Auditing")}</Link>, "/logs", <WalletTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/sessions">{i18next.t("general:Sessions")}</Link>, "/sessions"),
Conf.CasvisorUrl ? Setting.getItem(<a target="_blank" rel="noreferrer" href={Conf.CasvisorUrl}>{i18next.t("general:Records")}</a>, "/records")
: Setting.getItem(<Link to="/records">{i18next.t("general:Records")}</Link>, "/records"),
Setting.getItem(<Link to="/tokens">{i18next.t("general:Tokens")}</Link>, "/tokens"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/products">{i18next.t("general:Business & Payments")}</Link>, "/business", <DollarTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/products">{i18next.t("general:Products")}</Link>, "/products"),
Setting.getItem(<Link to="/payments">{i18next.t("general:Payments")}</Link>, "/payments"),
Setting.getItem(<Link to="/plans">{i18next.t("general:Plans")}</Link>, "/plans"),
Setting.getItem(<Link to="/pricings">{i18next.t("general:Pricings")}</Link>, "/pricings"),
Setting.getItem(<Link to="/subscriptions">{i18next.t("general:Subscriptions")}</Link>, "/subscriptions"),
]));
if (Setting.isAdminUser(this.state.account)) {
res.push(Setting.getItem(<Link style={{color: textColor}} to="/sysinfo">{i18next.t("general:Admin")}</Link>, "/admin", <SettingTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/sysinfo">{i18next.t("general:System Info")}</Link>, "/sysinfo"),
Setting.getItem(<Link to="/syncers">{i18next.t("general:Syncers")}</Link>, "/syncers"),
Setting.getItem(<Link to="/webhooks">{i18next.t("general:Webhooks")}</Link>, "/webhooks"),
Setting.getItem(<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>{i18next.t("general:Swagger")}</a>, "/swagger")]));
} else {
res.push(Setting.getItem(<Link style={{color: textColor}} to="/syncers">{i18next.t("general:Admin")}</Link>, "/admin", <SettingTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/syncers">{i18next.t("general:Syncers")}</Link>, "/syncers"),
Setting.getItem(<Link to="/webhooks">{i18next.t("general:Webhooks")}</Link>, "/webhooks")]));
}
}
return res;
}
renderLoginIfNotLoggedIn(component) {
if (this.state.account === null) {
sessionStorage.setItem("from", window.location.pathname);
return <Redirect to="/login" />;
} else if (this.state.account === undefined) {
return null;
} else {
return component;
}
}
renderRouter() {
return (
<Switch>
<Route exact path="/" render={(props) => this.renderLoginIfNotLoggedIn(<Dashboard account={this.state.account} {...props} />)} />
<Route exact path="/apps" render={(props) => this.renderLoginIfNotLoggedIn(<AppListPage account={this.state.account} {...props} />)} />
<Route exact path="/shortcuts" render={(props) => this.renderLoginIfNotLoggedIn(<ShortcutsPage account={this.state.account} {...props} />)} />
<Route exact path="/account" render={(props) => this.renderLoginIfNotLoggedIn(<AccountPage account={this.state.account} {...props} />)} />
<Route exact path="/organizations" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationListPage account={this.state.account} {...props} />)} />
<Route exact path="/organizations/:organizationName" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationEditPage account={this.state.account} onChangeTheme={this.setTheme} {...props} />)} />
<Route exact path="/organizations/:organizationName/users" render={(props) => this.renderLoginIfNotLoggedIn(<UserListPage account={this.state.account} {...props} />)} />
<Route exact path="/trees/:organizationName" render={(props) => this.renderLoginIfNotLoggedIn(<GroupTreePage account={this.state.account} {...props} />)} />
<Route exact path="/trees/:organizationName/:groupName" render={(props) => this.renderLoginIfNotLoggedIn(<GroupTreePage account={this.state.account} {...props} />)} />
<Route exact path="/groups" render={(props) => this.renderLoginIfNotLoggedIn(<GroupListPage account={this.state.account} {...props} />)} />
<Route exact path="/groups/:organizationName/:groupName" render={(props) => this.renderLoginIfNotLoggedIn(<GroupEditPage account={this.state.account} {...props} />)} />
<Route exact path="/users" render={(props) => this.renderLoginIfNotLoggedIn(<UserListPage account={this.state.account} {...props} />)} />
<Route exact path="/users/:organizationName/:userName" render={(props) => <UserEditPage account={this.state.account} {...props} />} />
<Route exact path="/invitations" render={(props) => this.renderLoginIfNotLoggedIn(<InvitationListPage account={this.state.account} {...props} />)} />
<Route exact path="/invitations/:organizationName/:invitationName" render={(props) => this.renderLoginIfNotLoggedIn(<InvitationEditPage account={this.state.account} {...props} />)} />
<Route exact path="/applications" render={(props) => this.renderLoginIfNotLoggedIn(<ApplicationListPage account={this.state.account} {...props} />)} />
<Route exact path="/applications/:organizationName/:applicationName" render={(props) => this.renderLoginIfNotLoggedIn(<ApplicationEditPage account={this.state.account} {...props} />)} />
<Route exact path="/providers" render={(props) => this.renderLoginIfNotLoggedIn(<ProviderListPage account={this.state.account} {...props} />)} />
<Route exact path="/providers/:organizationName/:providerName" render={(props) => this.renderLoginIfNotLoggedIn(<ProviderEditPage account={this.state.account} {...props} />)} />
<Route exact path="/records" render={(props) => this.renderLoginIfNotLoggedIn(<RecordListPage account={this.state.account} {...props} />)} />
<Route exact path="/resources" render={(props) => this.renderLoginIfNotLoggedIn(<ResourceListPage account={this.state.account} {...props} />)} />
<Route exact path="/certs" render={(props) => this.renderLoginIfNotLoggedIn(<CertListPage account={this.state.account} {...props} />)} />
<Route exact path="/certs/:organizationName/:certName" render={(props) => this.renderLoginIfNotLoggedIn(<CertEditPage account={this.state.account} {...props} />)} />
<Route exact path="/roles" render={(props) => this.renderLoginIfNotLoggedIn(<RoleListPage account={this.state.account} {...props} />)} />
<Route exact path="/roles/:organizationName/:roleName" render={(props) => this.renderLoginIfNotLoggedIn(<RoleEditPage account={this.state.account} {...props} />)} />
<Route exact path="/permissions" render={(props) => this.renderLoginIfNotLoggedIn(<PermissionListPage account={this.state.account} {...props} />)} />
<Route exact path="/permissions/:organizationName/:permissionName" render={(props) => this.renderLoginIfNotLoggedIn(<PermissionEditPage account={this.state.account} {...props} />)} />
<Route exact path="/models" render={(props) => this.renderLoginIfNotLoggedIn(<ModelListPage account={this.state.account} {...props} />)} />
<Route exact path="/models/:organizationName/:modelName" render={(props) => this.renderLoginIfNotLoggedIn(<ModelEditPage account={this.state.account} {...props} />)} />
<Route exact path="/adapters" render={(props) => this.renderLoginIfNotLoggedIn(<AdapterListPage account={this.state.account} {...props} />)} />
<Route exact path="/adapters/:organizationName/:adapterName" render={(props) => this.renderLoginIfNotLoggedIn(<AdapterEditPage account={this.state.account} {...props} />)} />
<Route exact path="/enforcers" render={(props) => this.renderLoginIfNotLoggedIn(<EnforcerListPage account={this.state.account} {...props} />)} />
<Route exact path="/enforcers/:organizationName/:enforcerName" render={(props) => this.renderLoginIfNotLoggedIn(<EnforcerEditPage account={this.state.account} {...props} />)} />
<Route exact path="/sessions" render={(props) => this.renderLoginIfNotLoggedIn(<SessionListPage account={this.state.account} {...props} />)} />
<Route exact path="/tokens" render={(props) => this.renderLoginIfNotLoggedIn(<TokenListPage account={this.state.account} {...props} />)} />
<Route exact path="/tokens/:tokenName" render={(props) => this.renderLoginIfNotLoggedIn(<TokenEditPage account={this.state.account} {...props} />)} />
<Route exact path="/products" render={(props) => this.renderLoginIfNotLoggedIn(<ProductListPage account={this.state.account} {...props} />)} />
<Route exact path="/products/:organizationName/:productName" render={(props) => this.renderLoginIfNotLoggedIn(<ProductEditPage account={this.state.account} {...props} />)} />
<Route exact path="/products/:organizationName/:productName/buy" render={(props) => this.renderLoginIfNotLoggedIn(<ProductBuyPage account={this.state.account} {...props} />)} />
<Route exact path="/payments" render={(props) => this.renderLoginIfNotLoggedIn(<PaymentListPage account={this.state.account} {...props} />)} />
<Route exact path="/payments/:organizationName/:paymentName" render={(props) => this.renderLoginIfNotLoggedIn(<PaymentEditPage account={this.state.account} {...props} />)} />
<Route exact path="/payments/:organizationName/:paymentName/result" render={(props) => this.renderLoginIfNotLoggedIn(<PaymentResultPage account={this.state.account} {...props} />)} />
<Route exact path="/plans" render={(props) => this.renderLoginIfNotLoggedIn(<PlanListPage account={this.state.account} {...props} />)} />
<Route exact path="/plans/:organizationName/:planName" render={(props) => this.renderLoginIfNotLoggedIn(<PlanEditPage account={this.state.account} {...props} />)} />
<Route exact path="/pricings" render={(props) => this.renderLoginIfNotLoggedIn(<PricingListPage account={this.state.account} {...props} />)} />
<Route exact path="/pricings/:organizationName/:pricingName" render={(props) => this.renderLoginIfNotLoggedIn(<PricingEditPage account={this.state.account} {...props} />)} />
<Route exact path="/subscriptions" render={(props) => this.renderLoginIfNotLoggedIn(<SubscriptionListPage account={this.state.account} {...props} />)} />
<Route exact path="/subscriptions/:organizationName/:subscriptionName" render={(props) => this.renderLoginIfNotLoggedIn(<SubscriptionEditPage account={this.state.account} {...props} />)} />
<Route exact path="/sysinfo" render={(props) => this.renderLoginIfNotLoggedIn(<SystemInfo account={this.state.account} {...props} />)} />
<Route exact path="/syncers" render={(props) => this.renderLoginIfNotLoggedIn(<SyncerListPage account={this.state.account} {...props} />)} />
<Route exact path="/syncers/:syncerName" render={(props) => this.renderLoginIfNotLoggedIn(<SyncerEditPage account={this.state.account} {...props} />)} />
<Route exact path="/webhooks" render={(props) => this.renderLoginIfNotLoggedIn(<WebhookListPage account={this.state.account} {...props} />)} />
<Route exact path="/webhooks/:webhookName" render={(props) => this.renderLoginIfNotLoggedIn(<WebhookEditPage account={this.state.account} {...props} />)} />
<Route exact path="/ldap/:organizationName/:ldapId" render={(props) => this.renderLoginIfNotLoggedIn(<LdapEditPage account={this.state.account} {...props} />)} />
<Route exact path="/ldap/sync/:organizationName/:ldapId" render={(props) => this.renderLoginIfNotLoggedIn(<LdapSyncPage account={this.state.account} {...props} />)} />
<Route exact path="/mfa/setup" render={(props) => this.renderLoginIfNotLoggedIn(<MfaSetupPage account={this.state.account} onfinish={() => this.setState({requiredEnableMfa: false})} {...props} />)} />
<Route exact path="/.well-known/openid-configuration" render={(props) => <OdicDiscoveryPage />} />
<Route path="" render={() => <Result status="404" title="404 NOT FOUND" subTitle={i18next.t("general:Sorry, the page you visited does not exist.")}
extra={<a href="/"><Button type="primary">{i18next.t("general:Back Home")}</Button></a>} />} />
</Switch>
);
}
onClose = () => {
this.setState({
menuVisible: false,
});
};
showMenu = () => {
this.setState({
menuVisible: true,
});
};
isWithoutCard() {
return Setting.isMobile() || window.location.pathname.startsWith("/trees");
}
renderContent() {
const onClick = ({key}) => {
if (key !== "/swagger" && key !== "/records") {
if (this.state.requiredEnableMfa) {
Setting.showMessage("info", "Please enable MFA first!");
} else {
this.props.history.push(key);
}
}
};
const menuStyleRight = Setting.isAdminUser(this.state.account) && !Setting.isMobile() ? "calc(180px + 280px)" : "280px";
return (
<Layout id="parent-area">
<EnableMfaNotification account={this.state.account} />
<Header style={{padding: "0", marginBottom: "3px", backgroundColor: this.state.themeAlgorithm.includes("dark") ? "black" : "white"}} >
{Setting.isMobile() ? null : (
<Link to={"/"}>
<div className="logo" style={{background: `url(${this.state.logo})`}} />
</Link>
)}
{this.state.requiredEnableMfa || (Setting.isMobile() ?
<React.Fragment>
<Drawer title={i18next.t("general:Close")} placement="left" visible={this.state.menuVisible} onClose={this.onClose}>
<Menu
items={this.getMenuItems()}
mode={"inline"}
selectedKeys={[this.state.selectedMenuKey]}
style={{lineHeight: "64px"}}
onClick={this.onClose}
>
</Menu>
</Drawer>
<Button icon={<BarsOutlined />} onClick={this.showMenu} type="text">
{i18next.t("general:Menu")}
</Button>
</React.Fragment> :
<Menu
onClick={onClick}
items={this.getMenuItems()}
mode={"horizontal"}
selectedKeys={[this.state.selectedMenuKey]}
style={{position: "absolute", left: "145px", right: menuStyleRight, backgroundColor: this.state.themeAlgorithm.includes("dark") ? "black" : "white"}}
/>
)}
{
this.renderAccountMenu()
}
</Header>
<Content style={{display: "flex", flexDirection: "column"}} >
{this.isWithoutCard() ?
this.renderRouter() :
<Card className="content-warp-card">
{this.renderRouter()}
</Card>
}
</Content>
{
this.renderFooter()
}
{
this.renderAiAssistant()
}
</Layout>
);
}
renderFooter() {
return (
<React.Fragment>
@ -748,6 +306,16 @@ class App extends Component {
window.location.pathname.startsWith("/qrcode") ;
}
onClick = ({key}) => {
if (key !== "/swagger" && key !== "/records") {
if (this.state.requiredEnableMfa) {
Setting.showMessage("info", "Please enable MFA first!");
} else {
this.props.history.push(key);
}
}
};
renderPage() {
if (this.isDoorPages()) {
return (
@ -790,7 +358,6 @@ class App extends Component {
</ConfigProvider>
);
}
return (
<React.Fragment>
{/* { */}
@ -799,7 +366,49 @@ class App extends Component {
<FloatButton.BackTop />
<CustomGithubCorner />
{
this.renderContent()
<Suspense fallback={<div>loading</div>}>
<Layout id="parent-area">
<ManagementPage
account={this.state.account}
uri={this.state.uri}
themeData={this.state.themeData}
themeAlgorithm={this.state.themeAlgorithm}
selectedMenuKey={this.state.selectedMenuKey}
requiredEnableMfa={this.state.requiredEnableMfa}
menuVisible={this.state.menuVisible}
logo={this.state.logo}
onChangeTheme={this.setTheme}
onClick = {this.onClick}
onfinish={() => {
this.setState({requiredEnableMfa: false});
}}
openAiAssistant={() => {
this.setState({
isAiAssistantOpen: true,
});
}}
setLogoAndThemeAlgorithm={(nextThemeAlgorithm) => {
this.setState({
themeAlgorithm: nextThemeAlgorithm,
logo: this.getLogo(nextThemeAlgorithm),
});
localStorage.setItem("themeAlgorithm", JSON.stringify(nextThemeAlgorithm));
}}
setLogoutState={() => {
this.setState({
account: null,
themeAlgorithm: ["default"],
});
}}
/>
{
this.renderFooter()
}
{
this.renderAiAssistant()
}
</Layout>
</Suspense>
}
</React.Fragment>
);

View File

@ -760,7 +760,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row>
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("application:Form CSS"), i18next.t("application:Form CSS - Tooltip"))} :
{Setting.getLabel(i18next.t("application:Custom CSS"), i18next.t("application:Custom CSS - Tooltip"))} :
</Col>
<Col span={22}>
<Popover placement="right" content={
@ -772,7 +772,7 @@ class ApplicationEditPage extends React.Component {
}}
/>
</div>
} title={i18next.t("application:Form CSS - Edit")} trigger="click">
} title={i18next.t("application:Custom CSS - Edit")} trigger="click">
<Input value={this.state.application.formCss} style={{marginBottom: "10px"}} onChange={e => {
this.updateApplicationField("formCss", e.target.value);
}} />
@ -781,7 +781,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row>
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("application:Form CSS Mobile"), i18next.t("application:Form CSS Mobile - Tooltip"))} :
{Setting.getLabel(i18next.t("application:Custom CSS Mobile"), i18next.t("application:Custom CSS Mobile - Tooltip"))} :
</Col>
<Col span={22}>
<Popover placement="right" content={
@ -793,7 +793,7 @@ class ApplicationEditPage extends React.Component {
}}
/>
</div>
} title={i18next.t("application:Form CSS Mobile - Edit")} trigger="click">
} title={i18next.t("application:Custom CSS Mobile - Edit")} trigger="click">
<Input value={this.state.application.formCssMobile} style={{marginBottom: "10px"}} onChange={e => {
this.updateApplicationField("formCssMobile", e.target.value);
}} />

448
web/src/ManagementPage.js Normal file
View File

@ -0,0 +1,448 @@
// Copyright 2024 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.
import * as Setting from "./Setting";
import {Avatar, Button, Card, Drawer, Dropdown, Menu, Result, Tooltip} from "antd";
import EnableMfaNotification from "./common/notifaction/EnableMfaNotification";
import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom";
import React, {useState} from "react";
import i18next from "i18next";
import {
AppstoreTwoTone,
BarsOutlined, DeploymentUnitOutlined, DollarTwoTone, DownOutlined,
HomeTwoTone,
LockTwoTone, LogoutOutlined,
SafetyCertificateTwoTone, SettingOutlined, SettingTwoTone,
WalletTwoTone
} from "@ant-design/icons";
import Dashboard from "./basic/Dashboard";
import AppListPage from "./basic/AppListPage";
import ShortcutsPage from "./basic/ShortcutsPage";
import AccountPage from "./account/AccountPage";
import OrganizationListPage from "./OrganizationListPage";
import OrganizationEditPage from "./OrganizationEditPage";
import UserListPage from "./UserListPage";
import GroupTreePage from "./GroupTreePage";
import GroupListPage from "./GroupList";
import GroupEditPage from "./GroupEdit";
import UserEditPage from "./UserEditPage";
import InvitationListPage from "./InvitationListPage";
import InvitationEditPage from "./InvitationEditPage";
import ApplicationListPage from "./ApplicationListPage";
import ApplicationEditPage from "./ApplicationEditPage";
import ProviderListPage from "./ProviderListPage";
import ProviderEditPage from "./ProviderEditPage";
import RecordListPage from "./RecordListPage";
import ResourceListPage from "./ResourceListPage";
import CertListPage from "./CertListPage";
import CertEditPage from "./CertEditPage";
import RoleListPage from "./RoleListPage";
import RoleEditPage from "./RoleEditPage";
import PermissionListPage from "./PermissionListPage";
import PermissionEditPage from "./PermissionEditPage";
import ModelListPage from "./ModelListPage";
import ModelEditPage from "./ModelEditPage";
import AdapterListPage from "./AdapterListPage";
import AdapterEditPage from "./AdapterEditPage";
import EnforcerListPage from "./EnforcerListPage";
import EnforcerEditPage from "./EnforcerEditPage";
import SessionListPage from "./SessionListPage";
import TokenListPage from "./TokenListPage";
import TokenEditPage from "./TokenEditPage";
import ProductListPage from "./ProductListPage";
import ProductEditPage from "./ProductEditPage";
import ProductBuyPage from "./ProductBuyPage";
import PaymentListPage from "./PaymentListPage";
import PaymentEditPage from "./PaymentEditPage";
import PaymentResultPage from "./PaymentResultPage";
import PlanListPage from "./PlanListPage";
import PlanEditPage from "./PlanEditPage";
import PricingListPage from "./PricingListPage";
import PricingEditPage from "./PricingEditPage";
import SubscriptionListPage from "./SubscriptionListPage";
import SubscriptionEditPage from "./SubscriptionEditPage";
import SystemInfo from "./SystemInfo";
import SyncerListPage from "./SyncerListPage";
import SyncerEditPage from "./SyncerEditPage";
import WebhookListPage from "./WebhookListPage";
import WebhookEditPage from "./WebhookEditPage";
import LdapEditPage from "./LdapEditPage";
import LdapSyncPage from "./LdapSyncPage";
import MfaSetupPage from "./auth/MfaSetupPage";
import OdicDiscoveryPage from "./auth/OidcDiscoveryPage";
import * as Conf from "./Conf";
import LanguageSelect from "./common/select/LanguageSelect";
import ThemeSelect from "./common/select/ThemeSelect";
import OpenTour from "./common/OpenTour";
import OrganizationSelect from "./common/select/OrganizationSelect";
import AccountAvatar from "./account/AccountAvatar";
import {Content, Header} from "antd/es/layout/layout";
import * as AuthBackend from "./auth/AuthBackend";
import {clearWeb3AuthToken} from "./auth/Web3Auth";
import TransactionListPage from "./TransactionListPage";
import TransactionEditPage from "./TransactionEditPage";
function ManagementPage(props) {
const [menuVisible, setMenuVisible] = useState(false);
function logout() {
AuthBackend.logout()
.then((res) => {
if (res.status === "ok") {
const owner = props.account.owner;
props.setLogoutState();
clearWeb3AuthToken();
Setting.showMessage("success", i18next.t("application:Logged out successfully"));
const redirectUri = res.data2;
if (redirectUri !== null && redirectUri !== undefined && redirectUri !== "") {
Setting.goToLink(redirectUri);
} else if (owner !== "built-in") {
Setting.goToLink(`${window.location.origin}/login/${owner}`);
} else {
Setting.goToLinkSoft({props}, "/");
}
} else {
Setting.showMessage("error", `Failed to log out: ${res.msg}`);
}
});
}
function renderAvatar() {
if (props.account.avatar === "") {
return (
<Avatar style={{backgroundColor: Setting.getAvatarColor(props.account.name), verticalAlign: "middle"}} size="large">
{Setting.getShortName(props.account.name)}
</Avatar>
);
} else {
return (
<Avatar src={props.account.avatar} style={{verticalAlign: "middle"}} size="large"
icon={<AccountAvatar src={props.account.avatar} style={{verticalAlign: "middle"}} size={40} />}
>
{Setting.getShortName(props.account.name)}
</Avatar>
);
}
}
function renderRightDropdown() {
const items = [];
if (props.requiredEnableMfa === false) {
items.push(Setting.getItem(<><SettingOutlined />&nbsp;&nbsp;{i18next.t("account:My Account")}</>,
"/account"
));
}
items.push(Setting.getItem(<><LogoutOutlined />&nbsp;&nbsp;{i18next.t("account:Logout")}</>,
"/logout"));
const onClick = (e) => {
if (e.key === "/account") {
props.history.push("/account");
} else if (e.key === "/subscription") {
props.history.push("/subscription");
} else if (e.key === "/logout") {
logout();
}
};
return (
<Dropdown key="/rightDropDown" menu={{items, onClick}} >
<div className="rightDropDown">
{
renderAvatar()
}
&nbsp;
&nbsp;
{Setting.isMobile() ? null : Setting.getShortText(Setting.getNameAtLeast(props.account.displayName), 30)} &nbsp; <DownOutlined />
&nbsp;
&nbsp;
&nbsp;
</div>
</Dropdown>
);
}
function renderAccountMenu() {
if (props.account === undefined) {
return null;
} else if (props.account === null) {
return (
<React.Fragment>
<LanguageSelect />
</React.Fragment>
);
} else {
return (
<React.Fragment>
{renderRightDropdown()}
<ThemeSelect
themeAlgorithm={props.themeAlgorithm}
onChange={props.setLogoAndThemeAlgorithm} />
<LanguageSelect languages={props.account.organization.languages} />
<Tooltip title="Click to open AI assitant">
<div className="select-box" onClick={props.openAiAssistant}>
<DeploymentUnitOutlined style={{fontSize: "24px"}} />
</div>
</Tooltip>
<OpenTour />
{Setting.isAdminUser(props.account) && !Setting.isMobile() && (props.uri.indexOf("/trees") === -1) &&
<OrganizationSelect
initValue={Setting.getOrganization()}
withAll={true}
style={{marginRight: "20px", width: "180px", display: "flex"}}
onChange={(value) => {
Setting.setOrganization(value);
}}
className="select-box"
/>
}
</React.Fragment>
);
}
}
function getMenuItems() {
const res = [];
if (props.account === null || props.account === undefined) {
return [];
}
const textColor = props.themeAlgorithm.includes("dark") ? "white" : "black";
const twoToneColor = props.themeData.colorPrimary;
res.push(Setting.getItem(<Link style={{color: textColor}} to="/">{i18next.t("general:Home")}</Link>, "/home", <HomeTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/">{i18next.t("general:Dashboard")}</Link>, "/"),
Setting.getItem(<Link to="/shortcuts">{i18next.t("general:Shortcuts")}</Link>, "/shortcuts"),
Setting.getItem(<Link to="/apps">{i18next.t("general:Apps")}</Link>, "/apps"),
].filter(item => {
return Setting.isLocalAdminUser(props.account);
})));
if (Setting.isLocalAdminUser(props.account)) {
if (Conf.ShowGithubCorner) {
res.push(Setting.getItem(<a href={"https://casdoor.com"}>
<span style={{fontWeight: "bold", backgroundColor: "rgba(87,52,211,0.4)", marginTop: "12px", paddingLeft: "5px", paddingRight: "5px", display: "flex", alignItems: "center", height: "40px", borderRadius: "5px"}}>
🚀 SaaS Hosting 🔥
</span>
</a>, "#"));
}
res.push(Setting.getItem(<Link style={{color: textColor}} to="/organizations">{i18next.t("general:User Management")}</Link>, "/orgs", <AppstoreTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/organizations">{i18next.t("general:Organizations")}</Link>, "/organizations"),
Setting.getItem(<Link to="/groups">{i18next.t("general:Groups")}</Link>, "/groups"),
Setting.getItem(<Link to="/users">{i18next.t("general:Users")}</Link>, "/users"),
Setting.getItem(<Link to="/invitations">{i18next.t("general:Invitations")}</Link>, "/invitations"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/applications">{i18next.t("general:Identity")}</Link>, "/identity", <LockTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/applications">{i18next.t("general:Applications")}</Link>, "/applications"),
Setting.getItem(<Link to="/providers">{i18next.t("general:Providers")}</Link>, "/providers"),
Setting.getItem(<Link to="/resources">{i18next.t("general:Resources")}</Link>, "/resources"),
Setting.getItem(<Link to="/certs">{i18next.t("general:Certs")}</Link>, "/certs"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/roles">{i18next.t("general:Authorization")}</Link>, "/auth", <SafetyCertificateTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/roles">{i18next.t("general:Roles")}</Link>, "/roles"),
Setting.getItem(<Link to="/permissions">{i18next.t("general:Permissions")}</Link>, "/permissions"),
Setting.getItem(<Link to="/models">{i18next.t("general:Models")}</Link>, "/models"),
Setting.getItem(<Link to="/adapters">{i18next.t("general:Adapters")}</Link>, "/adapters"),
Setting.getItem(<Link to="/enforcers">{i18next.t("general:Enforcers")}</Link>, "/enforcers"),
].filter(item => {
if (!Setting.isLocalAdminUser(props.account) && ["/models", "/adapters", "/enforcers"].includes(item.key)) {
return false;
} else {
return true;
}
})));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/sessions">{i18next.t("general:Logging & Auditing")}</Link>, "/logs", <WalletTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/sessions">{i18next.t("general:Sessions")}</Link>, "/sessions"),
Conf.CasvisorUrl ? Setting.getItem(<a target="_blank" rel="noreferrer" href={Conf.CasvisorUrl}>{i18next.t("general:Records")}</a>, "/records")
: Setting.getItem(<Link to="/records">{i18next.t("general:Records")}</Link>, "/records"),
Setting.getItem(<Link to="/tokens">{i18next.t("general:Tokens")}</Link>, "/tokens"),
]));
res.push(Setting.getItem(<Link style={{color: textColor}} to="/products">{i18next.t("general:Business & Payments")}</Link>, "/business", <DollarTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/products">{i18next.t("general:Products")}</Link>, "/products"),
Setting.getItem(<Link to="/payments">{i18next.t("general:Payments")}</Link>, "/payments"),
Setting.getItem(<Link to="/plans">{i18next.t("general:Plans")}</Link>, "/plans"),
Setting.getItem(<Link to="/pricings">{i18next.t("general:Pricings")}</Link>, "/pricings"),
Setting.getItem(<Link to="/subscriptions">{i18next.t("general:Subscriptions")}</Link>, "/subscriptions"),
Setting.getItem(<Link to="/transactions">{i18next.t("general:Transactions")}</Link>, "/transactions"),
]));
if (Setting.isAdminUser(props.account)) {
res.push(Setting.getItem(<Link style={{color: textColor}} to="/sysinfo">{i18next.t("general:Admin")}</Link>, "/admin", <SettingTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/sysinfo">{i18next.t("general:System Info")}</Link>, "/sysinfo"),
Setting.getItem(<Link to="/syncers">{i18next.t("general:Syncers")}</Link>, "/syncers"),
Setting.getItem(<Link to="/webhooks">{i18next.t("general:Webhooks")}</Link>, "/webhooks"),
Setting.getItem(<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>{i18next.t("general:Swagger")}</a>, "/swagger")]));
} else {
res.push(Setting.getItem(<Link style={{color: textColor}} to="/syncers">{i18next.t("general:Admin")}</Link>, "/admin", <SettingTwoTone twoToneColor={twoToneColor} />, [
Setting.getItem(<Link to="/syncers">{i18next.t("general:Syncers")}</Link>, "/syncers"),
Setting.getItem(<Link to="/webhooks">{i18next.t("general:Webhooks")}</Link>, "/webhooks")]));
}
}
return res;
}
function renderLoginIfNotLoggedIn(component) {
if (props.account === null) {
sessionStorage.setItem("from", window.location.pathname);
return <Redirect to="/login" />;
} else if (props.account === undefined) {
return null;
} else {
return component;
}
}
function renderRouter() {
const account = props.account;
const onChangeTheme = props.onChangeTheme;
const onfinish = props.onfinish;
return (
<Switch>
<Route exact path="/" render={(props) => renderLoginIfNotLoggedIn(<Dashboard account={account} {...props} />)} />
<Route exact path="/apps" render={(props) => renderLoginIfNotLoggedIn(<AppListPage account={account} {...props} />)} />
<Route exact path="/shortcuts" render={(props) => renderLoginIfNotLoggedIn(<ShortcutsPage account={account} {...props} />)} />
<Route exact path="/account" render={(props) => renderLoginIfNotLoggedIn(<AccountPage account={account} {...props} />)} />
<Route exact path="/organizations" render={(props) => renderLoginIfNotLoggedIn(<OrganizationListPage account={account} {...props} />)} />
<Route exact path="/organizations/:organizationName" render={(props) => renderLoginIfNotLoggedIn(<OrganizationEditPage account={account} onChangeTheme={onChangeTheme} {...props} />)} />
<Route exact path="/organizations/:organizationName/users" render={(props) => renderLoginIfNotLoggedIn(<UserListPage account={account} {...props} />)} />
<Route exact path="/trees/:organizationName" render={(props) => renderLoginIfNotLoggedIn(<GroupTreePage account={account} {...props} />)} />
<Route exact path="/trees/:organizationName/:groupName" render={(props) => renderLoginIfNotLoggedIn(<GroupTreePage account={account} {...props} />)} />
<Route exact path="/groups" render={(props) => renderLoginIfNotLoggedIn(<GroupListPage account={account} {...props} />)} />
<Route exact path="/groups/:organizationName/:groupName" render={(props) => renderLoginIfNotLoggedIn(<GroupEditPage account={account} {...props} />)} />
<Route exact path="/users" render={(props) => renderLoginIfNotLoggedIn(<UserListPage account={account} {...props} />)} />
<Route exact path="/users/:organizationName/:userName" render={(props) => <UserEditPage account={account} {...props} />} />
<Route exact path="/invitations" render={(props) => renderLoginIfNotLoggedIn(<InvitationListPage account={account} {...props} />)} />
<Route exact path="/invitations/:organizationName/:invitationName" render={(props) => renderLoginIfNotLoggedIn(<InvitationEditPage account={account} {...props} />)} />
<Route exact path="/applications" render={(props) => renderLoginIfNotLoggedIn(<ApplicationListPage account={account} {...props} />)} />
<Route exact path="/applications/:organizationName/:applicationName" render={(props) => renderLoginIfNotLoggedIn(<ApplicationEditPage account={account} {...props} />)} />
<Route exact path="/providers" render={(props) => renderLoginIfNotLoggedIn(<ProviderListPage account={account} {...props} />)} />
<Route exact path="/providers/:organizationName/:providerName" render={(props) => renderLoginIfNotLoggedIn(<ProviderEditPage account={account} {...props} />)} />
<Route exact path="/records" render={(props) => renderLoginIfNotLoggedIn(<RecordListPage account={account} {...props} />)} />
<Route exact path="/resources" render={(props) => renderLoginIfNotLoggedIn(<ResourceListPage account={account} {...props} />)} />
<Route exact path="/certs" render={(props) => renderLoginIfNotLoggedIn(<CertListPage account={account} {...props} />)} />
<Route exact path="/certs/:organizationName/:certName" render={(props) => renderLoginIfNotLoggedIn(<CertEditPage account={account} {...props} />)} />
<Route exact path="/roles" render={(props) => renderLoginIfNotLoggedIn(<RoleListPage account={account} {...props} />)} />
<Route exact path="/roles/:organizationName/:roleName" render={(props) => renderLoginIfNotLoggedIn(<RoleEditPage account={account} {...props} />)} />
<Route exact path="/permissions" render={(props) => renderLoginIfNotLoggedIn(<PermissionListPage account={account} {...props} />)} />
<Route exact path="/permissions/:organizationName/:permissionName" render={(props) => renderLoginIfNotLoggedIn(<PermissionEditPage account={account} {...props} />)} />
<Route exact path="/models" render={(props) => renderLoginIfNotLoggedIn(<ModelListPage account={account} {...props} />)} />
<Route exact path="/models/:organizationName/:modelName" render={(props) => renderLoginIfNotLoggedIn(<ModelEditPage account={account} {...props} />)} />
<Route exact path="/adapters" render={(props) => renderLoginIfNotLoggedIn(<AdapterListPage account={account} {...props} />)} />
<Route exact path="/adapters/:organizationName/:adapterName" render={(props) => renderLoginIfNotLoggedIn(<AdapterEditPage account={account} {...props} />)} />
<Route exact path="/enforcers" render={(props) => renderLoginIfNotLoggedIn(<EnforcerListPage account={account} {...props} />)} />
<Route exact path="/enforcers/:organizationName/:enforcerName" render={(props) => renderLoginIfNotLoggedIn(<EnforcerEditPage account={account} {...props} />)} />
<Route exact path="/sessions" render={(props) => renderLoginIfNotLoggedIn(<SessionListPage account={account} {...props} />)} />
<Route exact path="/tokens" render={(props) => renderLoginIfNotLoggedIn(<TokenListPage account={account} {...props} />)} />
<Route exact path="/tokens/:tokenName" render={(props) => renderLoginIfNotLoggedIn(<TokenEditPage account={account} {...props} />)} />
<Route exact path="/products" render={(props) => renderLoginIfNotLoggedIn(<ProductListPage account={account} {...props} />)} />
<Route exact path="/products/:organizationName/:productName" render={(props) => renderLoginIfNotLoggedIn(<ProductEditPage account={account} {...props} />)} />
<Route exact path="/products/:organizationName/:productName/buy" render={(props) => renderLoginIfNotLoggedIn(<ProductBuyPage account={account} {...props} />)} />
<Route exact path="/payments" render={(props) => renderLoginIfNotLoggedIn(<PaymentListPage account={account} {...props} />)} />
<Route exact path="/payments/:organizationName/:paymentName" render={(props) => renderLoginIfNotLoggedIn(<PaymentEditPage account={account} {...props} />)} />
<Route exact path="/payments/:organizationName/:paymentName/result" render={(props) => renderLoginIfNotLoggedIn(<PaymentResultPage account={account} {...props} />)} />
<Route exact path="/plans" render={(props) => renderLoginIfNotLoggedIn(<PlanListPage account={account} {...props} />)} />
<Route exact path="/plans/:organizationName/:planName" render={(props) => renderLoginIfNotLoggedIn(<PlanEditPage account={account} {...props} />)} />
<Route exact path="/pricings" render={(props) => renderLoginIfNotLoggedIn(<PricingListPage account={account} {...props} />)} />
<Route exact path="/pricings/:organizationName/:pricingName" render={(props) => renderLoginIfNotLoggedIn(<PricingEditPage account={account} {...props} />)} />
<Route exact path="/subscriptions" render={(props) => renderLoginIfNotLoggedIn(<SubscriptionListPage account={account} {...props} />)} />
<Route exact path="/subscriptions/:organizationName/:subscriptionName" render={(props) => renderLoginIfNotLoggedIn(<SubscriptionEditPage account={account} {...props} />)} />
<Route exact path="/sysinfo" render={(props) => renderLoginIfNotLoggedIn(<SystemInfo account={account} {...props} />)} />
<Route exact path="/syncers" render={(props) => renderLoginIfNotLoggedIn(<SyncerListPage account={account} {...props} />)} />
<Route exact path="/syncers/:syncerName" render={(props) => renderLoginIfNotLoggedIn(<SyncerEditPage account={account} {...props} />)} />
<Route exact path="/transactions" render={(props) => renderLoginIfNotLoggedIn(<TransactionListPage account={account} {...props} />)} />
<Route exact path="/transactions/:organizationName/:transactionName" render={(props) => renderLoginIfNotLoggedIn(<TransactionEditPage account={account} {...props} />)} />
<Route exact path="/webhooks" render={(props) => renderLoginIfNotLoggedIn(<WebhookListPage account={account} {...props} />)} />
<Route exact path="/webhooks/:webhookName" render={(props) => renderLoginIfNotLoggedIn(<WebhookEditPage account={account} {...props} />)} />
<Route exact path="/ldap/:organizationName/:ldapId" render={(props) => renderLoginIfNotLoggedIn(<LdapEditPage account={account} {...props} />)} />
<Route exact path="/ldap/sync/:organizationName/:ldapId" render={(props) => renderLoginIfNotLoggedIn(<LdapSyncPage account={account} {...props} />)} />
<Route exact path="/mfa/setup" render={(props) => renderLoginIfNotLoggedIn(<MfaSetupPage account={account} onfinish={onfinish} {...props} />)} />
<Route exact path="/.well-known/openid-configuration" render={(props) => <OdicDiscoveryPage />} />
<Route path="" render={() => <Result status="404" title="404 NOT FOUND" subTitle={i18next.t("general:Sorry, the page you visited does not exist.")}
extra={<a href="/"><Button type="primary">{i18next.t("general:Back Home")}</Button></a>} />} />
</Switch>
);
}
function isWithoutCard() {
return Setting.isMobile() || window.location.pathname.startsWith("/trees");
}
const menuStyleRight = Setting.isAdminUser(props.account) && !Setting.isMobile() ? "calc(180px + 280px)" : "280px";
const onClose = () => {
setMenuVisible(false);
};
const showMenu = () => {
setMenuVisible(true);
};
return (
<React.Fragment>
<EnableMfaNotification account={props.account} />
<Header style={{padding: "0", marginBottom: "3px", backgroundColor: props.themeAlgorithm.includes("dark") ? "black" : "white"}} >
{Setting.isMobile() ? null : (
<Link to={"/"}>
<div className="logo" style={{background: `url(${props.logo})`}} />
</Link>
)}
{props.requiredEnableMfa || (Setting.isMobile() ?
<React.Fragment>
<Drawer title={i18next.t("general:Close")} placement="left" visible={menuVisible} onClose={onClose}>
<Menu
items={getMenuItems()}
mode={"inline"}
selectedKeys={[props.selectedMenuKey]}
style={{lineHeight: "64px"}}
onClick={onClose}
>
</Menu>
</Drawer>
<Button icon={<BarsOutlined />} onClick={showMenu} type="text">
{i18next.t("general:Menu")}
</Button>
</React.Fragment> :
<Menu
onClick={onClose}
items={getMenuItems()}
mode={"horizontal"}
selectedKeys={[props.selectedMenuKey]}
style={{position: "absolute", left: "145px", right: menuStyleRight, backgroundColor: props.themeAlgorithm.includes("dark") ? "black" : "white"}}
/>
)}
{
renderAccountMenu()
}
</Header>
<Content style={{display: "flex", flexDirection: "column"}} >
{isWithoutCard() ?
renderRouter() :
<Card className="content-warp-card">
{renderRouter()}
</Card>
}
</Content>
</React.Fragment>
);
}
export default withRouter(ManagementPage);

View File

@ -91,7 +91,7 @@ class PermissionListPage extends BaseListPage {
const {pagination} = this.state;
this.fetch({pagination});
} else {
Setting.showMessage("error", `Users failed to upload: ${res.msg}`);
Setting.showMessage("error", `${i18next.t("general:Failed to sync")}: ${res.msg}`);
}
} else if (status === "error") {
Setting.showMessage("error", "File failed to upload");

View File

@ -191,7 +191,7 @@ class ProviderEditPage extends React.Component {
return Setting.getLabel(i18next.t("provider:App key"), i18next.t("provider:App key - Tooltip"));
} else if (provider.type === "UCloud SMS") {
return Setting.getLabel(i18next.t("provider:Public key"), i18next.t("provider:Public key - Tooltip"));
} else if (provider.type === "Msg91 SMS" || provider.type === "Infobip SMS") {
} else if (provider.type === "Msg91 SMS" || provider.type === "Infobip SMS" || provider.type === "OSON SMS") {
return Setting.getLabel(i18next.t("provider:Sender Id"), i18next.t("provider:Sender Id - Tooltip"));
} else {
return Setting.getLabel(i18next.t("provider:Client ID"), i18next.t("provider:Client ID - Tooltip"));
@ -234,7 +234,7 @@ class ProviderEditPage extends React.Component {
return Setting.getLabel(i18next.t("general:Password"), i18next.t("general:Password - Tooltip"));
}
case "SMS":
if (provider.type === "Volc Engine SMS" || provider.type === "Amazon SNS" || provider.type === "Baidu Cloud SMS") {
if (provider.type === "Volc Engine SMS" || provider.type === "Amazon SNS" || provider.type === "Baidu Cloud SMS" || provider.type === "OSON SMS") {
return Setting.getLabel(i18next.t("provider:Secret access key"), i18next.t("provider:Secret access key - Tooltip"));
} else if (provider.type === "Huawei Cloud SMS") {
return Setting.getLabel(i18next.t("provider:App secret"), i18next.t("provider:AppSecret - Tooltip"));

View File

@ -83,7 +83,7 @@ class RoleListPage extends BaseListPage {
const {pagination} = this.state;
this.fetch({pagination});
} else {
Setting.showMessage("error", `Users failed to upload: ${res.msg}`);
Setting.showMessage("error", `${i18next.t("general:Failed to sync")}: ${res.msg}`);
}
} else if (status === "error") {
Setting.showMessage("error", "File failed to upload");

View File

@ -143,6 +143,10 @@ export const OtherProviderInfo = {
logo: `${StaticBaseUrl}/img/social_msg91.ico`,
url: "https://control.msg91.com/app/",
},
"OSON SMS": {
logo: "https://osonsms.com/images/osonsms-logo.svg",
url: "https://osonsms.com/",
},
"Custom HTTP SMS": {
logo: `${StaticBaseUrl}/img/social_default.png`,
url: "https://casdoor.org/docs/provider/sms/overview",
@ -703,6 +707,15 @@ export function goToLinkSoft(ths, link) {
ths.props.history.push(link);
}
export function goToLinkSoftOrJumpSelf(ths, link) {
if (link.startsWith("http")) {
goToLink(link);
return;
}
ths.props.history.push(link);
}
export function showMessage(type, text) {
if (type === "success") {
message.success(text);
@ -1005,6 +1018,7 @@ export function getProviderTypeOptions(category) {
{id: "Azure ACS", name: "Azure ACS"},
{id: "Custom HTTP SMS", name: "Custom HTTP SMS"},
{id: "Mock SMS", name: "Mock SMS"},
{id: "OSON SMS", name: "OSON SMS"},
{id: "Infobip SMS", name: "Infobip SMS"},
{id: "Tencent Cloud SMS", name: "Tencent Cloud SMS"},
{id: "Baidu Cloud SMS", name: "Baidu Cloud SMS"},

View File

@ -454,7 +454,7 @@ class SyncerEditPage extends React.Component {
Setting.showMessage("success", i18next.t("syncer:Connect successfully"));
} else {
this.setState({testDbLoading: false});
Setting.showMessage("error", i18next.t("syncer:Failed to connect") + ": " + res.msg);
Setting.showMessage("error", `${i18next.t("syncer:Failed to connect")}: ${res.msg}`);
}
})
.catch(error => {

View File

@ -0,0 +1,324 @@
// Copyright 2024 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.
import React from "react";
import * as TransactionBackend from "./backend/TransactionBackend";
import * as Setting from "./Setting";
import * as ApplicationBackend from "./backend/ApplicationBackend";
import {Button, Card, Col, Input, Row} from "antd";
import i18next from "i18next";
class TransactionEditPage extends React.Component {
constructor(props) {
super(props);
this.state = {
classes: props,
organizationName: props.organizationName !== undefined ? props.organizationName : props.match.params.organizationName,
transactionName: props.match.params.transactionName,
application: null,
transaction: null,
providers: [],
mode: props.location.mode !== undefined ? props.location.mode : "edit",
};
}
UNSAFE_componentWillMount() {
this.getTransaction();
}
getTransaction() {
TransactionBackend.getTransaction(this.state.organizationName, this.state.transactionName)
.then((res) => {
if (res.data === null) {
this.props.history.push("/404");
return;
}
this.setState({
transaction: res.data,
});
Setting.scrollToDiv("invoice-area");
});
}
submitTransactionEdit(exitAfterSave) {
const transaction = Setting.deepCopy(this.state.transaction);
TransactionBackend.updateTransaction(this.state.transaction.owner, this.state.transactionName, transaction)
.then((res) => {
if (res.status === "ok") {
Setting.showMessage("success", i18next.t("general:Successfully saved"));
this.setState({
transactionName: this.state.transaction.name,
});
if (exitAfterSave) {
this.props.history.push("/transactions");
} else {
this.props.history.push(`/transactions/${this.state.organizationName}/${this.state.transaction.name}`);
}
} else {
Setting.showMessage("error", `${i18next.t("general:Failed to save")}: ${res.msg}`);
this.updatePaymentField("name", this.state.transactionName);
}
})
.catch(error => {
Setting.showMessage("error", `${i18next.t("general:Failed to connect to server")}: ${error}`);
});
}
deleteTransaction() {
TransactionBackend.deleteTransaction(this.state.transaction)
.then((res) => {
if (res.status === "ok") {
this.props.history.push("/transactions");
} else {
Setting.showMessage("error", `${i18next.t("general:Failed to delete")}: ${res.msg}`);
}
})
.catch(error => {
Setting.showMessage("error", `${i18next.t("general:Failed to connect to server")}: ${error}`);
});
}
parseTransactionField(key, value) {
if ([""].includes(key)) {
value = Setting.myParseInt(value);
}
return value;
}
getApplication() {
ApplicationBackend.getApplication("admin", this.state.applicationName)
.then((res) => {
if (res.data === null) {
this.props.history.push("/404");
return;
}
if (res.status === "error") {
Setting.showMessage("error", res.msg);
return;
}
const application = res.data;
if (application.grantTypes === null || application.grantTypes === undefined || application.grantTypes.length === 0) {
application.grantTypes = ["authorization_code"];
}
if (application.tags === null || application.tags === undefined) {
application.tags = [];
}
this.setState({
application: application,
});
this.getCerts(application.organization);
this.getSamlMetadata(application.enableSamlPostBinding);
});
}
renderTransaction() {
return (
<Card size="small" title={
<div>
{this.state.mode === "add" ? i18next.t("transaction:New Transaction") : i18next.t("transaction:Edit Transaction")}&nbsp;&nbsp;&nbsp;&nbsp;
<Button onClick={() => this.submitTransactionEdit(false)}>{i18next.t("general:Save")}</Button>
<Button style={{marginLeft: "20px"}} type="primary" onClick={() => this.submitTransactionEdit(true)}>{i18next.t("general:Save & Exit")}</Button>
{this.state.mode === "add" ? <Button style={{marginLeft: "20px"}} onClick={() => this.deleteTransaction()}>{i18next.t("general:Cancel")}</Button> : null}
</div>
} style={(Setting.isMobile()) ? {margin: "5px"} : {}} type="inner">
<Row style={{marginTop: "10px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Organization"), i18next.t("general:Organization - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.owner} onChange={e => {
// this.updatePaymentField('organization', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.name} onChange={e => {
// this.updatePaymentField('name', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Display name"), i18next.t("general:Display name - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.displayName} onChange={e => {
this.updatePaymentField("displayName", e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Provider"), i18next.t("general:Provider - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.provider} onChange={e => {
// this.updatePaymentField('provider', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("provider:Category"), i18next.t("provider:Category - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.category} onChange={e => {
this.updatePaymentField("displayName", e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("provider:Type"), i18next.t("payment:Type - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.type} onChange={e => {
// this.updatePaymentField('type', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("payment:Product"), i18next.t("payment:Product - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.productName} onChange={e => {
// this.updatePaymentField('productName', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("product:Detail"), i18next.t("product:Detail - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.detail} onChange={e => {
// this.updatePaymentField('currency', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("user:Tag"), i18next.t("transaction:Tag - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.tag} onChange={e => {
// this.updatePaymentField('currency', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("payment:Currency"), i18next.t("payment:Currency - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.currency} onChange={e => {
// this.updatePaymentField('currency', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("transaction:Amount"), i18next.t("transaction:Amount - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.amount} onChange={e => {
// this.updatePaymentField('amount', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("product:Return URL"), i18next.t("product:Return URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.user} onChange={e => {
// this.updatePaymentField('amount', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:User"), i18next.t("general:User - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.user} onChange={e => {
// this.updatePaymentField('amount', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Application"), i18next.t("general:Application - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.application} onChange={e => {
// this.updatePaymentField('amount', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Payment"), i18next.t("general:Payment - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.payment} onChange={e => {
// this.updatePaymentField('amount', e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:State"), i18next.t("general:State - Tooltip"))} :
</Col>
<Col span={22} >
<Input disabled={true} value={this.state.transaction.state} onChange={e => {
// this.updatePaymentField('state', e.target.value);
}} />
</Col>
</Row>
</Card>
);
}
render() {
return (
<div>
{
this.state.transaction !== null ? this.renderTransaction() : null
}
<div style={{marginTop: "20px", marginLeft: "40px"}}>
<Button size="large" onClick={() => this.submitTransactionEdit(false)}>{i18next.t("general:Save")}</Button>
<Button style={{marginLeft: "20px"}} type="primary" size="large" onClick={() => this.submitTransactionEdit(true)}>{i18next.t("general:Save & Exit")}</Button>
{this.state.mode === "add" ? <Button style={{marginLeft: "20px"}} size="large" onClick={() => this.deleteTransaction()}>{i18next.t("general:Cancel")}</Button> : null}
</div>
</div>
);
}
}
export default TransactionEditPage;

View File

@ -0,0 +1,333 @@
// Copyright 2024 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.
import BaseListPage from "./BaseListPage";
import i18next from "i18next";
import {Link} from "react-router-dom";
import * as Setting from "./Setting";
import * as Provider from "./auth/Provider";
import {Button, Table} from "antd";
import PopconfirmModal from "./common/modal/PopconfirmModal";
import React from "react";
import * as TransactionBackend from "./backend/TransactionBackend";
import moment from "moment/moment";
class TransactionListPage extends BaseListPage {
newTransaction() {
const randomName = Setting.getRandomName();
const organizationName = Setting.getRequestOrganization(this.props.account);
return {
owner: organizationName,
name: `transaction_${randomName}`,
createdTime: moment().format(),
displayName: `New Transaction - ${randomName}`,
provider: "provider_pay_paypal",
category: "",
type: "PayPal",
productName: "computer-1",
productDisplayName: "A notebook computer",
detail: "This is a computer with excellent CPU, memory and disk",
tag: "Promotion-1",
currency: "USD",
amount: 0,
returnUrl: "https://door.casdoor.com/transactions",
user: "admin",
application: "",
payment: "payment_bhn1ra",
state: "Paid",
};
}
deleteTransaction(i) {
TransactionBackend.deleteTransaction(this.state.data[i])
.then((res) => {
if (res.status === "ok") {
Setting.showMessage("success", i18next.t("general:Successfully deleted"));
this.setState({
data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1},
});
} else {
Setting.showMessage("error", `${i18next.t("general:Failed to delete")}: ${res.msg}`);
}
})
.catch(error => {
Setting.showMessage("error", `${i18next.t("general:Failed to connect to server")}: ${error}`);
});
}
addTransaction() {
const newTransaction = this.newTransaction();
TransactionBackend.addTransaction(newTransaction)
.then((res) => {
if (res.status === "ok") {
this.props.history.push({pathname: `/transactions/${newTransaction.owner}/${newTransaction.name}`, mode: "add"});
Setting.showMessage("success", i18next.t("general:Successfully added"));
} else {
Setting.showMessage("error", `${i18next.t("general:Failed to add")}: ${res.msg}`);
}
}
)
.catch(error => {
Setting.showMessage("error", `${i18next.t("general:Failed to connect to server")}: ${error}`);
});
}
renderTable(transactions) {
const columns = [
{
title: i18next.t("general:Name"),
dataIndex: "name",
key: "name",
width: "180px",
fixed: "left",
sorter: true,
...this.getColumnSearchProps("name"),
render: (text, record, index) => {
return (
<Link to={`/transactions/${record.owner}/${text}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:Organization"),
dataIndex: "owner",
key: "owner",
width: "120px",
fixed: "left",
sorter: true,
...this.getColumnSearchProps("owner"),
render: (text, record, index) => {
return (
<Link to={`/organizations/${text}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:Provider"),
dataIndex: "provider",
key: "provider",
width: "150px",
sorter: true,
...this.getColumnSearchProps("provider"),
render: (text, record, index) => {
return (
<Link to={`/providers/${record.owner}/${text}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:User"),
dataIndex: "user",
key: "user",
width: "120px",
sorter: true,
...this.getColumnSearchProps("user"),
render: (text, record, index) => {
return (
<Link to={`/users/${record.owner}/${text}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:Created time"),
dataIndex: "createdTime",
key: "createdTime",
width: "160px",
sorter: true,
render: (text, record, index) => {
return Setting.getFormattedDate(text);
},
},
{
title: i18next.t("provider:Type"),
dataIndex: "type",
key: "type",
width: "140px",
align: "center",
filterMultiple: false,
filters: Setting.getProviderTypeOptions("Payment").map((o) => {return {text: o.id, value: o.name};}),
sorter: true,
render: (text, record, index) => {
record.category = "Payment";
return Provider.getProviderLogoWidget(record);
},
},
{
title: i18next.t("payment:Product"),
dataIndex: "productDisplayName",
key: "productDisplayName",
// width: '160px',
sorter: true,
...this.getColumnSearchProps("productDisplayName"),
render: (text, record, index) => {
return (
<Link to={`/products/${record.owner}/${record.productName}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("payment:Currency"),
dataIndex: "currency",
key: "currency",
width: "120px",
sorter: true,
...this.getColumnSearchProps("currency"),
},
{
title: i18next.t("transaction:Amount"),
dataIndex: "amount",
key: "amount",
width: "120px",
sorter: true,
...this.getColumnSearchProps("amount"),
},
{
title: i18next.t("general:User"),
dataIndex: "user",
key: "user",
width: "120px",
sorter: true,
...this.getColumnSearchProps("user"),
},
{
title: i18next.t("general:Application"),
dataIndex: "application",
key: "application",
width: "120px",
sorter: true,
...this.getColumnSearchProps("application"),
render: (text, record, index) => {
return (
<Link to={`/applications/${record.owner}/${record.application}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:Payment"),
dataIndex: "payment",
key: "payment",
width: "120px",
sorter: true,
...this.getColumnSearchProps("payment"),
render: (text, record, index) => {
return (
<Link to={`/payments/${record.owner}/${record.payment}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("general:State"),
dataIndex: "state",
key: "state",
width: "120px",
sorter: true,
...this.getColumnSearchProps("state"),
},
{
title: i18next.t("general:Action"),
dataIndex: "",
key: "op",
width: "240px",
fixed: (Setting.isMobile()) ? "false" : "right",
render: (text, record, index) => {
return (
<div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/transactions/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<PopconfirmModal
title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteTransaction(index)}
>
</PopconfirmModal>
</div>
);
},
},
];
const paginationProps = {
total: this.state.pagination.total,
showQuickJumper: true,
showSizeChanger: true,
showTotal: () => i18next.t("general:{total} in total").replace("{total}", this.state.pagination.total),
};
return (
<div>
<Table scroll={{x: "max-content"}} columns={columns} dataSource={transactions} rowKey={(record) => `${record.owner}/${record.name}`} size="middle" bordered pagination={paginationProps}
title={() => (
<div>
{i18next.t("general:Transactions")}&nbsp;&nbsp;&nbsp;&nbsp;
<Button type="primary" size="small" onClick={this.addTransaction.bind(this)}>{i18next.t("general:Add")}</Button>
</div>
)}
loading={this.state.loading}
onChange={this.handleTableChange}
/>
</div>
);
}
fetch = (params = {}) => {
let field = params.searchedColumn, value = params.searchText;
const sortField = params.sortField, sortOrder = params.sortOrder;
if (params.type !== undefined && params.type !== null) {
field = "type";
value = params.type;
}
this.setState({loading: true});
TransactionBackend.getTransactions(Setting.isDefaultOrganizationSelected(this.props.account) ? "" : Setting.getRequestOrganization(this.props.account), params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
.then((res) => {
this.setState({
loading: false,
});
if (res.status === "ok") {
this.setState({
data: res.data,
pagination: {
...params.pagination,
total: res.data2,
},
searchText: params.searchText,
searchedColumn: params.searchedColumn,
});
} else {
if (Setting.isResponseDenied(res)) {
this.setState({
isAuthorized: false,
});
} else {
Setting.showMessage("error", res.msg);
}
}
});
};
}
export default TransactionListPage;

View File

@ -64,7 +64,9 @@ class UserEditPage extends React.Component {
UNSAFE_componentWillMount() {
this.getUser();
this.getOrganizations();
if (Setting.isLocalAdminUser(this.props.account)) {
this.getOrganizations();
}
this.getApplicationsByOrganization(this.state.organizationName);
this.getUserApplication();
this.setReturnUrl();
@ -350,7 +352,9 @@ class UserEditPage extends React.Component {
{Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.id} disabled={disabled} />
<Input value={this.state.user.id} disabled={disabled} onChange={e => {
this.updateUserField("id", e.target.value);
}} />
</Col>
</Row>
);
@ -999,7 +1003,7 @@ class UserEditPage extends React.Component {
<div style={{verticalAlign: "middle", marginBottom: 10}}>{`(${i18next.t("general:empty")})`}</div>
</Col>
}
<CropperDivModal disabled={disabled} tag={tag} setTitle={set} buttonText={`${title}...`} title={title} user={this.state.user} organization={this.state.organizations.find(organization => organization.name === this.state.organizationName)} />
<CropperDivModal disabled={disabled} tag={tag} setTitle={set} buttonText={`${title}...`} title={title} user={this.state.user} organization={this.getUserOrganization()} />
</Col>
);
}

View File

@ -309,6 +309,16 @@ class WebhookEditPage extends React.Component {
</div>
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 19 : 2}>
{Setting.getLabel(i18next.t("webhook:Single org only"), i18next.t("webhook:Single org only - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.webhook.singleOrgOnly} onChange={checked => {
this.updateWebhookField("singleOrgOnly", checked);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 19 : 2}>
{Setting.getLabel(i18next.t("general:Is enabled"), i18next.t("general:Is enabled - Tooltip"))} :

View File

@ -111,7 +111,7 @@ class WebhookListPage extends BaseListPage {
title: i18next.t("general:Created time"),
dataIndex: "createdTime",
key: "createdTime",
width: "180px",
width: "150px",
sorter: true,
render: (text, record, index) => {
return Setting.getFormattedDate(text);
@ -121,7 +121,7 @@ class WebhookListPage extends BaseListPage {
title: i18next.t("general:URL"),
dataIndex: "url",
key: "url",
width: "300px",
width: "200px",
sorter: true,
...this.getColumnSearchProps("url"),
render: (text, record, index) => {
@ -138,7 +138,7 @@ class WebhookListPage extends BaseListPage {
title: i18next.t("general:Method"),
dataIndex: "method",
key: "method",
width: "120px",
width: "100px",
sorter: true,
...this.getColumnSearchProps("method"),
},
@ -146,7 +146,7 @@ class WebhookListPage extends BaseListPage {
title: i18next.t("webhook:Content type"),
dataIndex: "contentType",
key: "contentType",
width: "200px",
width: "140px",
sorter: true,
filterMultiple: false,
filters: [
@ -169,7 +169,19 @@ class WebhookListPage extends BaseListPage {
title: i18next.t("webhook:Is user extended"),
dataIndex: "isUserExtended",
key: "isUserExtended",
width: "160px",
width: "140px",
sorter: true,
render: (text, record, index) => {
return (
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
);
},
},
{
title: i18next.t("webhook:Single org only"),
dataIndex: "singleOrgOnly",
key: "singleOrgOnly",
width: "140px",
sorter: true,
render: (text, record, index) => {
return (
@ -183,6 +195,7 @@ class WebhookListPage extends BaseListPage {
key: "isEnabled",
width: "120px",
sorter: true,
fixed: (Setting.isMobile()) ? "false" : "right",
render: (text, record, index) => {
return (
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />

View File

@ -172,7 +172,7 @@ class AuthCallback extends React.Component {
Setting.goToLink(`${oAuthParams.redirectUri}${concatChar}${responseType}=${token}&state=${oAuthParams.state}&token_type=bearer`);
} else if (responseType === "link") {
const from = innerParams.get("from");
Setting.goToLinkSoft(this, from);
Setting.goToLinkSoftOrJumpSelf(this, from);
} else if (responseType === "saml") {
if (res.data2.method === "POST") {
this.setState({

View File

@ -17,7 +17,6 @@ import i18next from "i18next";
import * as Provider from "./Provider";
import {getProviderLogoURL} from "../Setting";
import {GithubLoginButton, GoogleLoginButton} from "react-social-login-buttons";
import {authViaMetaMask, authViaWeb3Onboard} from "./Web3Auth";
import QqLoginButton from "./QqLoginButton";
import FacebookLoginButton from "./FacebookLoginButton";
import WeiboLoginButton from "./WeiboLoginButton";
@ -43,9 +42,7 @@ import OktaLoginButton from "./OktaLoginButton";
import DouyinLoginButton from "./DouyinLoginButton";
import LoginButton from "./LoginButton";
import * as AuthBackend from "./AuthBackend";
import * as Setting from "../Setting";
import {getEvent} from "./Util";
import {Modal} from "antd";
import {WechatOfficialAccountModal} from "./Util";
function getSigninButton(provider) {
const text = i18next.t("login:Sign in with {type}").replace("{type}", provider.displayName !== "" ? provider.displayName : provider.type);
@ -124,9 +121,17 @@ function goToSamlUrl(provider, location) {
export function goToWeb3Url(application, provider, method) {
if (provider.type === "MetaMask") {
authViaMetaMask(application, provider, method);
import("./Web3Auth")
.then(module => {
const authViaMetaMask = module.authViaMetaMask;
authViaMetaMask(application, provider, method);
});
} else if (provider.type === "Web3Onboard") {
authViaWeb3Onboard(application, provider, method);
import("./Web3Auth")
.then(module => {
const authViaWeb3Onboard = module.authViaWeb3Onboard;
authViaWeb3Onboard(application, provider, method);
});
}
}
@ -134,32 +139,11 @@ export function renderProviderLogo(provider, application, width, margin, size, l
if (size === "small") {
if (provider.category === "OAuth") {
if (provider.type === "WeChat" && provider.clientId2 !== "" && provider.clientSecret2 !== "" && provider.disableSsl === true && !navigator.userAgent.includes("MicroMessenger")) {
const info = async() => {
AuthBackend.getWechatQRCode(`${provider.owner}/${provider.name}`).then(
async res => {
if (res.status !== "ok") {
Setting.showMessage("error", res?.msg);
return;
}
const t1 = setInterval(await getEvent, 1000, application, provider, res.data2);
{Modal.info({
title: i18next.t("provider:Please use WeChat to scan the QR code and follow the official account for sign in"),
content: (
<div style={{marginRight: "34px"}}>
<img src = {"data:image/png;base64," + res.data} alt="Wechat QR code" style={{width: "100%"}} />
</div>
),
onOk() {
window.clearInterval(t1);
},
});}
}
);
};
return (
<a key={provider.displayName} >
<img width={width} height={width} src={getProviderLogoURL(provider)} alt={provider.displayName} className="provider-img" style={{margin: margin}} onClick={info} />
<img width={width} height={width} src={getProviderLogoURL(provider)} alt={provider.displayName} className="provider-img" style={{margin: margin}} onClick={() => {
WechatOfficialAccountModal(application, provider, "signup");
}} />
</a>
);
} else {

View File

@ -17,6 +17,10 @@ import LoginPage from "./LoginPage";
import {authConfig} from "./Auth";
class SelfLoginPage extends React.Component {
constructor(props) {
super(props);
import("../ManagementPage");
}
render() {
return (
<LoginPage type={"login"} mode={"signin"} applicationName={authConfig.appName} {...this.props} />

View File

@ -223,7 +223,7 @@ class SignupPage extends React.Component {
Setting.goToLinkSoft(this, this.getResultPath(application, values));
}
} else {
Setting.showMessage("error", i18next.t(`signup:${res.msg}`));
Setting.showMessage("error", res.msg);
}
});
}

View File

@ -13,11 +13,12 @@
// limitations under the License.
import React from "react";
import {Alert, Button, Result} from "antd";
import {Alert, Button, Modal, Result} from "antd";
import i18next from "i18next";
import {getWechatMessageEvent} from "./AuthBackend";
import * as Setting from "../Setting";
import * as Provider from "./Provider";
import * as AuthBackend from "./AuthBackend";
export function renderMessage(msg) {
if (msg !== null) {
@ -188,12 +189,36 @@ export function getQueryParamsFromState(state) {
}
}
export function getEvent(application, provider, ticket) {
export function getEvent(application, provider, ticket, method) {
getWechatMessageEvent(ticket)
.then(res => {
if (res.data === "SCAN" || res.data === "subscribe") {
const code = res?.data2;
Setting.goToLink(Provider.getAuthUrl(application, provider, "signup", code));
Setting.goToLink(Provider.getAuthUrl(application, provider, method ?? "signup", code));
}
});
}
export async function WechatOfficialAccountModal(application, provider, method) {
AuthBackend.getWechatQRCode(`${provider.owner}/${provider.name}`).then(
async res => {
if (res.status !== "ok") {
Setting.showMessage("error", res?.msg);
return;
}
const t1 = setInterval(await getEvent, 1000, application, provider, res.data2, method);
{Modal.info({
title: i18next.t("provider:Please use WeChat to scan the QR code and follow the official account for sign in"),
content: (
<div style={{marginRight: "34px"}}>
<img src = {"data:image/png;base64," + res.data} alt="Wechat QR code" style={{width: "100%"}} />
</div>
),
onOk() {
window.clearInterval(t1);
},
});}
}
);
}

View File

@ -0,0 +1,71 @@
// Copyright 2024 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.
import * as Setting from "../Setting";
export function getTransactions(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
return fetch(`${Setting.ServerUrl}/api/get-transactions?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
method: "GET",
credentials: "include",
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}
export function getTransaction(owner, name) {
return fetch(`${Setting.ServerUrl}/api/get-transaction?id=${owner}/${encodeURIComponent(name)}`, {
method: "GET",
credentials: "include",
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}
export function updateTransaction(owner, name, transaction) {
const newTransaction = Setting.deepCopy(transaction);
return fetch(`${Setting.ServerUrl}/api/update-transaction?id=${owner}/${encodeURIComponent(name)}`, {
method: "POST",
credentials: "include",
body: JSON.stringify(newTransaction),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}
export function addTransaction(transaction) {
const newTransaction = Setting.deepCopy(transaction);
return fetch(`${Setting.ServerUrl}/api/add-transaction`, {
method: "POST",
credentials: "include",
body: JSON.stringify(newTransaction),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}
export function deleteTransaction(transaction) {
const newTransaction = Setting.deepCopy(transaction);
return fetch(`${Setting.ServerUrl}/api/delete-transaction`, {
method: "POST",
credentials: "include",
body: JSON.stringify(newTransaction),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},
}).then(res => res.json());
}

View File

@ -147,7 +147,7 @@ export function sendCode(captchaType, captchaToken, clientSecret, method, countr
Setting.showMessage("success", i18next.t("user:Verification code sent"));
return true;
} else {
Setting.showMessage("error", i18next.t("user:" + res.msg));
Setting.showMessage("error", res.msg);
return false;
}
});

View File

@ -14,39 +14,36 @@
import {useEffect} from "react";
let customHeadLoaded = false;
function CustomHead(props) {
useEffect(() => {
const suffix = new Date().getTime().toString();
if (!customHeadLoaded) {
const suffix = new Date().getTime().toString();
if (!props.headerHtml) {return;}
const node = document.createElement("div");
node.innerHTML = props.headerHtml;
if (!props.headerHtml) {return;}
const node = document.createElement("div");
node.innerHTML = props.headerHtml;
node.childNodes.forEach(el => {
if (el.nodeName === "#text") {
return;
}
let innerNode = el;
innerNode.setAttribute("app-custom-head" + suffix, "");
if (innerNode.localName === "script") {
const scriptNode = document.createElement("script");
Array.from(innerNode.attributes).forEach(attr => {
scriptNode.setAttribute(attr.name, attr.value);
});
scriptNode.text = innerNode.textContent;
innerNode = scriptNode;
}
document.head.appendChild(innerNode);
});
return () => {
for (const el of document.head.children) {
if (el.getAttribute("app-custom-head" + suffix) !== null) {
document.head.removeChild(el);
node.childNodes.forEach(el => {
if (el.nodeName === "#text") {
return;
}
}
};
let innerNode = el;
innerNode.setAttribute("app-custom-head" + suffix, "");
if (innerNode.localName === "script") {
const scriptNode = document.createElement("script");
Array.from(innerNode.attributes).forEach(attr => {
scriptNode.setAttribute(attr.name, attr.value);
});
scriptNode.text = innerNode.textContent;
innerNode = scriptNode;
}
document.head.appendChild(innerNode);
});
customHeadLoaded = true;
}
});
}

View File

@ -20,8 +20,8 @@ import * as Setting from "../Setting";
import * as Provider from "../auth/Provider";
import * as AuthBackend from "../auth/AuthBackend";
import {goToWeb3Url} from "../auth/ProviderButton";
import {delWeb3AuthToken} from "../auth/Web3Auth";
import AccountAvatar from "../account/AccountAvatar";
import {WechatOfficialAccountModal} from "../auth/Util";
class OAuthWidget extends React.Component {
constructor(props) {
@ -98,7 +98,22 @@ class OAuthWidget extends React.Component {
user: this.props.user,
};
if (providerType === "MetaMask" || providerType === "Web3Onboard") {
delWeb3AuthToken(linkedValue);
import("../auth/Web3Auth")
.then(module => {
const delWeb3AuthToken = module.delWeb3AuthToken;
delWeb3AuthToken(linkedValue);
AuthBackend.unlink(body)
.then((res) => {
if (res.status === "ok") {
Setting.showMessage("success", "Unlinked successfully");
this.unlinked();
} else {
Setting.showMessage("error", `Failed to unlink: ${res.msg}`);
}
});
});
return;
}
AuthBackend.unlink(body)
.then((res) => {
@ -183,9 +198,19 @@ class OAuthWidget extends React.Component {
provider.category === "Web3" ? (
<Button style={{marginLeft: "20px", width: linkButtonWidth}} type="primary" disabled={user.id !== account.id} onClick={() => goToWeb3Url(application, provider, "link")}>{i18next.t("user:Link")}</Button>
) : (
<a key={provider.displayName} href={user.id !== account.id ? null : Provider.getAuthUrl(application, provider, "link")}>
<Button style={{marginLeft: "20px", width: linkButtonWidth}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
</a>
provider.type === "WeChat" && provider.clientId2 !== "" && provider.clientSecret2 !== "" && provider.disableSsl === true && !navigator.userAgent.includes("MicroMessenger") ? (
<a key={provider.displayName}>
<Button style={{marginLeft: "20px", width: linkButtonWidth}} type="primary" disabled={user.id !== account.id} onClick={
() => {
WechatOfficialAccountModal(application, provider, "link");
}
}>{i18next.t("user:Link")}</Button>
</a>
) : (
<a key={provider.displayName} href={user.id !== account.id ? null : Provider.getAuthUrl(application, provider, "link")}>
<Button style={{marginLeft: "20px", width: linkButtonWidth}} type="primary" disabled={user.id !== account.id}>{i18next.t("user:Link")}</Button>
</a>
)
)
) : (
<Button disabled={!providerItem.canUnlink && !Setting.isAdminUser(account)} style={{marginLeft: "20px", width: linkButtonWidth}} onClick={() => this.unlinkUser(provider.type, linkedValue)}>{i18next.t("user:Unlink")}</Button>

View File

@ -13,57 +13,34 @@
// limitations under the License.
import i18n from "i18next";
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 id from "./locales/id/data.json";
import ja from "./locales/ja/data.json";
import ko from "./locales/ko/data.json";
import ru from "./locales/ru/data.json";
import vi from "./locales/vi/data.json";
import pt from "./locales/pt/data.json";
import it from "./locales/it/data.json";
import ms from "./locales/ms/data.json";
import tr from "./locales/tr/data.json";
import ar from "./locales/ar/data.json";
import he from "./locales/he/data.json";
import nl from "./locales/nl/data.json";
import pl from "./locales/pl/data.json";
import fi from "./locales/fi/data.json";
import sv from "./locales/sv/data.json";
import uk from "./locales/uk/data.json";
import kk from "./locales/kk/data.json";
import fa from "./locales/fa/data.json";
import * as Conf from "./Conf";
import {initReactI18next} from "react-i18next";
import en from "./locales/en/data.json";
const resources = {
en: en,
zh: zh,
es: es,
fr: fr,
de: de,
id: id,
ja: ja,
ko: ko,
ru: ru,
vi: vi,
pt: pt,
it: it,
ms: ms,
tr: tr,
ar: ar,
he: he,
nl: nl,
pl: pl,
fi: fi,
sv: sv,
uk: uk,
kk: kk,
fa: fa,
};
const resourcesToBackend = (res) => ({
type: "backend",
init(services, backendOptions, i18nextOptions) {/* use services and options */},
read(language, namespace, callback) {
if (typeof res === "function") {
if (res.length < 3) {
try {
const r = res(language, namespace);
if (r && typeof r.then === "function") {
r.then((data) => callback(null, (data && data.default) || data)).catch(callback);
} else {
callback(null, r);
}
} catch (err) {
callback(err);
}
return;
}
res(language, namespace, callback);
return;
}
callback(null, res && res[language] && res[language][namespace]);
},
});
function initLanguage() {
let language = localStorage.getItem("language");
@ -157,18 +134,23 @@ function initLanguage() {
return language;
}
i18n.use(initReactI18next).init({
lng: initLanguage(),
i18n.use(resourcesToBackend(async(language, namespace) => {
const res = await import(`./locales/${language}/data.json`);
return res.default[namespace];
}
))
.use(initReactI18next)
.init({
lng: initLanguage(),
ns: Object.keys(en),
fallbackLng: "en",
resources: resources,
keySeparator: false,
interpolation: {
escapeValue: true,
},
// debug: true,
saveMissing: true,
});
keySeparator: false,
interpolation: {
escapeValue: true,
},
// debug: true,
saveMissing: true,
});
export default i18n;

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "URL der Prompt-Seite kopieren",
"Copy signin page URL": "Kopieren Sie die URL der Anmeldeseite",
"Copy signup page URL": "URL der Anmeldeseite kopieren",
"Custom CSS": "Formular CSS",
"Custom CSS - Edit": "Custom CSS - Bearbeiten",
"Custom CSS - Tooltip": "CSS-Styling der Anmelde-, Registrierungs- und Passwort-vergessen-Seite (z. B. Hinzufügen von Rahmen und Schatten)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Bearbeitungsanwendung",
"Enable Email linking": "E-Mail-Verknüpfung aktivieren",
@ -52,12 +58,6 @@
"File uploaded successfully": "Datei erfolgreich hochgeladen",
"First, last": "First, last",
"Follow organization theme": "Folge dem Theme der Organisation",
"Form CSS": "Formular CSS",
"Form CSS - Edit": "Form CSS - Bearbeiten",
"Form CSS - Tooltip": "CSS-Styling der Anmelde-, Registrierungs- und Passwort-vergessen-Seite (z. B. Hinzufügen von Rahmen und Schatten)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Formposition",
"Form position - Tooltip": "Position der Anmelde-, Registrierungs- und Passwort-vergessen-Formulare",
"Grant types": "Grant-Typen",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Dies ist eine schreibgeschützte Demo-Seite!",
"Timestamp": "Timestamp",
"Tokens": "Token",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token-Typ",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Drittanbieter-Logins",
"3rd-party logins - Tooltip": "Drittanbieter-Anmeldungen, die mit dem Benutzer verknüpft sind",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Sollten die erweiterten Felder des Benutzers in das JSON inkludiert werden?",
"Method - Tooltip": "HTTP Methode",
"New Webhook": "Neue Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Wert"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copiar URL de la página del prompt",
"Copy signin page URL": "Copiar la URL de la página de inicio de sesión",
"Copy signup page URL": "Copiar URL de la página de registro",
"Custom CSS": "Formulario CSS",
"Custom CSS - Edit": "Formulario CSS - Editar",
"Custom CSS - Tooltip": "Estilo CSS de los formularios de registro, inicio de sesión y olvido de contraseña (por ejemplo, agregar bordes y sombras)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Editar solicitud",
"Enable Email linking": "Habilitar enlace de correo electrónico",
@ -52,12 +58,6 @@
"File uploaded successfully": "Archivo subido exitosamente",
"First, last": "First, last",
"Follow organization theme": "Seguir el tema de la organización",
"Form CSS": "Formulario CSS",
"Form CSS - Edit": "Formulario CSS - Editar",
"Form CSS - Tooltip": "Estilo CSS de los formularios de registro, inicio de sesión y olvido de contraseña (por ejemplo, agregar bordes y sombras)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Posición de la Forma",
"Form position - Tooltip": "Ubicación de los formularios de registro, inicio de sesión y olvido de contraseña",
"Grant types": "Tipos de subvenciones",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "¡Este es un sitio de demostración solo de lectura!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "Dirección URL",
@ -1031,6 +1032,13 @@
"Token type": "Tipo de token",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Inicio de sesión de terceros",
"3rd-party logins - Tooltip": "Accesos sociales ligados por el usuario",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "¿Incluir los campos extendidos del usuario en el JSON?",
"Method - Tooltip": "Método HTTP",
"New Webhook": "Nuevo Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Valor"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copier l'URL de la page de l'invite",
"Copy signin page URL": "Copier l'URL de la page de connexion",
"Copy signup page URL": "Copiez l'URL de la page d'inscription",
"Custom CSS": "CSS du formulaire",
"Custom CSS - Edit": "CSS du formulaire - Modifier",
"Custom CSS - Tooltip": "Mise en forme CSS des formulaires d'inscription, de connexion et de récupération de mot de passe (par exemple, en ajoutant des bordures et des ombres)",
"Custom CSS Mobile": "CSS du formulaire sur téléphone",
"Custom CSS Mobile - Edit": "CSS du formulaire sur téléphone - Modifier",
"Custom CSS Mobile - Tooltip": "CSS du formulaire sur téléphone - Info-bulle",
"Dynamic": "Dynamique",
"Edit Application": "Modifier l'application",
"Enable Email linking": "Autoriser à lier l'e-mail",
@ -52,12 +58,6 @@
"File uploaded successfully": "Fichier téléchargé avec succès",
"First, last": "Prénom, nom",
"Follow organization theme": "Suivre le thème de l'organisation",
"Form CSS": "CSS du formulaire",
"Form CSS - Edit": "CSS du formulaire - Modifier",
"Form CSS - Tooltip": "Mise en forme CSS des formulaires d'inscription, de connexion et de récupération de mot de passe (par exemple, en ajoutant des bordures et des ombres)",
"Form CSS Mobile": "CSS du formulaire sur téléphone",
"Form CSS Mobile - Edit": "CSS du formulaire sur téléphone - Modifier",
"Form CSS Mobile - Tooltip": "CSS du formulaire sur téléphone - Info-bulle",
"Form position": "Position du formulaire",
"Form position - Tooltip": "Emplacement des formulaires d'inscription, de connexion et de récupération de mot de passe",
"Grant types": "Types d'autorisation",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Ceci est un site de démonstration en lecture seule !",
"Timestamp": "Timestamp",
"Tokens": "Jetons",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Infobulle",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Type de jeton",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Services de connexions tiers",
"3rd-party logins - Tooltip": "Service de connexions tiers liés au compte",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Inclure les champs étendus du compte dans l'objet JSON",
"Method - Tooltip": "Méthode HTTP",
"New Webhook": "Nouveau webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Valeur"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Salin URL halaman prompt",
"Copy signin page URL": "Salin URL halaman masuk",
"Copy signup page URL": "Salin URL halaman pendaftaran",
"Custom CSS": "Formulir CSS",
"Custom CSS - Edit": "Formulir CSS - Edit",
"Custom CSS - Tooltip": "Pengaturan CSS dari formulir pendaftaran, masuk, dan lupa kata sandi (misalnya menambahkan batas dan bayangan)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Mengedit aplikasi",
"Enable Email linking": "Aktifkan pengaitan email",
@ -52,12 +58,6 @@
"File uploaded successfully": "Berkas telah diunggah dengan sukses",
"First, last": "First, last",
"Follow organization theme": "Ikuti tema organisasi",
"Form CSS": "Formulir CSS",
"Form CSS - Edit": "Formulir CSS - Edit",
"Form CSS - Tooltip": "Pengaturan CSS dari formulir pendaftaran, masuk, dan lupa kata sandi (misalnya menambahkan batas dan bayangan)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Posisi formulir",
"Form position - Tooltip": "Tempat pendaftaran, masuk, dan lupa kata sandi",
"Grant types": "Jenis-jenis hibah",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Ini adalah situs demo hanya untuk dibaca saja!",
"Timestamp": "Timestamp",
"Tokens": "Token-token",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Jenis token",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Masuk pihak ketiga",
"3rd-party logins - Tooltip": "Masuk sosial yang terhubung oleh pengguna",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Apakah akan menyertakan bidang-bidang tambahan pengguna dalam JSON?",
"Method - Tooltip": "Metode HTTP",
"New Webhook": "Webhook Baru",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Nilai"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "プロンプトページのURLをコピーしてください",
"Copy signin page URL": "サインインページのURLをコピーしてください",
"Copy signup page URL": "サインアップページのURLをコピーしてください",
"Custom CSS": "フォームCSS",
"Custom CSS - Edit": "フォームのCSS - 編集",
"Custom CSS - Tooltip": "サインアップ、サインイン、パスワード忘れのフォームのCSSスタイリング境界線や影の追加",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "アプリケーションを編集する",
"Enable Email linking": "イーメールリンクの有効化",
@ -52,12 +58,6 @@
"File uploaded successfully": "ファイルが正常にアップロードされました",
"First, last": "First, last",
"Follow organization theme": "組織のテーマに従ってください",
"Form CSS": "フォームCSS",
"Form CSS - Edit": "フォームのCSS - 編集",
"Form CSS - Tooltip": "サインアップ、サインイン、パスワード忘れのフォームのCSSスタイリング境界線や影の追加",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "フォームのポジション",
"Form position - Tooltip": "登録、ログイン、パスワード忘れフォームの位置",
"Grant types": "グラント種類",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "これは読み取り専用のデモサイトです!",
"Timestamp": "Timestamp",
"Tokens": "トークン",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "トークンタイプ",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "サードパーティログイン",
"3rd-party logins - Tooltip": "ユーザーによってリンクされたソーシャルログイン",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "ユーザーの拡張フィールドをJSONに含めるかどうか",
"Method - Tooltip": "HTTPメソッド",
"New Webhook": "新しいWebhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "値"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "프롬프트 페이지 URL을 복사하세요",
"Copy signin page URL": "사인인 페이지 URL 복사",
"Copy signup page URL": "가입 페이지 URL을 복사하세요",
"Custom CSS": "CSS 양식",
"Custom CSS - Edit": "폼 CSS - 편집",
"Custom CSS - Tooltip": "가입, 로그인 및 비밀번호를 잊어버린 양식의 CSS 스타일링 (예 : 테두리와 그림자 추가)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "앱 편집하기",
"Enable Email linking": "이메일 링크 사용 가능하도록 설정하기",
@ -52,12 +58,6 @@
"File uploaded successfully": "파일이 성공적으로 업로드되었습니다",
"First, last": "First, last",
"Follow organization theme": "조직의 주제를 따르세요",
"Form CSS": "CSS 양식",
"Form CSS - Edit": "폼 CSS - 편집",
"Form CSS - Tooltip": "가입, 로그인 및 비밀번호를 잊어버린 양식의 CSS 스타일링 (예 : 테두리와 그림자 추가)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "양식 위치",
"Form position - Tooltip": "가입, 로그인 및 비밀번호 재설정 양식의 위치",
"Grant types": "Grant types: 부여 유형",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "이것은 읽기 전용 데모 사이트입니다!",
"Timestamp": "Timestamp",
"Tokens": "토큰",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "토큰 유형",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "제3자 로그인",
"3rd-party logins - Tooltip": "사용자가 연결한 소셜 로그인",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "사용자의 확장 필드를 JSON에 포함할지 여부",
"Method - Tooltip": "HTTP 방법",
"New Webhook": "새로운 웹훅",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "가치"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copiar URL da página de prompt",
"Copy signin page URL": "Copiar URL da página de login",
"Copy signup page URL": "Copiar URL da página de registro",
"Custom CSS": "CSS do formulário",
"Custom CSS - Edit": "Editar CSS do formulário",
"Custom CSS - Tooltip": "Estilização CSS dos formulários de registro, login e recuperação de senha (por exemplo, adicionando bordas e sombras)",
"Custom CSS Mobile": "CSS do formulário em dispositivos móveis",
"Custom CSS Mobile - Edit": "Editar CSS do formulário em dispositivos móveis",
"Custom CSS Mobile - Tooltip": "CSS do formulário em dispositivos móveis - Dica",
"Dynamic": "Dinâmico",
"Edit Application": "Editar Aplicação",
"Enable Email linking": "Ativar vinculação de e-mail",
@ -52,12 +58,6 @@
"File uploaded successfully": "Arquivo enviado com sucesso",
"First, last": "Primeiro, último",
"Follow organization theme": "Seguir tema da organização",
"Form CSS": "CSS do formulário",
"Form CSS - Edit": "Editar CSS do formulário",
"Form CSS - Tooltip": "Estilização CSS dos formulários de registro, login e recuperação de senha (por exemplo, adicionando bordas e sombras)",
"Form CSS Mobile": "CSS do formulário em dispositivos móveis",
"Form CSS Mobile - Edit": "Editar CSS do formulário em dispositivos móveis",
"Form CSS Mobile - Tooltip": "CSS do formulário em dispositivos móveis - Dica",
"Form position": "Posição do formulário",
"Form position - Tooltip": "Localização dos formulários de registro, login e recuperação de senha",
"Grant types": "Tipos de concessão",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Este é um site de demonstração apenas para leitura!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Tipo",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Tipo de Token",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Logins de terceiros",
"3rd-party logins - Tooltip": "Logins sociais vinculados pelo usuário",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Se incluir os campos estendidos do usuário no JSON",
"Method - Tooltip": "Método HTTP",
"New Webhook": "Novo Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Valor"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Скопируйте URL страницы предложения",
"Copy signin page URL": "Скопируйте URL-адрес страницы входа",
"Copy signup page URL": "Скопируйте URL страницы регистрации",
"Custom CSS": "Форма CSS",
"Custom CSS - Edit": "Форма CSS - Редактирование",
"Custom CSS - Tooltip": "CSS-оформление форм регистрации, входа и восстановления пароля (например, добавление границ и теней)",
"Custom CSS Mobile": "CSS формы для мобильных",
"Custom CSS Mobile - Edit": "CSS формы для мобильный - редактировать",
"Custom CSS Mobile - Tooltip": "Редактирование CSS кода для мобильных устройств",
"Dynamic": "Динамическое",
"Edit Application": "Изменить приложение",
"Enable Email linking": "Включить связывание электронной почты",
@ -52,12 +58,6 @@
"File uploaded successfully": "Файл успешно загружен",
"First, last": "Имя, Фамилия",
"Follow organization theme": "Cледуйте теме организации",
"Form CSS": "Форма CSS",
"Form CSS - Edit": "Форма CSS - Редактирование",
"Form CSS - Tooltip": "CSS-оформление форм регистрации, входа и восстановления пароля (например, добавление границ и теней)",
"Form CSS Mobile": "CSS формы для мобильных",
"Form CSS Mobile - Edit": "CSS формы для мобильный - редактировать",
"Form CSS Mobile - Tooltip": "Редактирование CSS кода для мобильных устройств",
"Form position": "Позиция формы",
"Form position - Tooltip": "Местоположение форм регистрации, входа и восстановления пароля",
"Grant types": "Типы грантов",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Это демонстрационный сайт только для чтения!",
"Timestamp": "Timestamp",
"Tokens": "Токены",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Тип токена",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Авторизация сторонних участников",
"3rd-party logins - Tooltip": "Социальные логины, связанные пользователем",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Нужно ли включать расширенные поля пользователя в формате JSON?",
"Method - Tooltip": "Метод HTTP",
"New Webhook": "Новый вебхук",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Значение"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Prompt Page URL 'ini kopyala",
"Copy signin page URL": "Giriş sayfası URL 'ini kopyala",
"Copy signup page URL": "Kayıt sayfası URL 'ini kopyala",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dinamik",
"Edit Application": "Uygulamayı düzenle",
"Enable Email linking": "Eposta bağlantısı aktif",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "Adı, Soyadı",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Bu site sadece görüntüleme amaçlıdır!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Copy prompt page URL",
"Copy signin page URL": "Copy signin page URL",
"Copy signup page URL": "Copy signup page URL",
"Custom CSS": "Custom CSS",
"Custom CSS - Edit": "Custom CSS - Edit",
"Custom CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Edit Application",
"Enable Email linking": "Enable Email linking",
@ -52,12 +58,6 @@
"File uploaded successfully": "File uploaded successfully",
"First, last": "First, last",
"Follow organization theme": "Follow organization theme",
"Form CSS": "Form CSS",
"Form CSS - Edit": "Form CSS - Edit",
"Form CSS - Tooltip": "CSS styling of the signup, signin and forget password forms (e.g. adding borders and shadows)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Form position",
"Form position - Tooltip": "Location of the signup, signin and forget password forms",
"Grant types": "Grant types",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "This is a read-only demo site!",
"Timestamp": "Timestamp",
"Tokens": "Tokens",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Token type",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "3rd-party logins",
"3rd-party logins - Tooltip": "Social logins linked by the user",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Whether to include the user's extended fields in the JSON",
"Method - Tooltip": "HTTP method",
"New Webhook": "New Webhook",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Value"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "Sao chép URL của trang nhắc nhở",
"Copy signin page URL": "Sao chép URL trang đăng nhập",
"Copy signup page URL": "Sao chép URL trang đăng ký",
"Custom CSS": "Mẫu CSS",
"Custom CSS - Edit": "Biểu mẫu CSS - Sửa",
"Custom CSS - Tooltip": "Phong cách CSS của các biểu mẫu đăng ký, đăng nhập và quên mật khẩu (ví dụ: thêm đường viền và bóng)",
"Custom CSS Mobile": "Custom CSS Mobile",
"Custom CSS Mobile - Edit": "Custom CSS Mobile - Edit",
"Custom CSS Mobile - Tooltip": "Custom CSS Mobile - Tooltip",
"Dynamic": "Dynamic",
"Edit Application": "Sửa ứng dụng",
"Enable Email linking": "Cho phép liên kết Email",
@ -52,12 +58,6 @@
"File uploaded successfully": "Tệp được tải lên thành công",
"First, last": "Tên, Họ",
"Follow organization theme": "Theo giao diện tổ chức",
"Form CSS": "Mẫu CSS",
"Form CSS - Edit": "Biểu mẫu CSS - Sửa",
"Form CSS - Tooltip": "Phong cách CSS của các biểu mẫu đăng ký, đăng nhập và quên mật khẩu (ví dụ: thêm đường viền và bóng)",
"Form CSS Mobile": "Form CSS Mobile",
"Form CSS Mobile - Edit": "Form CSS Mobile - Edit",
"Form CSS Mobile - Tooltip": "Form CSS Mobile - Tooltip",
"Form position": "Vị trí của hình thức",
"Form position - Tooltip": "Vị trí của các biểu mẫu đăng ký, đăng nhập và quên mật khẩu",
"Grant types": "Loại hỗ trợ",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "Đây là trang web giới thiệu chỉ có chức năng đọc!",
"Timestamp": "Timestamp",
"Tokens": "Mã thông báo",
"Transactions": "Transactions",
"Type": "Type",
"Type - Tooltip": "Type - Tooltip",
"URL": "URL",
@ -1031,6 +1032,13 @@
"Token type": "Loại mã thông báo",
"Token type - Tooltip": "Token type - Tooltip"
},
"transaction": {
"Amount": "Amount",
"Amount - Tooltip": "The amount of traded products",
"Edit Transaction": "Edit Transaction",
"New Transaction": "New Transaction",
"Tag - Tooltip": "The tag of the transaction"
},
"user": {
"3rd-party logins": "Đăng nhập bên thứ ba",
"3rd-party logins - Tooltip": "Đăng nhập xã hội liên kết bởi người dùng",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "Có nên bao gồm các trường mở rộng của người dùng trong định dạng JSON không?",
"Method - Tooltip": "Phương thức HTTP",
"New Webhook": "Webhook mới",
"Single org only": "Single org only",
"Single org only - Tooltip": "Triggered only in the organization that the webhook belongs to",
"Value": "Giá trị"
}
}

View File

@ -30,6 +30,12 @@
"Copy prompt page URL": "复制提醒页面URL",
"Copy signin page URL": "复制登录页面URL",
"Copy signup page URL": "复制注册页面URL",
"Custom CSS": "表单CSS",
"Custom CSS - Edit": "编辑表单CSS",
"Custom CSS - Tooltip": "注册、登录、忘记密码等表单的CSS样式如增加边框和阴影",
"Custom CSS Mobile": "表单CSS移动端",
"Custom CSS Mobile - Edit": "编辑表单CSS移动端",
"Custom CSS Mobile - Tooltip": "注册、登录、忘记密码等表单的CSS样式如增加边框和阴影移动端",
"Dynamic": "动态开启",
"Edit Application": "编辑应用",
"Enable Email linking": "自动关联邮箱相同的账号",
@ -52,12 +58,6 @@
"File uploaded successfully": "文件上传成功",
"First, last": "名字, 姓氏",
"Follow organization theme": "使用组织主题",
"Form CSS": "表单CSS",
"Form CSS - Edit": "编辑表单CSS",
"Form CSS - Tooltip": "注册、登录、忘记密码等表单的CSS样式如增加边框和阴影",
"Form CSS Mobile": "表单CSS移动端",
"Form CSS Mobile - Edit": "编辑表单CSS移动端",
"Form CSS Mobile - Tooltip": "注册、登录、忘记密码等表单的CSS样式如增加边框和阴影移动端",
"Form position": "表单位置",
"Form position - Tooltip": "注册、登录、忘记密码等表单的位置",
"Grant types": "OAuth授权类型",
@ -367,6 +367,7 @@
"This is a read-only demo site!": "这是一个只读演示站点!",
"Timestamp": "时间",
"Tokens": "令牌",
"Transactions": "交易",
"Type": "类型",
"Type - Tooltip": "类型",
"URL": "链接",
@ -1031,6 +1032,13 @@
"Token type": "令牌类型",
"Token type - Tooltip": "令牌类型"
},
"transaction": {
"Amount": "数量",
"Amount - Tooltip": "交易产品的数量",
"Edit Transaction": "编辑交易",
"New Transaction": "添加交易",
"Tag - Tooltip": "交易的标签"
},
"user": {
"3rd-party logins": "第三方登录",
"3rd-party logins - Tooltip": "用户所绑定的社会化登录",
@ -1142,6 +1150,8 @@
"Is user extended - Tooltip": "是否在JSON里加入用户的扩展字段",
"Method - Tooltip": "HTTP方法",
"New Webhook": "添加Webhook",
"Single org only": "仅本组织",
"Single org only - Tooltip": "仅在Webhook所在组织触发",
"Value": "值"
}
}

View File

@ -76,6 +76,11 @@ class ProviderTable extends React.Component {
this.updateField(table, index, "name", value);
const provider = Setting.getArrayItem(this.props.providers, "name", value);
this.updateField(table, index, "provider", provider);
// If the provider is email or SMS, set the rule to "all" instead of the default "None"
if (provider.category === "Email" || provider.category === "SMS") {
this.updateField(table, index, "rule", "all");
}
}} >
{
Setting.getDeduplicatedArray(this.props.providers, table, "name").map((provider, index) => <Option key={index} value={provider.name}>{provider.name}</Option>)

View File

@ -178,7 +178,7 @@ class SigninTable extends React.Component {
},
},
{
title: i18next.t("application:Form CSS"),
title: i18next.t("application:Custom CSS"),
dataIndex: "label",
key: "label",
width: "200px",