mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-10 01:56:49 +08:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
04567babf8 | |||
543b316942 | |||
e2b6e8ee6e | |||
e7e0518517 | |||
943aa61869 | |||
fcc75dd3be |
@ -63,7 +63,7 @@ func (c *ApiController) GetApplications() {
|
|||||||
// @Title GetApplication
|
// @Title GetApplication
|
||||||
// @Tag Application API
|
// @Tag Application API
|
||||||
// @Description get the detail of an application
|
// @Description get the detail of an application
|
||||||
// @Param id query string true "The id of the application."
|
// @Param id query string true "The id ( owner/name ) of the application."
|
||||||
// @Success 200 {object} object.Application The Response object
|
// @Success 200 {object} object.Application The Response object
|
||||||
// @router /get-application [get]
|
// @router /get-application [get]
|
||||||
func (c *ApiController) GetApplication() {
|
func (c *ApiController) GetApplication() {
|
||||||
@ -78,7 +78,7 @@ func (c *ApiController) GetApplication() {
|
|||||||
// @Title GetUserApplication
|
// @Title GetUserApplication
|
||||||
// @Tag Application API
|
// @Tag Application API
|
||||||
// @Description get the detail of the user's application
|
// @Description get the detail of the user's application
|
||||||
// @Param id query string true "The id of the user"
|
// @Param id query string true "The id ( owner/name ) of the user"
|
||||||
// @Success 200 {object} object.Application The Response object
|
// @Success 200 {object} object.Application The Response object
|
||||||
// @router /get-user-application [get]
|
// @router /get-user-application [get]
|
||||||
func (c *ApiController) GetUserApplication() {
|
func (c *ApiController) GetUserApplication() {
|
||||||
@ -134,7 +134,7 @@ func (c *ApiController) GetOrganizationApplications() {
|
|||||||
// @Title UpdateApplication
|
// @Title UpdateApplication
|
||||||
// @Tag Application API
|
// @Tag Application API
|
||||||
// @Description update an application
|
// @Description update an application
|
||||||
// @Param id query string true "The id of the application"
|
// @Param id query string true "The id ( owner/name ) of the application"
|
||||||
// @Param body body object.Application true "The details of the application"
|
// @Param body body object.Application true "The details of the application"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-application [post]
|
// @router /update-application [post]
|
||||||
|
@ -52,7 +52,7 @@ func (c *ApiController) GetCerts() {
|
|||||||
// @Title GetCert
|
// @Title GetCert
|
||||||
// @Tag Cert API
|
// @Tag Cert API
|
||||||
// @Description get cert
|
// @Description get cert
|
||||||
// @Param id query string true "The id of the cert"
|
// @Param id query string true "The id ( owner/name ) of the cert"
|
||||||
// @Success 200 {object} object.Cert The Response object
|
// @Success 200 {object} object.Cert The Response object
|
||||||
// @router /get-cert [get]
|
// @router /get-cert [get]
|
||||||
func (c *ApiController) GetCert() {
|
func (c *ApiController) GetCert() {
|
||||||
@ -66,7 +66,7 @@ func (c *ApiController) GetCert() {
|
|||||||
// @Title UpdateCert
|
// @Title UpdateCert
|
||||||
// @Tag Cert API
|
// @Tag Cert API
|
||||||
// @Description update cert
|
// @Description update cert
|
||||||
// @Param id query string true "The id of the cert"
|
// @Param id query string true "The id ( owner/name ) of the cert"
|
||||||
// @Param body body object.Cert true "The details of the cert"
|
// @Param body body object.Cert true "The details of the cert"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-cert [post]
|
// @router /update-cert [post]
|
||||||
|
@ -52,7 +52,7 @@ func (c *ApiController) GetModels() {
|
|||||||
// @Title GetModel
|
// @Title GetModel
|
||||||
// @Tag Model API
|
// @Tag Model API
|
||||||
// @Description get model
|
// @Description get model
|
||||||
// @Param id query string true "The id of the model"
|
// @Param id query string true "The id ( owner/name ) of the model"
|
||||||
// @Success 200 {object} object.Model The Response object
|
// @Success 200 {object} object.Model The Response object
|
||||||
// @router /get-model [get]
|
// @router /get-model [get]
|
||||||
func (c *ApiController) GetModel() {
|
func (c *ApiController) GetModel() {
|
||||||
@ -66,7 +66,7 @@ func (c *ApiController) GetModel() {
|
|||||||
// @Title UpdateModel
|
// @Title UpdateModel
|
||||||
// @Tag Model API
|
// @Tag Model API
|
||||||
// @Description update model
|
// @Description update model
|
||||||
// @Param id query string true "The id of the model"
|
// @Param id query string true "The id ( owner/name ) of the model"
|
||||||
// @Param body body object.Model true "The details of the model"
|
// @Param body body object.Model true "The details of the model"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-model [post]
|
// @router /update-model [post]
|
||||||
|
@ -66,7 +66,7 @@ func (c *ApiController) GetOrganization() {
|
|||||||
// @Title UpdateOrganization
|
// @Title UpdateOrganization
|
||||||
// @Tag Organization API
|
// @Tag Organization API
|
||||||
// @Description update organization
|
// @Description update organization
|
||||||
// @Param id query string true "The id of the organization"
|
// @Param id query string true "The id ( owner/name ) of the organization"
|
||||||
// @Param body body object.Organization true "The details of the organization"
|
// @Param body body object.Organization true "The details of the organization"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-organization [post]
|
// @router /update-organization [post]
|
||||||
|
@ -71,7 +71,7 @@ func (c *ApiController) GetUserPayments() {
|
|||||||
// @Title GetPayment
|
// @Title GetPayment
|
||||||
// @Tag Payment API
|
// @Tag Payment API
|
||||||
// @Description get payment
|
// @Description get payment
|
||||||
// @Param id query string true "The id of the payment"
|
// @Param id query string true "The id ( owner/name ) of the payment"
|
||||||
// @Success 200 {object} object.Payment The Response object
|
// @Success 200 {object} object.Payment The Response object
|
||||||
// @router /get-payment [get]
|
// @router /get-payment [get]
|
||||||
func (c *ApiController) GetPayment() {
|
func (c *ApiController) GetPayment() {
|
||||||
@ -85,7 +85,7 @@ func (c *ApiController) GetPayment() {
|
|||||||
// @Title UpdatePayment
|
// @Title UpdatePayment
|
||||||
// @Tag Payment API
|
// @Tag Payment API
|
||||||
// @Description update payment
|
// @Description update payment
|
||||||
// @Param id query string true "The id of the payment"
|
// @Param id query string true "The id ( owner/name ) of the payment"
|
||||||
// @Param body body object.Payment true "The details of the payment"
|
// @Param body body object.Payment true "The details of the payment"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-payment [post]
|
// @router /update-payment [post]
|
||||||
@ -172,7 +172,7 @@ func (c *ApiController) NotifyPayment() {
|
|||||||
// @Title InvoicePayment
|
// @Title InvoicePayment
|
||||||
// @Tag Payment API
|
// @Tag Payment API
|
||||||
// @Description invoice payment
|
// @Description invoice payment
|
||||||
// @Param id query string true "The id of the payment"
|
// @Param id query string true "The id ( owner/name ) of the payment"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /invoice-payment [post]
|
// @router /invoice-payment [post]
|
||||||
func (c *ApiController) InvoicePayment() {
|
func (c *ApiController) InvoicePayment() {
|
||||||
|
@ -69,7 +69,7 @@ func (c *ApiController) GetPermissionsBySubmitter() {
|
|||||||
// @Title GetPermissionsByRole
|
// @Title GetPermissionsByRole
|
||||||
// @Tag Permission API
|
// @Tag Permission API
|
||||||
// @Description get permissions by role
|
// @Description get permissions by role
|
||||||
// @Param id query string true "The id of the role"
|
// @Param id query string true "The id ( owner/name ) of the role"
|
||||||
// @Success 200 {array} object.Permission The Response object
|
// @Success 200 {array} object.Permission The Response object
|
||||||
// @router /get-permissions-by-role [get]
|
// @router /get-permissions-by-role [get]
|
||||||
func (c *ApiController) GetPermissionsByRole() {
|
func (c *ApiController) GetPermissionsByRole() {
|
||||||
@ -83,7 +83,7 @@ func (c *ApiController) GetPermissionsByRole() {
|
|||||||
// @Title GetPermission
|
// @Title GetPermission
|
||||||
// @Tag Permission API
|
// @Tag Permission API
|
||||||
// @Description get permission
|
// @Description get permission
|
||||||
// @Param id query string true "The id of the permission"
|
// @Param id query string true "The id ( owner/name ) of the permission"
|
||||||
// @Success 200 {object} object.Permission The Response object
|
// @Success 200 {object} object.Permission The Response object
|
||||||
// @router /get-permission [get]
|
// @router /get-permission [get]
|
||||||
func (c *ApiController) GetPermission() {
|
func (c *ApiController) GetPermission() {
|
||||||
@ -97,7 +97,7 @@ func (c *ApiController) GetPermission() {
|
|||||||
// @Title UpdatePermission
|
// @Title UpdatePermission
|
||||||
// @Tag Permission API
|
// @Tag Permission API
|
||||||
// @Description update permission
|
// @Description update permission
|
||||||
// @Param id query string true "The id of the permission"
|
// @Param id query string true "The id ( owner/name ) of the permission"
|
||||||
// @Param body body object.Permission true "The details of the permission"
|
// @Param body body object.Permission true "The details of the permission"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-permission [post]
|
// @router /update-permission [post]
|
||||||
|
@ -53,7 +53,7 @@ func (c *ApiController) GetProducts() {
|
|||||||
// @Title GetProduct
|
// @Title GetProduct
|
||||||
// @Tag Product API
|
// @Tag Product API
|
||||||
// @Description get product
|
// @Description get product
|
||||||
// @Param id query string true "The id of the product"
|
// @Param id query string true "The id ( owner/name ) of the product"
|
||||||
// @Success 200 {object} object.Product The Response object
|
// @Success 200 {object} object.Product The Response object
|
||||||
// @router /get-product [get]
|
// @router /get-product [get]
|
||||||
func (c *ApiController) GetProduct() {
|
func (c *ApiController) GetProduct() {
|
||||||
@ -70,7 +70,7 @@ func (c *ApiController) GetProduct() {
|
|||||||
// @Title UpdateProduct
|
// @Title UpdateProduct
|
||||||
// @Tag Product API
|
// @Tag Product API
|
||||||
// @Description update product
|
// @Description update product
|
||||||
// @Param id query string true "The id of the product"
|
// @Param id query string true "The id ( owner/name ) of the product"
|
||||||
// @Param body body object.Product true "The details of the product"
|
// @Param body body object.Product true "The details of the product"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-product [post]
|
// @router /update-product [post]
|
||||||
@ -130,7 +130,7 @@ func (c *ApiController) DeleteProduct() {
|
|||||||
// @Title BuyProduct
|
// @Title BuyProduct
|
||||||
// @Tag Product API
|
// @Tag Product API
|
||||||
// @Description buy product
|
// @Description buy product
|
||||||
// @Param id query string true "The id of the product"
|
// @Param id query string true "The id ( owner/name ) of the product"
|
||||||
// @Param providerName query string true "The name of the provider"
|
// @Param providerName query string true "The name of the provider"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /buy-product [post]
|
// @router /buy-product [post]
|
||||||
|
@ -76,7 +76,7 @@ func (c *ApiController) GetGlobalProviders() {
|
|||||||
// @Title GetProvider
|
// @Title GetProvider
|
||||||
// @Tag Provider API
|
// @Tag Provider API
|
||||||
// @Description get provider
|
// @Description get provider
|
||||||
// @Param id query string true "The id of the provider"
|
// @Param id query string true "The id ( owner/name ) of the provider"
|
||||||
// @Success 200 {object} object.Provider The Response object
|
// @Success 200 {object} object.Provider The Response object
|
||||||
// @router /get-provider [get]
|
// @router /get-provider [get]
|
||||||
func (c *ApiController) GetProvider() {
|
func (c *ApiController) GetProvider() {
|
||||||
@ -89,7 +89,7 @@ func (c *ApiController) GetProvider() {
|
|||||||
// @Title UpdateProvider
|
// @Title UpdateProvider
|
||||||
// @Tag Provider API
|
// @Tag Provider API
|
||||||
// @Description update provider
|
// @Description update provider
|
||||||
// @Param id query string true "The id of the provider"
|
// @Param id query string true "The id ( owner/name ) of the provider"
|
||||||
// @Param body body object.Provider true "The details of the provider"
|
// @Param body body object.Provider true "The details of the provider"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-provider [post]
|
// @router /update-provider [post]
|
||||||
|
@ -52,7 +52,7 @@ func (c *ApiController) GetRoles() {
|
|||||||
// @Title GetRole
|
// @Title GetRole
|
||||||
// @Tag Role API
|
// @Tag Role API
|
||||||
// @Description get role
|
// @Description get role
|
||||||
// @Param id query string true "The id of the role"
|
// @Param id query string true "The id ( owner/name ) of the role"
|
||||||
// @Success 200 {object} object.Role The Response object
|
// @Success 200 {object} object.Role The Response object
|
||||||
// @router /get-role [get]
|
// @router /get-role [get]
|
||||||
func (c *ApiController) GetRole() {
|
func (c *ApiController) GetRole() {
|
||||||
@ -66,7 +66,7 @@ func (c *ApiController) GetRole() {
|
|||||||
// @Title UpdateRole
|
// @Title UpdateRole
|
||||||
// @Tag Role API
|
// @Tag Role API
|
||||||
// @Description update role
|
// @Description update role
|
||||||
// @Param id query string true "The id of the role"
|
// @Param id query string true "The id ( owner/name ) of the role"
|
||||||
// @Param body body object.Role true "The details of the role"
|
// @Param body body object.Role true "The details of the role"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-role [post]
|
// @router /update-role [post]
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
// @Title DeleteSession
|
// @Title DeleteSession
|
||||||
// @Tag Session API
|
// @Tag Session API
|
||||||
// @Description Delete session by userId
|
// @Description Delete session by userId
|
||||||
// @Param ID query string true "The ID(owner/name) of user."
|
// @Param id query string true "The id ( owner/name )(owner/name) of user."
|
||||||
// @Success 200 {array} string The Response object
|
// @Success 200 {array} string The Response object
|
||||||
// @router /delete-session [post]
|
// @router /delete-session [post]
|
||||||
func (c *ApiController) DeleteSession() {
|
func (c *ApiController) DeleteSession() {
|
||||||
|
@ -52,7 +52,7 @@ func (c *ApiController) GetSyncers() {
|
|||||||
// @Title GetSyncer
|
// @Title GetSyncer
|
||||||
// @Tag Syncer API
|
// @Tag Syncer API
|
||||||
// @Description get syncer
|
// @Description get syncer
|
||||||
// @Param id query string true "The id of the syncer"
|
// @Param id query string true "The id ( owner/name ) of the syncer"
|
||||||
// @Success 200 {object} object.Syncer The Response object
|
// @Success 200 {object} object.Syncer The Response object
|
||||||
// @router /get-syncer [get]
|
// @router /get-syncer [get]
|
||||||
func (c *ApiController) GetSyncer() {
|
func (c *ApiController) GetSyncer() {
|
||||||
@ -66,7 +66,7 @@ func (c *ApiController) GetSyncer() {
|
|||||||
// @Title UpdateSyncer
|
// @Title UpdateSyncer
|
||||||
// @Tag Syncer API
|
// @Tag Syncer API
|
||||||
// @Description update syncer
|
// @Description update syncer
|
||||||
// @Param id query string true "The id of the syncer"
|
// @Param id query string true "The id ( owner/name ) of the syncer"
|
||||||
// @Param body body object.Syncer true "The details of the syncer"
|
// @Param body body object.Syncer true "The details of the syncer"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-syncer [post]
|
// @router /update-syncer [post]
|
||||||
|
@ -29,7 +29,7 @@ type SystemInfo struct {
|
|||||||
// @Title GetSystemInfo
|
// @Title GetSystemInfo
|
||||||
// @Tag System API
|
// @Tag System API
|
||||||
// @Description get user's system info
|
// @Description get user's system info
|
||||||
// @Param id query string true "The id of the user"
|
// @Param id query string true "The id ( owner/name ) of the user"
|
||||||
// @Success 200 {object} object.SystemInfo The Response object
|
// @Success 200 {object} object.SystemInfo The Response object
|
||||||
// @router /get-system-info [get]
|
// @router /get-system-info [get]
|
||||||
func (c *ApiController) GetSystemInfo() {
|
func (c *ApiController) GetSystemInfo() {
|
||||||
|
@ -54,7 +54,7 @@ func (c *ApiController) GetTokens() {
|
|||||||
// @Title GetToken
|
// @Title GetToken
|
||||||
// @Tag Token API
|
// @Tag Token API
|
||||||
// @Description get token
|
// @Description get token
|
||||||
// @Param id query string true "The id of token"
|
// @Param id query string true "The id ( owner/name ) of token"
|
||||||
// @Success 200 {object} object.Token The Response object
|
// @Success 200 {object} object.Token The Response object
|
||||||
// @router /get-token [get]
|
// @router /get-token [get]
|
||||||
func (c *ApiController) GetToken() {
|
func (c *ApiController) GetToken() {
|
||||||
@ -68,7 +68,7 @@ func (c *ApiController) GetToken() {
|
|||||||
// @Title UpdateToken
|
// @Title UpdateToken
|
||||||
// @Tag Token API
|
// @Tag Token API
|
||||||
// @Description update token
|
// @Description update token
|
||||||
// @Param id query string true "The id of token"
|
// @Param id query string true "The id ( owner/name ) of token"
|
||||||
// @Param body body object.Token true "Details of the token"
|
// @Param body body object.Token true "Details of the token"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-token [post]
|
// @router /update-token [post]
|
||||||
@ -128,7 +128,7 @@ func (c *ApiController) DeleteToken() {
|
|||||||
// @Title GetOAuthCode
|
// @Title GetOAuthCode
|
||||||
// @Tag Token API
|
// @Tag Token API
|
||||||
// @Description get OAuth code
|
// @Description get OAuth code
|
||||||
// @Param user_id query string true "The id of user"
|
// @Param id query string true "The id ( owner/name ) of user"
|
||||||
// @Param client_id query string true "OAuth client id"
|
// @Param client_id query string true "OAuth client id"
|
||||||
// @Param response_type query string true "OAuth response type"
|
// @Param response_type query string true "OAuth response type"
|
||||||
// @Param redirect_uri query string true "OAuth redirect URI"
|
// @Param redirect_uri query string true "OAuth redirect URI"
|
||||||
|
@ -80,7 +80,7 @@ func (c *ApiController) GetUsers() {
|
|||||||
// @Title GetUser
|
// @Title GetUser
|
||||||
// @Tag User API
|
// @Tag User API
|
||||||
// @Description get user
|
// @Description get user
|
||||||
// @Param id query string true "The id of the user"
|
// @Param id query string true "The id ( owner/name ) of the user"
|
||||||
// @Param owner query string false "The owner of the user"
|
// @Param owner query string false "The owner of the user"
|
||||||
// @Param email query string false "The email of the user"
|
// @Param email query string false "The email of the user"
|
||||||
// @Param phone query string false "The phone of the user"
|
// @Param phone query string false "The phone of the user"
|
||||||
@ -129,7 +129,7 @@ func (c *ApiController) GetUser() {
|
|||||||
// @Title UpdateUser
|
// @Title UpdateUser
|
||||||
// @Tag User API
|
// @Tag User API
|
||||||
// @Description update user
|
// @Description update user
|
||||||
// @Param id query string true "The id of the user"
|
// @Param id query string true "The id ( owner/name ) of the user"
|
||||||
// @Param body body object.User true "The details of the user"
|
// @Param body body object.User true "The details of the user"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-user [post]
|
// @router /update-user [post]
|
||||||
|
@ -52,7 +52,7 @@ func (c *ApiController) GetWebhooks() {
|
|||||||
// @Title GetWebhook
|
// @Title GetWebhook
|
||||||
// @Tag Webhook API
|
// @Tag Webhook API
|
||||||
// @Description get webhook
|
// @Description get webhook
|
||||||
// @Param id query string true "The id of the webhook"
|
// @Param id query string true "The id ( owner/name ) of the webhook"
|
||||||
// @Success 200 {object} object.Webhook The Response object
|
// @Success 200 {object} object.Webhook The Response object
|
||||||
// @router /get-webhook [get]
|
// @router /get-webhook [get]
|
||||||
func (c *ApiController) GetWebhook() {
|
func (c *ApiController) GetWebhook() {
|
||||||
@ -66,7 +66,7 @@ func (c *ApiController) GetWebhook() {
|
|||||||
// @Title UpdateWebhook
|
// @Title UpdateWebhook
|
||||||
// @Tag Webhook API
|
// @Tag Webhook API
|
||||||
// @Description update webhook
|
// @Description update webhook
|
||||||
// @Param id query string true "The id of the webhook"
|
// @Param id query string true "The id ( owner/name ) of the webhook"
|
||||||
// @Param body body object.Webhook true "The details of the webhook"
|
// @Param body body object.Webhook true "The details of the webhook"
|
||||||
// @Success 200 {object} controllers.Response The Response object
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-webhook [post]
|
// @router /update-webhook [post]
|
||||||
|
@ -28,7 +28,6 @@ import (
|
|||||||
_ "modernc.org/sqlite" // db = sqlite
|
_ "modernc.org/sqlite" // db = sqlite
|
||||||
"xorm.io/core"
|
"xorm.io/core"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
"xorm.io/xorm/migrate"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var adapter *Adapter
|
var adapter *Adapter
|
||||||
@ -42,7 +41,7 @@ func InitConfig() {
|
|||||||
beego.BConfig.WebConfig.Session.SessionOn = true
|
beego.BConfig.WebConfig.Session.SessionOn = true
|
||||||
|
|
||||||
InitAdapter(true)
|
InitAdapter(true)
|
||||||
initMigrations()
|
MigrateDatabase()
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitAdapter(createDatabase bool) {
|
func InitAdapter(createDatabase bool) {
|
||||||
@ -252,22 +251,3 @@ func GetSession(owner string, offset, limit int, field, value, sortField, sortOr
|
|||||||
}
|
}
|
||||||
return session
|
return session
|
||||||
}
|
}
|
||||||
|
|
||||||
func initMigrations() {
|
|
||||||
migrations := []*migrate.Migration{
|
|
||||||
{
|
|
||||||
ID: "20221015CasbinRule--fill ptype field with p",
|
|
||||||
Migrate: func(tx *xorm.Engine) error {
|
|
||||||
_, err := tx.Cols("ptype").Update(&xormadapter.CasbinRule{
|
|
||||||
Ptype: "p",
|
|
||||||
})
|
|
||||||
return err
|
|
||||||
},
|
|
||||||
Rollback: func(tx *xorm.Engine) error {
|
|
||||||
return tx.DropTables(&xormadapter.CasbinRule{})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
m := migrate.New(adapter.Engine, migrate.DefaultOptions, migrations)
|
|
||||||
m.Migrate()
|
|
||||||
}
|
|
||||||
|
@ -25,8 +25,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func InitDb() {
|
func InitDb() {
|
||||||
MigratePermissionRule()
|
|
||||||
|
|
||||||
existed := initBuiltInOrganization()
|
existed := initBuiltInOrganization()
|
||||||
if !existed {
|
if !existed {
|
||||||
initBuiltInModel()
|
initBuiltInModel()
|
||||||
@ -36,6 +34,8 @@ func InitDb() {
|
|||||||
initBuiltInApplication()
|
initBuiltInApplication()
|
||||||
initBuiltInCert()
|
initBuiltInCert()
|
||||||
initBuiltInLdap()
|
initBuiltInLdap()
|
||||||
|
} else {
|
||||||
|
MigrateDatabase()
|
||||||
}
|
}
|
||||||
|
|
||||||
initWebAuthn()
|
initWebAuthn()
|
||||||
|
85
object/migrate.go
Normal file
85
object/migrate.go
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
// Copyright 2023 The Casdoor Authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.package object
|
||||||
|
|
||||||
|
package object
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
xormadapter "github.com/casbin/xorm-adapter/v3"
|
||||||
|
"xorm.io/xorm"
|
||||||
|
"xorm.io/xorm/migrate"
|
||||||
|
)
|
||||||
|
|
||||||
|
func MigrateDatabase() {
|
||||||
|
migrations := []*migrate.Migration{
|
||||||
|
MigrateCasbinRule(),
|
||||||
|
MigratePermissionRule(),
|
||||||
|
}
|
||||||
|
|
||||||
|
m := migrate.New(adapter.Engine, migrate.DefaultOptions, migrations)
|
||||||
|
m.Migrate()
|
||||||
|
}
|
||||||
|
|
||||||
|
func MigrateCasbinRule() *migrate.Migration {
|
||||||
|
migration := migrate.Migration{
|
||||||
|
ID: "20221015CasbinRule--fill ptype field with p",
|
||||||
|
Migrate: func(engine *xorm.Engine) error {
|
||||||
|
_, err := engine.Cols("ptype").Update(&xormadapter.CasbinRule{
|
||||||
|
Ptype: "p",
|
||||||
|
})
|
||||||
|
return err
|
||||||
|
},
|
||||||
|
Rollback: func(engine *xorm.Engine) error {
|
||||||
|
return engine.DropTables(&xormadapter.CasbinRule{})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return &migration
|
||||||
|
}
|
||||||
|
|
||||||
|
func MigratePermissionRule() *migrate.Migration {
|
||||||
|
migration := migrate.Migration{
|
||||||
|
ID: "20230209MigratePermissionRule--Use V5 instead of V1 to store permissionID",
|
||||||
|
Migrate: func(engine *xorm.Engine) error {
|
||||||
|
models := []*Model{}
|
||||||
|
err := engine.Find(&models, &Model{})
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
isHit := false
|
||||||
|
for _, model := range models {
|
||||||
|
if strings.Contains(model.ModelText, "permission") {
|
||||||
|
// update model table
|
||||||
|
model.ModelText = strings.Replace(model.ModelText, "permission,", "", -1)
|
||||||
|
UpdateModel(model.GetId(), model)
|
||||||
|
isHit = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if isHit {
|
||||||
|
// update permission_rule table
|
||||||
|
sql := "UPDATE `permission_rule`SET V0 = V1, V1 = V2, V2 = V3, V3 = V4, V4 = V5 WHERE V0 IN (SELECT CONCAT(owner, '/', name) AS permission_id FROM `permission`)"
|
||||||
|
_, err = engine.Exec(sql)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return &migration
|
||||||
|
}
|
@ -16,7 +16,6 @@ package object
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/casdoor/casdoor/util"
|
"github.com/casdoor/casdoor/util"
|
||||||
"xorm.io/core"
|
"xorm.io/core"
|
||||||
@ -269,33 +268,6 @@ func GetPermissionsBySubmitter(owner string, submitter string) []*Permission {
|
|||||||
return permissions
|
return permissions
|
||||||
}
|
}
|
||||||
|
|
||||||
func MigratePermissionRule() {
|
|
||||||
models := []*Model{}
|
|
||||||
err := adapter.Engine.Find(&models, &Model{})
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
isHit := false
|
|
||||||
for _, model := range models {
|
|
||||||
if strings.Contains(model.ModelText, "permission") {
|
|
||||||
// update model table
|
|
||||||
model.ModelText = strings.Replace(model.ModelText, "permission,", "", -1)
|
|
||||||
UpdateModel(model.GetId(), model)
|
|
||||||
isHit = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if isHit {
|
|
||||||
// update permission_rule table
|
|
||||||
sql := "UPDATE `permission_rule`SET V0 = V1, V1 = V2, V2 = V3, V3 = V4, V4 = V5 WHERE V0 IN (SELECT CONCAT(owner, '/', name) AS permission_id FROM `permission`)"
|
|
||||||
_, err = adapter.Engine.Exec(sql)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func ContainsAsterisk(userId string, users []string) bool {
|
func ContainsAsterisk(userId string, users []string) bool {
|
||||||
containsAsterisk := false
|
containsAsterisk := false
|
||||||
group, _ := util.GetOwnerAndNameFromId(userId)
|
group, _ := util.GetOwnerAndNameFromId(userId)
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
type Resource struct {
|
type Resource struct {
|
||||||
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
|
Owner string `xorm:"varchar(100) notnull pk" json:"owner"`
|
||||||
Name string `xorm:"varchar(100) notnull pk" json:"name"`
|
Name string `xorm:"varchar(180) notnull pk" json:"name"`
|
||||||
CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
|
CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
|
||||||
|
|
||||||
User string `xorm:"varchar(100)" json:"user"`
|
User string `xorm:"varchar(100)" json:"user"`
|
||||||
|
@ -74,10 +74,15 @@ func GetUploadFileUrl(provider *Provider, fullFilePath string, hasTimestamp bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileUrl := util.UrlJoin(host, escapePath(objectKey))
|
fileUrl := util.UrlJoin(host, escapePath(objectKey))
|
||||||
|
|
||||||
if hasTimestamp {
|
if hasTimestamp {
|
||||||
fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if provider.Type == "Tencent Cloud COS" {
|
||||||
|
objectKey = escapePath(objectKey)
|
||||||
|
}
|
||||||
|
|
||||||
return fileUrl, objectKey
|
return fileUrl, objectKey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the product",
|
"description": "The id ( owner/name ) of the product",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -894,8 +894,8 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "ID",
|
"name": "id",
|
||||||
"description": "The ID(owner/name) of user.",
|
"description": "The id ( owner/name )(owner/name) of user.",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1107,7 +1107,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the application.",
|
"description": "The id ( owner/name ) of the application.",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1162,7 +1162,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the cert",
|
"description": "The id ( owner/name ) of the cert",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1340,7 +1340,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the model",
|
"description": "The id ( owner/name ) of the model",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1479,7 +1479,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the payment",
|
"description": "The id ( owner/name ) of the payment",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1534,7 +1534,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the permission",
|
"description": "The id ( owner/name ) of the permission",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1589,7 +1589,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the role",
|
"description": "The id ( owner/name ) of the role",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1638,7 +1638,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the product",
|
"description": "The id ( owner/name ) of the product",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1693,7 +1693,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the provider",
|
"description": "The id ( owner/name ) of the provider",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1840,7 +1840,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the role",
|
"description": "The id ( owner/name ) of the role",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -1966,7 +1966,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the syncer",
|
"description": "The id ( owner/name ) of the syncer",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2021,7 +2021,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the user",
|
"description": "The id ( owner/name ) of the user",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2047,7 +2047,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of token",
|
"description": "The id ( owner/name ) of token",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2116,7 +2116,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the user",
|
"description": "The id ( owner/name ) of the user",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -2160,7 +2160,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the user",
|
"description": "The id ( owner/name ) of the user",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2286,7 +2286,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the webhook",
|
"description": "The id ( owner/name ) of the webhook",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2341,7 +2341,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the payment",
|
"description": "The id ( owner/name ) of the payment",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -2504,8 +2504,8 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "user_id",
|
"name": "id",
|
||||||
"description": "The id of user",
|
"description": "The id ( owner/name ) of user",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -2904,7 +2904,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the application",
|
"description": "The id ( owner/name ) of the application",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -2939,7 +2939,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the cert",
|
"description": "The id ( owner/name ) of the cert",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -2982,7 +2982,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the model",
|
"description": "The id ( owner/name ) of the model",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3017,7 +3017,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the organization",
|
"description": "The id ( owner/name ) of the organization",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3052,7 +3052,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the payment",
|
"description": "The id ( owner/name ) of the payment",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3087,7 +3087,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the permission",
|
"description": "The id ( owner/name ) of the permission",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3122,7 +3122,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the product",
|
"description": "The id ( owner/name ) of the product",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3157,7 +3157,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the provider",
|
"description": "The id ( owner/name ) of the provider",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3200,7 +3200,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the role",
|
"description": "The id ( owner/name ) of the role",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3235,7 +3235,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the syncer",
|
"description": "The id ( owner/name ) of the syncer",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3270,7 +3270,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of token",
|
"description": "The id ( owner/name ) of token",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3305,7 +3305,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the user",
|
"description": "The id ( owner/name ) of the user",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3340,7 +3340,7 @@
|
|||||||
{
|
{
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"description": "The id of the webhook",
|
"description": "The id ( owner/name ) of the webhook",
|
||||||
"required": true,
|
"required": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3505,11 +3505,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"2268.0xc0000f9650.false": {
|
"2346.0xc0001ce990.false": {
|
||||||
"title": "false",
|
"title": "false",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"2302.0xc0000f9680.false": {
|
"2381.0xc0001ce9c0.false": {
|
||||||
"title": "false",
|
"title": "false",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
@ -3636,10 +3636,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"$ref": "#/definitions/2268.0xc0000f9650.false"
|
"$ref": "#/definitions/2346.0xc0001ce990.false"
|
||||||
},
|
},
|
||||||
"data2": {
|
"data2": {
|
||||||
"$ref": "#/definitions/2302.0xc0000f9680.false"
|
"$ref": "#/definitions/2381.0xc0001ce9c0.false"
|
||||||
},
|
},
|
||||||
"msg": {
|
"msg": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -3846,6 +3846,9 @@
|
|||||||
"termsOfUse": {
|
"termsOfUse": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"themeData": {
|
||||||
|
"$ref": "#/definitions/object.ThemeData"
|
||||||
|
},
|
||||||
"tokenFormat": {
|
"tokenFormat": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -4143,6 +4146,9 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"themeData": {
|
||||||
|
"$ref": "#/definitions/object.ThemeData"
|
||||||
|
},
|
||||||
"websiteUrl": {
|
"websiteUrl": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -4727,6 +4733,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object.ThemeData": {
|
||||||
|
"title": "ThemeData",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"borderRadius": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"colorPrimary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"isCompact": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"isEnabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"themeType": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"object.Token": {
|
"object.Token": {
|
||||||
"title": "Token",
|
"title": "Token",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -4836,9 +4864,15 @@
|
|||||||
"alipay": {
|
"alipay": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"amazon": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"apple": {
|
"apple": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"auth0": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"avatar": {
|
"avatar": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4848,6 +4882,9 @@
|
|||||||
"baidu": {
|
"baidu": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"battlenet": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"bilibili": {
|
"bilibili": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4857,9 +4894,18 @@
|
|||||||
"birthday": {
|
"birthday": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"bitbucket": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"box": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"casdoor": {
|
"casdoor": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"cloudfoundry": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"createdIp": {
|
"createdIp": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4869,15 +4915,30 @@
|
|||||||
"custom": {
|
"custom": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"dailymotion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"deezer": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"digitalocean": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"dingtalk": {
|
"dingtalk": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"discord": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"displayName": {
|
"displayName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"douyin": {
|
"douyin": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"dropbox": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"education": {
|
"education": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4887,15 +4948,24 @@
|
|||||||
"emailVerified": {
|
"emailVerified": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"eveonline": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"facebook": {
|
"facebook": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"firstName": {
|
"firstName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"fitbit": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"gender": {
|
"gender": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"gitea": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"gitee": {
|
"gitee": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4911,6 +4981,9 @@
|
|||||||
"hash": {
|
"hash": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"heroku": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"homepage": {
|
"homepage": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4923,9 +4996,18 @@
|
|||||||
"idCardType": {
|
"idCardType": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"influxcloud": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"infoflow": {
|
"infoflow": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"instagram": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"intercom": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"isAdmin": {
|
"isAdmin": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
@ -4944,6 +5026,9 @@
|
|||||||
"isOnline": {
|
"isOnline": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"kakao": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"karma": {
|
"karma": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
@ -4966,6 +5051,9 @@
|
|||||||
"lastSigninWrongTime": {
|
"lastSigninWrongTime": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"lastfm": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"ldap": {
|
"ldap": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4978,18 +5066,39 @@
|
|||||||
"location": {
|
"location": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"mailru": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"managedAccounts": {
|
"managedAccounts": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/object.ManagedAccount"
|
"$ref": "#/definitions/object.ManagedAccount"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"meetup": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"microsoftonline": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"naver": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"nextcloud": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"okta": {
|
"okta": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"onedrive": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"oura": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"owner": {
|
"owner": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -4999,6 +5108,12 @@
|
|||||||
"passwordSalt": {
|
"passwordSalt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"patreon": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"paypal": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"permanentAvatar": {
|
"permanentAvatar": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -5035,10 +5150,16 @@
|
|||||||
"$ref": "#/definitions/object.Role"
|
"$ref": "#/definitions/object.Role"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"salesforce": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"score": {
|
"score": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
},
|
},
|
||||||
|
"shopify": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"signinWrongTimes": {
|
"signinWrongTimes": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
@ -5049,21 +5170,54 @@
|
|||||||
"slack": {
|
"slack": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"soundcloud": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"spotify": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"steam": {
|
"steam": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"strava": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"stripe": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"tiktok": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"tumblr": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"twitch": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"twitter": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"typetalk": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uber": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"updatedTime": {
|
"updatedTime": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"vk": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"webauthnCredentials": {
|
"webauthnCredentials": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@ -5078,6 +5232,24 @@
|
|||||||
},
|
},
|
||||||
"weibo": {
|
"weibo": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"wepay": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"xero": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"yahoo": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"yammer": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"yandex": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"zoom": {
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -375,7 +375,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the product
|
description: The id ( owner/name ) of the product
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
@ -578,8 +578,8 @@ paths:
|
|||||||
operationId: ApiController.DeleteSession
|
operationId: ApiController.DeleteSession
|
||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: ID
|
name: id
|
||||||
description: The ID(owner/name) of user.
|
description: The id ( owner/name )(owner/name) of user.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -718,7 +718,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the application.
|
description: The id ( owner/name ) of the application.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -754,7 +754,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the cert
|
description: The id ( owner/name ) of the cert
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -870,7 +870,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the model
|
description: The id ( owner/name ) of the model
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -961,7 +961,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the payment
|
description: The id ( owner/name ) of the payment
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -997,7 +997,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the permission
|
description: The id ( owner/name ) of the permission
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1033,7 +1033,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the role
|
description: The id ( owner/name ) of the role
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1065,7 +1065,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the product
|
description: The id ( owner/name ) of the product
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1101,7 +1101,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the provider
|
description: The id ( owner/name ) of the provider
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1197,7 +1197,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the role
|
description: The id ( owner/name ) of the role
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1280,7 +1280,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the syncer
|
description: The id ( owner/name ) of the syncer
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1316,7 +1316,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the user
|
description: The id ( owner/name ) of the user
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1333,7 +1333,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of token
|
description: The id ( owner/name ) of token
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1379,7 +1379,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the user
|
description: The id ( owner/name ) of the user
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
@ -1408,7 +1408,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the user
|
description: The id ( owner/name ) of the user
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1491,7 +1491,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the webhook
|
description: The id ( owner/name ) of the webhook
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1527,7 +1527,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the payment
|
description: The id ( owner/name ) of the payment
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -1636,8 +1636,8 @@ paths:
|
|||||||
operationId: ApiController.GetOAuthCode
|
operationId: ApiController.GetOAuthCode
|
||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: user_id
|
name: id
|
||||||
description: The id of user
|
description: The id ( owner/name ) of user
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
@ -1902,7 +1902,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the application
|
description: The id ( owner/name ) of the application
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -1925,7 +1925,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the cert
|
description: The id ( owner/name ) of the cert
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -1953,7 +1953,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the model
|
description: The id ( owner/name ) of the model
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -1976,7 +1976,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the organization
|
description: The id ( owner/name ) of the organization
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -1999,7 +1999,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the payment
|
description: The id ( owner/name ) of the payment
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2022,7 +2022,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the permission
|
description: The id ( owner/name ) of the permission
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2045,7 +2045,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the product
|
description: The id ( owner/name ) of the product
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2068,7 +2068,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the provider
|
description: The id ( owner/name ) of the provider
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2096,7 +2096,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the role
|
description: The id ( owner/name ) of the role
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2119,7 +2119,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the syncer
|
description: The id ( owner/name ) of the syncer
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2142,7 +2142,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of token
|
description: The id ( owner/name ) of token
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2165,7 +2165,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the user
|
description: The id ( owner/name ) of the user
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2188,7 +2188,7 @@ paths:
|
|||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
description: The id of the webhook
|
description: The id ( owner/name ) of the webhook
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- in: body
|
- in: body
|
||||||
@ -2293,10 +2293,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Response'
|
$ref: '#/definitions/Response'
|
||||||
definitions:
|
definitions:
|
||||||
2268.0xc0000f9650.false:
|
2346.0xc0001ce990.false:
|
||||||
title: "false"
|
title: "false"
|
||||||
type: object
|
type: object
|
||||||
2302.0xc0000f9680.false:
|
2381.0xc0001ce9c0.false:
|
||||||
title: "false"
|
title: "false"
|
||||||
type: object
|
type: object
|
||||||
Response:
|
Response:
|
||||||
@ -2383,9 +2383,9 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: '#/definitions/2268.0xc0000f9650.false'
|
$ref: '#/definitions/2346.0xc0001ce990.false'
|
||||||
data2:
|
data2:
|
||||||
$ref: '#/definitions/2302.0xc0000f9680.false'
|
$ref: '#/definitions/2381.0xc0001ce9c0.false'
|
||||||
msg:
|
msg:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
@ -2524,6 +2524,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
termsOfUse:
|
termsOfUse:
|
||||||
type: string
|
type: string
|
||||||
|
themeData:
|
||||||
|
$ref: '#/definitions/object.ThemeData'
|
||||||
tokenFormat:
|
tokenFormat:
|
||||||
type: string
|
type: string
|
||||||
object.Cert:
|
object.Cert:
|
||||||
@ -2724,6 +2726,8 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
themeData:
|
||||||
|
$ref: '#/definitions/object.ThemeData'
|
||||||
websiteUrl:
|
websiteUrl:
|
||||||
type: string
|
type: string
|
||||||
object.Payment:
|
object.Payment:
|
||||||
@ -3115,6 +3119,21 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
object.ThemeData:
|
||||||
|
title: ThemeData
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
borderRadius:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
colorPrimary:
|
||||||
|
type: string
|
||||||
|
isCompact:
|
||||||
|
type: boolean
|
||||||
|
isEnabled:
|
||||||
|
type: boolean
|
||||||
|
themeType:
|
||||||
|
type: string
|
||||||
object.Token:
|
object.Token:
|
||||||
title: Token
|
title: Token
|
||||||
type: object
|
type: object
|
||||||
@ -3190,46 +3209,74 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
alipay:
|
alipay:
|
||||||
type: string
|
type: string
|
||||||
|
amazon:
|
||||||
|
type: string
|
||||||
apple:
|
apple:
|
||||||
type: string
|
type: string
|
||||||
|
auth0:
|
||||||
|
type: string
|
||||||
avatar:
|
avatar:
|
||||||
type: string
|
type: string
|
||||||
azuread:
|
azuread:
|
||||||
type: string
|
type: string
|
||||||
baidu:
|
baidu:
|
||||||
type: string
|
type: string
|
||||||
|
battlenet:
|
||||||
|
type: string
|
||||||
bilibili:
|
bilibili:
|
||||||
type: string
|
type: string
|
||||||
bio:
|
bio:
|
||||||
type: string
|
type: string
|
||||||
birthday:
|
birthday:
|
||||||
type: string
|
type: string
|
||||||
|
bitbucket:
|
||||||
|
type: string
|
||||||
|
box:
|
||||||
|
type: string
|
||||||
casdoor:
|
casdoor:
|
||||||
type: string
|
type: string
|
||||||
|
cloudfoundry:
|
||||||
|
type: string
|
||||||
createdIp:
|
createdIp:
|
||||||
type: string
|
type: string
|
||||||
createdTime:
|
createdTime:
|
||||||
type: string
|
type: string
|
||||||
custom:
|
custom:
|
||||||
type: string
|
type: string
|
||||||
|
dailymotion:
|
||||||
|
type: string
|
||||||
|
deezer:
|
||||||
|
type: string
|
||||||
|
digitalocean:
|
||||||
|
type: string
|
||||||
dingtalk:
|
dingtalk:
|
||||||
type: string
|
type: string
|
||||||
|
discord:
|
||||||
|
type: string
|
||||||
displayName:
|
displayName:
|
||||||
type: string
|
type: string
|
||||||
douyin:
|
douyin:
|
||||||
type: string
|
type: string
|
||||||
|
dropbox:
|
||||||
|
type: string
|
||||||
education:
|
education:
|
||||||
type: string
|
type: string
|
||||||
email:
|
email:
|
||||||
type: string
|
type: string
|
||||||
emailVerified:
|
emailVerified:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
eveonline:
|
||||||
|
type: string
|
||||||
facebook:
|
facebook:
|
||||||
type: string
|
type: string
|
||||||
firstName:
|
firstName:
|
||||||
type: string
|
type: string
|
||||||
|
fitbit:
|
||||||
|
type: string
|
||||||
gender:
|
gender:
|
||||||
type: string
|
type: string
|
||||||
|
gitea:
|
||||||
|
type: string
|
||||||
gitee:
|
gitee:
|
||||||
type: string
|
type: string
|
||||||
github:
|
github:
|
||||||
@ -3240,6 +3287,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
hash:
|
hash:
|
||||||
type: string
|
type: string
|
||||||
|
heroku:
|
||||||
|
type: string
|
||||||
homepage:
|
homepage:
|
||||||
type: string
|
type: string
|
||||||
id:
|
id:
|
||||||
@ -3248,8 +3297,14 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
idCardType:
|
idCardType:
|
||||||
type: string
|
type: string
|
||||||
|
influxcloud:
|
||||||
|
type: string
|
||||||
infoflow:
|
infoflow:
|
||||||
type: string
|
type: string
|
||||||
|
instagram:
|
||||||
|
type: string
|
||||||
|
intercom:
|
||||||
|
type: string
|
||||||
isAdmin:
|
isAdmin:
|
||||||
type: boolean
|
type: boolean
|
||||||
isDefaultAvatar:
|
isDefaultAvatar:
|
||||||
@ -3262,6 +3317,8 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
isOnline:
|
isOnline:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
kakao:
|
||||||
|
type: string
|
||||||
karma:
|
karma:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
@ -3277,6 +3334,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
lastSigninWrongTime:
|
lastSigninWrongTime:
|
||||||
type: string
|
type: string
|
||||||
|
lastfm:
|
||||||
|
type: string
|
||||||
ldap:
|
ldap:
|
||||||
type: string
|
type: string
|
||||||
line:
|
line:
|
||||||
@ -3285,20 +3344,38 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
location:
|
location:
|
||||||
type: string
|
type: string
|
||||||
|
mailru:
|
||||||
|
type: string
|
||||||
managedAccounts:
|
managedAccounts:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.ManagedAccount'
|
$ref: '#/definitions/object.ManagedAccount'
|
||||||
|
meetup:
|
||||||
|
type: string
|
||||||
|
microsoftonline:
|
||||||
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
naver:
|
||||||
|
type: string
|
||||||
|
nextcloud:
|
||||||
|
type: string
|
||||||
okta:
|
okta:
|
||||||
type: string
|
type: string
|
||||||
|
onedrive:
|
||||||
|
type: string
|
||||||
|
oura:
|
||||||
|
type: string
|
||||||
owner:
|
owner:
|
||||||
type: string
|
type: string
|
||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
passwordSalt:
|
passwordSalt:
|
||||||
type: string
|
type: string
|
||||||
|
patreon:
|
||||||
|
type: string
|
||||||
|
paypal:
|
||||||
|
type: string
|
||||||
permanentAvatar:
|
permanentAvatar:
|
||||||
type: string
|
type: string
|
||||||
permissions:
|
permissions:
|
||||||
@ -3323,9 +3400,13 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.Role'
|
$ref: '#/definitions/object.Role'
|
||||||
|
salesforce:
|
||||||
|
type: string
|
||||||
score:
|
score:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
shopify:
|
||||||
|
type: string
|
||||||
signinWrongTimes:
|
signinWrongTimes:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
@ -3333,16 +3414,38 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
slack:
|
slack:
|
||||||
type: string
|
type: string
|
||||||
|
soundcloud:
|
||||||
|
type: string
|
||||||
|
spotify:
|
||||||
|
type: string
|
||||||
steam:
|
steam:
|
||||||
type: string
|
type: string
|
||||||
|
strava:
|
||||||
|
type: string
|
||||||
|
stripe:
|
||||||
|
type: string
|
||||||
tag:
|
tag:
|
||||||
type: string
|
type: string
|
||||||
|
tiktok:
|
||||||
|
type: string
|
||||||
title:
|
title:
|
||||||
type: string
|
type: string
|
||||||
|
tumblr:
|
||||||
|
type: string
|
||||||
|
twitch:
|
||||||
|
type: string
|
||||||
|
twitter:
|
||||||
|
type: string
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
|
typetalk:
|
||||||
|
type: string
|
||||||
|
uber:
|
||||||
|
type: string
|
||||||
updatedTime:
|
updatedTime:
|
||||||
type: string
|
type: string
|
||||||
|
vk:
|
||||||
|
type: string
|
||||||
webauthnCredentials:
|
webauthnCredentials:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -3353,6 +3456,18 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
weibo:
|
weibo:
|
||||||
type: string
|
type: string
|
||||||
|
wepay:
|
||||||
|
type: string
|
||||||
|
xero:
|
||||||
|
type: string
|
||||||
|
yahoo:
|
||||||
|
type: string
|
||||||
|
yammer:
|
||||||
|
type: string
|
||||||
|
yandex:
|
||||||
|
type: string
|
||||||
|
zoom:
|
||||||
|
type: string
|
||||||
object.Userinfo:
|
object.Userinfo:
|
||||||
title: Userinfo
|
title: Userinfo
|
||||||
type: object
|
type: object
|
||||||
|
@ -554,6 +554,13 @@ class App extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
renderContent() {
|
renderContent() {
|
||||||
|
const onClick = ({key}) => {
|
||||||
|
if (key === "/swagger") {
|
||||||
|
window.open(Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger", "_blank");
|
||||||
|
} else {
|
||||||
|
this.props.history.push(key);
|
||||||
|
}
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<Layout id="parent-area">
|
<Layout id="parent-area">
|
||||||
{/* https://github.com/ant-design/ant-design/issues/40394 ant design bug. If it will be fixed, we can delete the code for control the color of Header*/}
|
{/* https://github.com/ant-design/ant-design/issues/40394 ant design bug. If it will be fixed, we can delete the code for control the color of Header*/}
|
||||||
@ -580,6 +587,7 @@ class App extends Component {
|
|||||||
</Button>
|
</Button>
|
||||||
</React.Fragment> :
|
</React.Fragment> :
|
||||||
<Menu
|
<Menu
|
||||||
|
onClick={onClick}
|
||||||
items={this.getMenuItems()}
|
items={this.getMenuItems()}
|
||||||
mode={"horizontal"}
|
mode={"horizontal"}
|
||||||
selectedKeys={[this.state.selectedMenuKey]}
|
selectedKeys={[this.state.selectedMenuKey]}
|
||||||
|
@ -141,6 +141,8 @@ class ProviderListPage extends BaseListPage {
|
|||||||
{text: "SMS", value: "SMS"},
|
{text: "SMS", value: "SMS"},
|
||||||
{text: "Storage", value: "Storage"},
|
{text: "Storage", value: "Storage"},
|
||||||
{text: "SAML", value: "SAML"},
|
{text: "SAML", value: "SAML"},
|
||||||
|
{text: "Captcha", value: "Captcha"},
|
||||||
|
{text: "Payment", value: "Payment"},
|
||||||
],
|
],
|
||||||
width: "110px",
|
width: "110px",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
@ -159,6 +161,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
{text: "Storage", value: "Storage", children: Setting.getProviderTypeOptions("Storage").map((o) => {return {text: o.id, value: o.name};})},
|
{text: "Storage", value: "Storage", children: Setting.getProviderTypeOptions("Storage").map((o) => {return {text: o.id, value: o.name};})},
|
||||||
{text: "SAML", value: "SAML", children: Setting.getProviderTypeOptions("SAML").map((o) => {return {text: o.id, value: o.name};})},
|
{text: "SAML", value: "SAML", children: Setting.getProviderTypeOptions("SAML").map((o) => {return {text: o.id, value: o.name};})},
|
||||||
{text: "Captcha", value: "Captcha", children: Setting.getProviderTypeOptions("Captcha").map((o) => {return {text: o.id, value: o.name};})},
|
{text: "Captcha", value: "Captcha", children: Setting.getProviderTypeOptions("Captcha").map((o) => {return {text: o.id, value: o.name};})},
|
||||||
|
{text: "Payment", value: "Payment", children: Setting.getProviderTypeOptions("Payment").map((o) => {return {text: o.id, value: o.name};})},
|
||||||
],
|
],
|
||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
|
@ -114,7 +114,11 @@ export const OtherProviderInfo = {
|
|||||||
},
|
},
|
||||||
Email: {
|
Email: {
|
||||||
"Default": {
|
"Default": {
|
||||||
logo: `${StaticBaseUrl}/img/social_default.png`,
|
logo: `${StaticBaseUrl}/img/email_default.png`,
|
||||||
|
url: "",
|
||||||
|
},
|
||||||
|
"SUBMAIL": {
|
||||||
|
logo: `${StaticBaseUrl}/img/social_submail.png`,
|
||||||
url: "",
|
url: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -174,7 +178,7 @@ export const OtherProviderInfo = {
|
|||||||
},
|
},
|
||||||
Captcha: {
|
Captcha: {
|
||||||
"Default": {
|
"Default": {
|
||||||
logo: `${StaticBaseUrl}/img/social_default.png`,
|
logo: `${StaticBaseUrl}/img/captcha_default.png`,
|
||||||
url: "https://pkg.go.dev/github.com/dchest/captcha",
|
url: "https://pkg.go.dev/github.com/dchest/captcha",
|
||||||
},
|
},
|
||||||
"reCAPTCHA": {
|
"reCAPTCHA": {
|
||||||
|
Reference in New Issue
Block a user