mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
fix: remove isGlobalAdmin field in user (#2235)
* refactor: remove isGlobalAdmin field in user * fix: upload xlsx * fix: remove field in account table
This commit is contained in:
parent
a07216d0e1
commit
e5a189e0f4
@ -171,7 +171,6 @@ func (c *ApiController) Signup() {
|
|||||||
Region: authForm.Region,
|
Region: authForm.Region,
|
||||||
Score: initScore,
|
Score: initScore,
|
||||||
IsAdmin: false,
|
IsAdmin: false,
|
||||||
IsGlobalAdmin: false,
|
|
||||||
IsForbidden: false,
|
IsForbidden: false,
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
SignupApplication: application.Name,
|
SignupApplication: application.Name,
|
||||||
|
@ -70,7 +70,7 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check user's tag
|
// check user's tag
|
||||||
if !user.IsGlobalAdmin && !user.IsAdmin && len(application.Tags) > 0 {
|
if !user.IsGlobalAdmin() && !user.IsAdmin && len(application.Tags) > 0 {
|
||||||
// only users with the tag that is listed in the application tags can login
|
// only users with the tag that is listed in the application tags can login
|
||||||
if !util.InSlice(application.Tags, user.Tag) {
|
if !util.InSlice(application.Tags, user.Tag) {
|
||||||
c.ResponseError(fmt.Sprintf(c.T("auth:User's tag: %s is not listed in the application's tags"), user.Tag))
|
c.ResponseError(fmt.Sprintf(c.T("auth:User's tag: %s is not listed in the application's tags"), user.Tag))
|
||||||
@ -589,7 +589,6 @@ func (c *ApiController) Login() {
|
|||||||
Region: userInfo.CountryCode,
|
Region: userInfo.CountryCode,
|
||||||
Score: initScore,
|
Score: initScore,
|
||||||
IsAdmin: false,
|
IsAdmin: false,
|
||||||
IsGlobalAdmin: false,
|
|
||||||
IsForbidden: false,
|
IsForbidden: false,
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
SignupApplication: application.Name,
|
SignupApplication: application.Name,
|
||||||
|
@ -79,7 +79,7 @@ func (c *ApiController) isGlobalAdmin() (bool, *object.User) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return user.Owner == "built-in" || user.IsGlobalAdmin, user
|
return user.IsGlobalAdmin(), user
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ApiController) getCurrentUser() *object.User {
|
func (c *ApiController) getCurrentUser() *object.User {
|
||||||
|
@ -45,13 +45,13 @@ func (c *ApiController) Unlink() {
|
|||||||
// the user will be unlinked from the provider
|
// the user will be unlinked from the provider
|
||||||
unlinkedUser := form.User
|
unlinkedUser := form.User
|
||||||
|
|
||||||
if user.Id != unlinkedUser.Id && !user.IsGlobalAdmin {
|
if user.Id != unlinkedUser.Id && !user.IsGlobalAdmin() {
|
||||||
// if the user is not the same as the one we are unlinking, we need to make sure the user is the global admin.
|
// if the user is not the same as the one we are unlinking, we need to make sure the user is the global admin.
|
||||||
c.ResponseError(c.T("link:You are not the global admin, you can't unlink other users"))
|
c.ResponseError(c.T("link:You are not the global admin, you can't unlink other users"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if user.Id == unlinkedUser.Id && !user.IsGlobalAdmin {
|
if user.Id == unlinkedUser.Id && !user.IsGlobalAdmin() {
|
||||||
// if the user is unlinking themselves, should check the provider can be unlinked, if not, we should return an error.
|
// if the user is unlinking themselves, should check the provider can be unlinked, if not, we should return an error.
|
||||||
application, err := object.GetApplicationByUser(user)
|
application, err := object.GetApplicationByUser(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -123,7 +123,6 @@
|
|||||||
"score": 2000,
|
"score": 2000,
|
||||||
"ranking": 1,
|
"ranking": 1,
|
||||||
"isAdmin": true,
|
"isAdmin": true,
|
||||||
"isGlobalAdmin": true,
|
|
||||||
"isForbidden": false,
|
"isForbidden": false,
|
||||||
"isDeleted": false,
|
"isDeleted": false,
|
||||||
"signupApplication": "",
|
"signupApplication": "",
|
||||||
|
@ -62,7 +62,7 @@ func handleBind(w ldap.ResponseWriter, m *ldap.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if bindOrg == "built-in" || bindUser.IsGlobalAdmin {
|
if bindOrg == "built-in" || bindUser.IsGlobalAdmin() {
|
||||||
m.Client.IsGlobalAdmin, m.Client.IsOrgAdmin = true, true
|
m.Client.IsGlobalAdmin, m.Client.IsOrgAdmin = true, true
|
||||||
} else if bindUser.IsAdmin {
|
} else if bindUser.IsAdmin {
|
||||||
m.Client.IsOrgAdmin = true
|
m.Client.IsOrgAdmin = true
|
||||||
|
@ -141,7 +141,7 @@ func checkSigninErrorTimes(user *User, lang string) string {
|
|||||||
// reset the error times
|
// reset the error times
|
||||||
user.SigninWrongTimes = 0
|
user.SigninWrongTimes = 0
|
||||||
|
|
||||||
UpdateUser(user.GetId(), user, []string{"signin_wrong_times"}, user.IsGlobalAdmin)
|
UpdateUser(user.GetId(), user, []string{"signin_wrong_times"}, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
@ -319,7 +319,7 @@ func CheckUserPermission(requestUserId, userId string, strict bool, lang string)
|
|||||||
if requestUser == nil {
|
if requestUser == nil {
|
||||||
return false, fmt.Errorf(i18n.Translate(lang, "check:Session outdated, please login again"))
|
return false, fmt.Errorf(i18n.Translate(lang, "check:Session outdated, please login again"))
|
||||||
}
|
}
|
||||||
if requestUser.IsGlobalAdmin {
|
if requestUser.IsGlobalAdmin() {
|
||||||
hasPermission = true
|
hasPermission = true
|
||||||
} else if requestUserId == userId {
|
} else if requestUserId == userId {
|
||||||
hasPermission = true
|
hasPermission = true
|
||||||
|
@ -42,7 +42,7 @@ func resetUserSigninErrorTimes(user *User) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
user.SigninWrongTimes = 0
|
user.SigninWrongTimes = 0
|
||||||
UpdateUser(user.GetId(), user, []string{"signin_wrong_times", "last_signin_wrong_time"}, user.IsGlobalAdmin)
|
UpdateUser(user.GetId(), user, []string{"signin_wrong_times", "last_signin_wrong_time"}, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func recordSigninErrorInfo(user *User, lang string, options ...bool) string {
|
func recordSigninErrorInfo(user *User, lang string, options ...bool) string {
|
||||||
@ -61,7 +61,7 @@ func recordSigninErrorInfo(user *User, lang string, options ...bool) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update user
|
// update user
|
||||||
UpdateUser(user.GetId(), user, []string{"signin_wrong_times", "last_signin_wrong_time"}, user.IsGlobalAdmin)
|
UpdateUser(user.GetId(), user, []string{"signin_wrong_times", "last_signin_wrong_time"}, false)
|
||||||
leftChances := SigninWrongTimesLimit - user.SigninWrongTimes
|
leftChances := SigninWrongTimesLimit - user.SigninWrongTimes
|
||||||
if leftChances == 0 && enableCaptcha {
|
if leftChances == 0 && enableCaptcha {
|
||||||
return fmt.Sprint(i18n.Translate(lang, "check:password or code is incorrect"))
|
return fmt.Sprint(i18n.Translate(lang, "check:password or code is incorrect"))
|
||||||
|
@ -73,7 +73,6 @@ func getBuiltInAccountItems() []*AccountItem {
|
|||||||
{Name: "3rd-party logins", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
{Name: "3rd-party logins", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||||
{Name: "Properties", Visible: false, ViewRule: "Admin", ModifyRule: "Admin"},
|
{Name: "Properties", Visible: false, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||||
{Name: "Is admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
{Name: "Is admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||||
{Name: "Is global admin", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
|
||||||
{Name: "Is forbidden", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
{Name: "Is forbidden", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||||
{Name: "Is deleted", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
{Name: "Is deleted", Visible: true, ViewRule: "Admin", ModifyRule: "Admin"},
|
||||||
{Name: "Multi-factor authentication", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
{Name: "Multi-factor authentication", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||||
@ -145,7 +144,6 @@ func initBuiltInUser() {
|
|||||||
Score: 2000,
|
Score: 2000,
|
||||||
Ranking: 1,
|
Ranking: 1,
|
||||||
IsAdmin: true,
|
IsAdmin: true,
|
||||||
IsGlobalAdmin: true,
|
|
||||||
IsForbidden: false,
|
IsForbidden: false,
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
SignupApplication: "app-built-in",
|
SignupApplication: "app-built-in",
|
||||||
|
@ -84,7 +84,7 @@ func MfaRecover(user *User, recoveryCode string) error {
|
|||||||
return fmt.Errorf("recovery code not found")
|
return fmt.Errorf("recovery code not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := UpdateUser(user.GetId(), user, []string{"recovery_codes"}, user.IsAdminUser())
|
_, err := UpdateUser(user.GetId(), user, []string{"recovery_codes"}, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ func DisabledMultiFactorAuth(user *User) error {
|
|||||||
func SetPreferredMultiFactorAuth(user *User, mfaType string) error {
|
func SetPreferredMultiFactorAuth(user *User, mfaType string) error {
|
||||||
user.PreferredMfaType = mfaType
|
user.PreferredMfaType = mfaType
|
||||||
|
|
||||||
_, err := UpdateUser(user.GetId(), user, []string{"preferred_mfa_type"}, user.IsAdminUser())
|
_, err := UpdateUser(user.GetId(), user, []string{"preferred_mfa_type"}, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ func GetOidcDiscovery(host string) OidcDiscovery {
|
|||||||
SubjectTypesSupported: []string{"public"},
|
SubjectTypesSupported: []string{"public"},
|
||||||
IdTokenSigningAlgValuesSupported: []string{"RS256"},
|
IdTokenSigningAlgValuesSupported: []string{"RS256"},
|
||||||
ScopesSupported: []string{"openid", "email", "profile", "address", "phone", "offline_access"},
|
ScopesSupported: []string{"openid", "email", "profile", "address", "phone", "offline_access"},
|
||||||
ClaimsSupported: []string{"iss", "ver", "sub", "aud", "iat", "exp", "id", "type", "displayName", "avatar", "permanentAvatar", "email", "phone", "location", "affiliation", "title", "homepage", "bio", "tag", "region", "language", "score", "ranking", "isOnline", "isAdmin", "isGlobalAdmin", "isForbidden", "signupApplication", "ldap"},
|
ClaimsSupported: []string{"iss", "ver", "sub", "aud", "iat", "exp", "id", "type", "displayName", "avatar", "permanentAvatar", "email", "phone", "location", "affiliation", "title", "homepage", "bio", "tag", "region", "language", "score", "ranking", "isOnline", "isAdmin", "isForbidden", "signupApplication", "ldap"},
|
||||||
RequestParameterSupported: true,
|
RequestParameterSupported: true,
|
||||||
RequestObjectSigningAlgValuesSupported: []string{"HS256", "HS384", "HS512"},
|
RequestObjectSigningAlgValuesSupported: []string{"HS256", "HS384", "HS512"},
|
||||||
EndSessionEndpoint: fmt.Sprintf("%s/api/logout", originBackend),
|
EndSessionEndpoint: fmt.Sprintf("%s/api/logout", originBackend),
|
||||||
|
@ -154,8 +154,6 @@ func (syncer *Syncer) setUserByKeyValue(user *User, key string, value string) {
|
|||||||
user.IsOnline = util.ParseBool(value)
|
user.IsOnline = util.ParseBool(value)
|
||||||
case "IsAdmin":
|
case "IsAdmin":
|
||||||
user.IsAdmin = util.ParseBool(value)
|
user.IsAdmin = util.ParseBool(value)
|
||||||
case "IsGlobalAdmin":
|
|
||||||
user.IsGlobalAdmin = util.ParseBool(value)
|
|
||||||
case "IsForbidden":
|
case "IsForbidden":
|
||||||
user.IsForbidden = util.ParseBool(value)
|
user.IsForbidden = util.ParseBool(value)
|
||||||
case "IsDeleted":
|
case "IsDeleted":
|
||||||
@ -289,7 +287,6 @@ func (syncer *Syncer) getMapFromOriginalUser(user *OriginalUser) map[string]stri
|
|||||||
m["IsDefaultAvatar"] = util.BoolToString(user.IsDefaultAvatar)
|
m["IsDefaultAvatar"] = util.BoolToString(user.IsDefaultAvatar)
|
||||||
m["IsOnline"] = util.BoolToString(user.IsOnline)
|
m["IsOnline"] = util.BoolToString(user.IsOnline)
|
||||||
m["IsAdmin"] = util.BoolToString(user.IsAdmin)
|
m["IsAdmin"] = util.BoolToString(user.IsAdmin)
|
||||||
m["IsGlobalAdmin"] = util.BoolToString(user.IsGlobalAdmin)
|
|
||||||
m["IsForbidden"] = util.BoolToString(user.IsForbidden)
|
m["IsForbidden"] = util.BoolToString(user.IsForbidden)
|
||||||
m["IsDeleted"] = util.BoolToString(user.IsDeleted)
|
m["IsDeleted"] = util.BoolToString(user.IsDeleted)
|
||||||
m["CreatedIp"] = user.CreatedIp
|
m["CreatedIp"] = user.CreatedIp
|
||||||
|
@ -824,7 +824,6 @@ func GetWechatMiniProgramToken(application *Application, code string, host strin
|
|||||||
Type: "normal-user",
|
Type: "normal-user",
|
||||||
CreatedTime: util.GetCurrentTime(),
|
CreatedTime: util.GetCurrentTime(),
|
||||||
IsAdmin: false,
|
IsAdmin: false,
|
||||||
IsGlobalAdmin: false,
|
|
||||||
IsForbidden: false,
|
IsForbidden: false,
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
Properties: map[string]string{
|
Properties: map[string]string{
|
||||||
|
@ -73,7 +73,6 @@ type UserWithoutThirdIdp struct {
|
|||||||
IsDefaultAvatar bool `json:"isDefaultAvatar"`
|
IsDefaultAvatar bool `json:"isDefaultAvatar"`
|
||||||
IsOnline bool `json:"isOnline"`
|
IsOnline bool `json:"isOnline"`
|
||||||
IsAdmin bool `json:"isAdmin"`
|
IsAdmin bool `json:"isAdmin"`
|
||||||
IsGlobalAdmin bool `json:"isGlobalAdmin"`
|
|
||||||
IsForbidden bool `json:"isForbidden"`
|
IsForbidden bool `json:"isForbidden"`
|
||||||
IsDeleted bool `json:"isDeleted"`
|
IsDeleted bool `json:"isDeleted"`
|
||||||
SignupApplication string `xorm:"varchar(100)" json:"signupApplication"`
|
SignupApplication string `xorm:"varchar(100)" json:"signupApplication"`
|
||||||
@ -154,7 +153,6 @@ func getUserWithoutThirdIdp(user *User) *UserWithoutThirdIdp {
|
|||||||
IsDefaultAvatar: user.IsDefaultAvatar,
|
IsDefaultAvatar: user.IsDefaultAvatar,
|
||||||
IsOnline: user.IsOnline,
|
IsOnline: user.IsOnline,
|
||||||
IsAdmin: user.IsAdmin,
|
IsAdmin: user.IsAdmin,
|
||||||
IsGlobalAdmin: user.IsGlobalAdmin,
|
|
||||||
IsForbidden: user.IsForbidden,
|
IsForbidden: user.IsForbidden,
|
||||||
IsDeleted: user.IsDeleted,
|
IsDeleted: user.IsDeleted,
|
||||||
SignupApplication: user.SignupApplication,
|
SignupApplication: user.SignupApplication,
|
||||||
|
@ -83,7 +83,6 @@ type User struct {
|
|||||||
IsDefaultAvatar bool `json:"isDefaultAvatar"`
|
IsDefaultAvatar bool `json:"isDefaultAvatar"`
|
||||||
IsOnline bool `json:"isOnline"`
|
IsOnline bool `json:"isOnline"`
|
||||||
IsAdmin bool `json:"isAdmin"`
|
IsAdmin bool `json:"isAdmin"`
|
||||||
IsGlobalAdmin bool `json:"isGlobalAdmin"`
|
|
||||||
IsForbidden bool `json:"isForbidden"`
|
IsForbidden bool `json:"isForbidden"`
|
||||||
IsDeleted bool `json:"isDeleted"`
|
IsDeleted bool `json:"isDeleted"`
|
||||||
SignupApplication string `xorm:"varchar(100)" json:"signupApplication"`
|
SignupApplication string `xorm:"varchar(100)" json:"signupApplication"`
|
||||||
@ -530,7 +529,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er
|
|||||||
columns = []string{
|
columns = []string{
|
||||||
"owner", "display_name", "avatar",
|
"owner", "display_name", "avatar",
|
||||||
"location", "address", "country_code", "region", "language", "affiliation", "title", "homepage", "bio", "tag", "language", "gender", "birthday", "education", "score", "karma", "ranking", "signup_application",
|
"location", "address", "country_code", "region", "language", "affiliation", "title", "homepage", "bio", "tag", "language", "gender", "birthday", "education", "score", "karma", "ranking", "signup_application",
|
||||||
"is_admin", "is_global_admin", "is_forbidden", "is_deleted", "hash", "is_default_avatar", "properties", "webauthnCredentials", "managedAccounts",
|
"is_admin", "is_forbidden", "is_deleted", "hash", "is_default_avatar", "properties", "webauthnCredentials", "managedAccounts",
|
||||||
"signin_wrong_times", "last_signin_wrong_time", "groups", "access_key", "access_secret",
|
"signin_wrong_times", "last_signin_wrong_time", "groups", "access_key", "access_secret",
|
||||||
"github", "google", "qq", "wechat", "facebook", "dingtalk", "weibo", "gitee", "linkedin", "wecom", "lark", "gitlab", "adfs",
|
"github", "google", "qq", "wechat", "facebook", "dingtalk", "weibo", "gitee", "linkedin", "wecom", "lark", "gitlab", "adfs",
|
||||||
"baidu", "alipay", "casdoor", "infoflow", "apple", "azuread", "slack", "steam", "bilibili", "okta", "douyin", "line", "amazon",
|
"baidu", "alipay", "casdoor", "infoflow", "apple", "azuread", "slack", "steam", "bilibili", "okta", "douyin", "line", "amazon",
|
||||||
@ -891,5 +890,13 @@ func (user *User) IsApplicationAdmin(application *Application) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return (user.Owner == application.Organization && user.IsAdmin) || user.IsGlobalAdmin
|
return (user.Owner == application.Organization && user.IsAdmin) || user.IsGlobalAdmin()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (user *User) IsGlobalAdmin() bool {
|
||||||
|
if user == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return user.Owner == "built-in"
|
||||||
}
|
}
|
||||||
|
@ -124,15 +124,14 @@ func UploadUsers(owner string, fileId string) (bool, error) {
|
|||||||
IsDefaultAvatar: false,
|
IsDefaultAvatar: false,
|
||||||
IsOnline: parseLineItemBool(&line, 31),
|
IsOnline: parseLineItemBool(&line, 31),
|
||||||
IsAdmin: parseLineItemBool(&line, 32),
|
IsAdmin: parseLineItemBool(&line, 32),
|
||||||
IsGlobalAdmin: parseLineItemBool(&line, 33),
|
IsForbidden: parseLineItemBool(&line, 33),
|
||||||
IsForbidden: parseLineItemBool(&line, 34),
|
IsDeleted: parseLineItemBool(&line, 34),
|
||||||
IsDeleted: parseLineItemBool(&line, 35),
|
SignupApplication: parseLineItem(&line, 35),
|
||||||
SignupApplication: parseLineItem(&line, 36),
|
|
||||||
Hash: "",
|
Hash: "",
|
||||||
PreHash: "",
|
PreHash: "",
|
||||||
CreatedIp: parseLineItem(&line, 37),
|
CreatedIp: parseLineItem(&line, 36),
|
||||||
LastSigninTime: parseLineItem(&line, 38),
|
LastSigninTime: parseLineItem(&line, 37),
|
||||||
LastSigninIp: parseLineItem(&line, 39),
|
LastSigninIp: parseLineItem(&line, 38),
|
||||||
Ldap: "",
|
Ldap: "",
|
||||||
Properties: map[string]string{},
|
Properties: map[string]string{},
|
||||||
}
|
}
|
||||||
|
@ -310,10 +310,7 @@ func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang str
|
|||||||
item := GetAccountItemByName("Is admin", organization)
|
item := GetAccountItemByName("Is admin", organization)
|
||||||
itemsChanged = append(itemsChanged, item)
|
itemsChanged = append(itemsChanged, item)
|
||||||
}
|
}
|
||||||
if oldUser.IsGlobalAdmin != newUser.IsGlobalAdmin {
|
|
||||||
item := GetAccountItemByName("Is global admin", organization)
|
|
||||||
itemsChanged = append(itemsChanged, item)
|
|
||||||
}
|
|
||||||
if oldUser.IsForbidden != newUser.IsForbidden {
|
if oldUser.IsForbidden != newUser.IsForbidden {
|
||||||
item := GetAccountItemByName("Is forbidden", organization)
|
item := GetAccountItemByName("Is forbidden", organization)
|
||||||
itemsChanged = append(itemsChanged, item)
|
itemsChanged = append(itemsChanged, item)
|
||||||
@ -351,5 +348,5 @@ func (user *User) IsAdminUser() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return user.IsAdmin || user.IsGlobalAdmin
|
return user.IsAdmin || user.IsGlobalAdmin()
|
||||||
}
|
}
|
||||||
|
@ -131,34 +131,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/add-chat": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Chat API"
|
|
||||||
],
|
|
||||||
"description": "add chat",
|
|
||||||
"operationId": "ApiController.AddChat",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the chat",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Chat"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/add-enforcer": {
|
"/api/add-enforcer": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -243,34 +215,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/add-message": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "add message",
|
|
||||||
"operationId": "ApiController.AddMessage",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the message",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/add-model": {
|
"/api/add-model": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -1077,34 +1021,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/delete-chat": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Chat API"
|
|
||||||
],
|
|
||||||
"description": "delete chat",
|
|
||||||
"operationId": "ApiController.DeleteChat",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the chat",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Chat"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/delete-enforcer": {
|
"/api/delete-enforcer": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -1189,34 +1105,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/delete-message": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "delete message",
|
|
||||||
"operationId": "ApiController.DeleteMessage",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the message",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/delete-mfa/": {
|
"/api/delete-mfa/": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -1964,56 +1852,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/get-chat": {
|
"/api/get-dashboard": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"Chat API"
|
"GetDashboard API"
|
||||||
],
|
|
||||||
"description": "get chat",
|
|
||||||
"operationId": "ApiController.GetChat",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of the chat",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
|
"description": "get information of dashboard",
|
||||||
|
"operationId": "ApiController.GetDashboard",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "The Response object",
|
"description": "The Response object",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/object.Chat"
|
"$ref": "#/definitions/controllers.Response"
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/get-chats": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"Chat API"
|
|
||||||
],
|
|
||||||
"description": "get chats",
|
|
||||||
"operationId": "ApiController.GetChats",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "owner",
|
|
||||||
"description": "The owner of chats",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/object.Chat"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2319,87 +2169,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/get-message": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "get message",
|
|
||||||
"operationId": "ApiController.GetMessage",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of the message",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/get-message-answer": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "get message answer",
|
|
||||||
"operationId": "ApiController.GetMessageAnswer",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of the message",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/get-messages": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "get messages",
|
|
||||||
"operationId": "ApiController.GetMessages",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "owner",
|
|
||||||
"description": "The owner of messages",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/get-model": {
|
"/api/get-model": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -4481,41 +4250,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/update-chat": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Chat API"
|
|
||||||
],
|
|
||||||
"description": "update chat",
|
|
||||||
"operationId": "ApiController.UpdateChat",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of the chat",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the chat",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Chat"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/update-enforcer": {
|
"/api/update-enforcer": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -4614,41 +4348,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/update-message": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Message API"
|
|
||||||
],
|
|
||||||
"description": "update message",
|
|
||||||
"operationId": "ApiController.UpdateMessage",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of the message",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "body",
|
|
||||||
"name": "body",
|
|
||||||
"description": "The details of the message",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/controllers.Response"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/update-model": {
|
"/api/update-model": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -5431,6 +5130,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"1183.0xc000639290.false": {
|
||||||
|
"title": "false",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"1217.0xc0006392c0.false": {
|
||||||
|
"title": "false",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"LaravelResponse": {
|
"LaravelResponse": {
|
||||||
"title": "LaravelResponse",
|
"title": "LaravelResponse",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -5484,16 +5191,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"additionalProperties": {
|
"$ref": "#/definitions/1183.0xc000639290.false"
|
||||||
"description": "support string, struct or []struct",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"data2": {
|
"data2": {
|
||||||
"additionalProperties": {
|
"$ref": "#/definitions/1217.0xc0006392c0.false"
|
||||||
"description": "support string, struct or []struct",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"msg": {
|
"msg": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -5531,10 +5232,18 @@
|
|||||||
"title": "JSONWebKey",
|
"title": "JSONWebKey",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"model.Model": {
|
||||||
|
"title": "Model",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"object": {
|
"object": {
|
||||||
"title": "object",
|
"title": "object",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"object.\u0026{197049 0xc000a2cd50 false}": {
|
||||||
|
"title": "\u0026{197049 0xc000a2cd50 false}",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"object.AccountItem": {
|
"object.AccountItem": {
|
||||||
"title": "AccountItem",
|
"title": "AccountItem",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -5557,16 +5266,41 @@
|
|||||||
"title": "Adapter",
|
"title": "Adapter",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"Engine": {
|
"createdTime": {
|
||||||
"$ref": "#/definitions/xorm.Engine"
|
|
||||||
},
|
|
||||||
"dataSourceName": {
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"dbName": {
|
"database": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"driverName": {
|
"databaseType": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"host": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"owner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"table": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tableNamePrefix": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5728,7 +5462,7 @@
|
|||||||
"title": "CasbinRequest",
|
"title": "CasbinRequest",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/object.CasbinRequest"
|
"$ref": "#/definitions/object.\u0026{197049 0xc000a2cd50 false}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"object.Cert": {
|
"object.Cert": {
|
||||||
@ -5778,52 +5512,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"object.Chat": {
|
|
||||||
"title": "Chat",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"category": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"createdTime": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"displayName": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"messageCount": {
|
|
||||||
"type": "integer",
|
|
||||||
"format": "int64"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"owner": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"updatedTime": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"user1": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"user2": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"object.Enforce": {
|
"object.Enforce": {
|
||||||
"title": "Enforce",
|
"title": "Enforce",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -5844,12 +5532,14 @@
|
|||||||
"displayName": {
|
"displayName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"isEnabled": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"model": {
|
"model": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"modelCfg": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -6084,36 +5774,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"object.Message": {
|
|
||||||
"title": "Message",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"author": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"chat": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"createdTime": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"owner": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"replyTo": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"text": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"object.MfaItem": {
|
"object.MfaItem": {
|
||||||
"title": "MfaItem",
|
"title": "MfaItem",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -6169,9 +5829,6 @@
|
|||||||
"displayName": {
|
"displayName": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"isEnabled": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"modelText": {
|
"modelText": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -6349,6 +6006,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object.Ormer": {
|
||||||
|
"title": "Ormer",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Engine": {
|
||||||
|
"$ref": "#/definitions/xorm.Engine"
|
||||||
|
},
|
||||||
|
"dataSourceName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"dbName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"driverName": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"object.Payment": {
|
"object.Payment": {
|
||||||
"title": "Payment",
|
"title": "Payment",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -6386,7 +6061,7 @@
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"organization": {
|
"outOrderId": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"owner": {
|
"owner": {
|
||||||
@ -6424,7 +6099,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/pp.PaymentState"
|
||||||
},
|
},
|
||||||
"tag": {
|
"tag": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -7124,9 +6799,6 @@
|
|||||||
"$ref": "#/definitions/object.TableColumn"
|
"$ref": "#/definitions/object.TableColumn"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tablePrimaryKey": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -7145,6 +6817,9 @@
|
|||||||
"isHashed": {
|
"isHashed": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"isKey": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -7464,9 +7139,6 @@
|
|||||||
"isForbidden": {
|
"isForbidden": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isGlobalAdmin": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"isOnline": {
|
"isOnline": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
@ -7692,6 +7364,9 @@
|
|||||||
"vk": {
|
"vk": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"web3onboard": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"webauthnCredentials": {
|
"webauthnCredentials": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@ -7811,6 +7486,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pp.PaymentState": {
|
||||||
|
"title": "PaymentState",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"PaymentStatePaid = \"Paid\"",
|
||||||
|
"PaymentStateCreated = \"Created\"",
|
||||||
|
"PaymentStateCanceled = \"Canceled\"",
|
||||||
|
"PaymentStateTimeout = \"Timeout\"",
|
||||||
|
"PaymentStateError = \"Error\""
|
||||||
|
],
|
||||||
|
"example": "Paid"
|
||||||
|
},
|
||||||
"protocol.CredentialAssertion": {
|
"protocol.CredentialAssertion": {
|
||||||
"title": "CredentialAssertion",
|
"title": "CredentialAssertion",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -7871,6 +7558,10 @@
|
|||||||
"xorm.Engine": {
|
"xorm.Engine": {
|
||||||
"title": "Engine",
|
"title": "Engine",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
},
|
||||||
|
"xormadapter.Adapter": {
|
||||||
|
"title": "Adapter",
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
@ -7879,9 +7570,5 @@
|
|||||||
"name": "Authorization",
|
"name": "Authorization",
|
||||||
"in": "header"
|
"in": "header"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"externalDocs": {
|
|
||||||
"description": "Find out more about Casdoor",
|
|
||||||
"url": "https://casdoor.org/"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -85,24 +85,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/add-chat:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Chat API
|
|
||||||
description: add chat
|
|
||||||
operationId: ApiController.AddChat
|
|
||||||
parameters:
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the chat
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Chat'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/add-enforcer:
|
/api/add-enforcer:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -157,24 +139,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/add-message:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: add message
|
|
||||||
operationId: ApiController.AddMessage
|
|
||||||
parameters:
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the message
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/add-model:
|
/api/add-model:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -696,24 +660,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/delete-chat:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Chat API
|
|
||||||
description: delete chat
|
|
||||||
operationId: ApiController.DeleteChat
|
|
||||||
parameters:
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the chat
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Chat'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/delete-enforcer:
|
/api/delete-enforcer:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -768,24 +714,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/delete-message:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: delete message
|
|
||||||
operationId: ApiController.DeleteMessage
|
|
||||||
parameters:
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the message
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/delete-mfa/:
|
/api/delete-mfa/:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -1271,42 +1199,17 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.Cert'
|
$ref: '#/definitions/object.Cert'
|
||||||
/api/get-chat:
|
/api/get-dashboard:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Chat API
|
- GetDashboard API
|
||||||
description: get chat
|
description: get information of dashboard
|
||||||
operationId: ApiController.GetChat
|
operationId: ApiController.GetDashboard
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of the chat
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/object.Chat'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/get-chats:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Chat API
|
|
||||||
description: get chats
|
|
||||||
operationId: ApiController.GetChats
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: owner
|
|
||||||
description: The owner of chats
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/object.Chat'
|
|
||||||
/api/get-default-application:
|
/api/get-default-application:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -1503,59 +1406,6 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.Ldap'
|
$ref: '#/definitions/object.Ldap'
|
||||||
/api/get-message:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: get message
|
|
||||||
operationId: ApiController.GetMessage
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of the message
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
/api/get-message-answer:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: get message answer
|
|
||||||
operationId: ApiController.GetMessageAnswer
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of the message
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
/api/get-messages:
|
|
||||||
get:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: get messages
|
|
||||||
operationId: ApiController.GetMessages
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: owner
|
|
||||||
description: The owner of messages
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
/api/get-model:
|
/api/get-model:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -2925,29 +2775,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/update-chat:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Chat API
|
|
||||||
description: update chat
|
|
||||||
operationId: ApiController.UpdateChat
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of the chat
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the chat
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Chat'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/update-enforcer:
|
/api/update-enforcer:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -3012,29 +2839,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/update-message:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Message API
|
|
||||||
description: update message
|
|
||||||
operationId: ApiController.UpdateMessage
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of the message
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: body
|
|
||||||
name: body
|
|
||||||
description: The details of the message
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.Message'
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/controllers.Response'
|
|
||||||
/api/update-model:
|
/api/update-model:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -3549,6 +3353,12 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
definitions:
|
definitions:
|
||||||
|
1183.0xc000639290.false:
|
||||||
|
title: "false"
|
||||||
|
type: object
|
||||||
|
1217.0xc0006392c0.false:
|
||||||
|
title: "false"
|
||||||
|
type: object
|
||||||
LaravelResponse:
|
LaravelResponse:
|
||||||
title: LaravelResponse
|
title: LaravelResponse
|
||||||
type: object
|
type: object
|
||||||
@ -3588,13 +3398,9 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
additionalProperties:
|
$ref: '#/definitions/1183.0xc000639290.false'
|
||||||
description: support string, struct or []struct
|
|
||||||
type: string
|
|
||||||
data2:
|
data2:
|
||||||
additionalProperties:
|
$ref: '#/definitions/1217.0xc0006392c0.false'
|
||||||
description: support string, struct or []struct
|
|
||||||
type: string
|
|
||||||
msg:
|
msg:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
@ -3618,9 +3424,15 @@ definitions:
|
|||||||
jose.JSONWebKey:
|
jose.JSONWebKey:
|
||||||
title: JSONWebKey
|
title: JSONWebKey
|
||||||
type: object
|
type: object
|
||||||
|
model.Model:
|
||||||
|
title: Model
|
||||||
|
type: object
|
||||||
object:
|
object:
|
||||||
title: object
|
title: object
|
||||||
type: object
|
type: object
|
||||||
|
object.&{197049 0xc000a2cd50 false}:
|
||||||
|
title: '&{197049 0xc000a2cd50 false}'
|
||||||
|
type: object
|
||||||
object.AccountItem:
|
object.AccountItem:
|
||||||
title: AccountItem
|
title: AccountItem
|
||||||
type: object
|
type: object
|
||||||
@ -3637,13 +3449,30 @@ definitions:
|
|||||||
title: Adapter
|
title: Adapter
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
Engine:
|
createdTime:
|
||||||
$ref: '#/definitions/xorm.Engine'
|
|
||||||
dataSourceName:
|
|
||||||
type: string
|
type: string
|
||||||
dbName:
|
database:
|
||||||
type: string
|
type: string
|
||||||
driverName:
|
databaseType:
|
||||||
|
type: string
|
||||||
|
host:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
owner:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
port:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
table:
|
||||||
|
type: string
|
||||||
|
tableNamePrefix:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
user:
|
||||||
type: string
|
type: string
|
||||||
object.Application:
|
object.Application:
|
||||||
title: Application
|
title: Application
|
||||||
@ -3752,7 +3581,7 @@ definitions:
|
|||||||
title: CasbinRequest
|
title: CasbinRequest
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.CasbinRequest'
|
$ref: '#/definitions/object.&{197049 0xc000a2cd50 false}'
|
||||||
object.Cert:
|
object.Cert:
|
||||||
title: Cert
|
title: Cert
|
||||||
type: object
|
type: object
|
||||||
@ -3785,37 +3614,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
object.Chat:
|
|
||||||
title: Chat
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
category:
|
|
||||||
type: string
|
|
||||||
createdTime:
|
|
||||||
type: string
|
|
||||||
displayName:
|
|
||||||
type: string
|
|
||||||
messageCount:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
organization:
|
|
||||||
type: string
|
|
||||||
owner:
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
updatedTime:
|
|
||||||
type: string
|
|
||||||
user1:
|
|
||||||
type: string
|
|
||||||
user2:
|
|
||||||
type: string
|
|
||||||
users:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
object.Enforce:
|
object.Enforce:
|
||||||
title: Enforce
|
title: Enforce
|
||||||
type: object
|
type: object
|
||||||
@ -3831,10 +3629,11 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
displayName:
|
displayName:
|
||||||
type: string
|
type: string
|
||||||
isEnabled:
|
|
||||||
type: boolean
|
|
||||||
model:
|
model:
|
||||||
type: string
|
type: string
|
||||||
|
modelCfg:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
owner:
|
owner:
|
||||||
@ -3992,26 +3791,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
object.Message:
|
|
||||||
title: Message
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
author:
|
|
||||||
type: string
|
|
||||||
chat:
|
|
||||||
type: string
|
|
||||||
createdTime:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
organization:
|
|
||||||
type: string
|
|
||||||
owner:
|
|
||||||
type: string
|
|
||||||
replyTo:
|
|
||||||
type: string
|
|
||||||
text:
|
|
||||||
type: string
|
|
||||||
object.MfaItem:
|
object.MfaItem:
|
||||||
title: MfaItem
|
title: MfaItem
|
||||||
type: object
|
type: object
|
||||||
@ -4050,8 +3829,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
displayName:
|
displayName:
|
||||||
type: string
|
type: string
|
||||||
isEnabled:
|
|
||||||
type: boolean
|
|
||||||
modelText:
|
modelText:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
@ -4169,6 +3946,18 @@ definitions:
|
|||||||
$ref: '#/definitions/object.ThemeData'
|
$ref: '#/definitions/object.ThemeData'
|
||||||
websiteUrl:
|
websiteUrl:
|
||||||
type: string
|
type: string
|
||||||
|
object.Ormer:
|
||||||
|
title: Ormer
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
Engine:
|
||||||
|
$ref: '#/definitions/xorm.Engine'
|
||||||
|
dataSourceName:
|
||||||
|
type: string
|
||||||
|
dbName:
|
||||||
|
type: string
|
||||||
|
driverName:
|
||||||
|
type: string
|
||||||
object.Payment:
|
object.Payment:
|
||||||
title: Payment
|
title: Payment
|
||||||
type: object
|
type: object
|
||||||
@ -4195,7 +3984,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
organization:
|
outOrderId:
|
||||||
type: string
|
type: string
|
||||||
owner:
|
owner:
|
||||||
type: string
|
type: string
|
||||||
@ -4221,7 +4010,7 @@ definitions:
|
|||||||
returnUrl:
|
returnUrl:
|
||||||
type: string
|
type: string
|
||||||
state:
|
state:
|
||||||
type: string
|
$ref: '#/definitions/pp.PaymentState'
|
||||||
tag:
|
tag:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
@ -4692,8 +4481,6 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.TableColumn'
|
$ref: '#/definitions/object.TableColumn'
|
||||||
tablePrimaryKey:
|
|
||||||
type: string
|
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
user:
|
user:
|
||||||
@ -4706,6 +4493,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
isHashed:
|
isHashed:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
isKey:
|
||||||
|
type: boolean
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
@ -4920,8 +4709,6 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
isForbidden:
|
isForbidden:
|
||||||
type: boolean
|
type: boolean
|
||||||
isGlobalAdmin:
|
|
||||||
type: boolean
|
|
||||||
isOnline:
|
isOnline:
|
||||||
type: boolean
|
type: boolean
|
||||||
kakao:
|
kakao:
|
||||||
@ -5073,6 +4860,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
vk:
|
vk:
|
||||||
type: string
|
type: string
|
||||||
|
web3onboard:
|
||||||
|
type: string
|
||||||
webauthnCredentials:
|
webauthnCredentials:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -5151,6 +4940,16 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
|
pp.PaymentState:
|
||||||
|
title: PaymentState
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- PaymentStatePaid = "Paid"
|
||||||
|
- PaymentStateCreated = "Created"
|
||||||
|
- PaymentStateCanceled = "Canceled"
|
||||||
|
- PaymentStateTimeout = "Timeout"
|
||||||
|
- PaymentStateError = "Error"
|
||||||
|
example: Paid
|
||||||
protocol.CredentialAssertion:
|
protocol.CredentialAssertion:
|
||||||
title: CredentialAssertion
|
title: CredentialAssertion
|
||||||
type: object
|
type: object
|
||||||
@ -5195,11 +4994,11 @@ definitions:
|
|||||||
xorm.Engine:
|
xorm.Engine:
|
||||||
title: Engine
|
title: Engine
|
||||||
type: object
|
type: object
|
||||||
|
xormadapter.Adapter:
|
||||||
|
title: Adapter
|
||||||
|
type: object
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
AccessToken:
|
AccessToken:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
name: Authorization
|
name: Authorization
|
||||||
in: header
|
in: header
|
||||||
externalDocs:
|
|
||||||
description: Find out more about Casdoor
|
|
||||||
url: https://casdoor.org/
|
|
||||||
|
@ -81,7 +81,6 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
{name: "Properties", visible: false, viewRule: "Admin", modifyRule: "Admin"},
|
{name: "Properties", visible: false, viewRule: "Admin", modifyRule: "Admin"},
|
||||||
{name: "Is online", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
{name: "Is online", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
||||||
{name: "Is admin", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
{name: "Is admin", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
||||||
{name: "Is global admin", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
|
||||||
{name: "Is forbidden", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
{name: "Is forbidden", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
||||||
{name: "Is deleted", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
{name: "Is deleted", visible: true, viewRule: "Admin", modifyRule: "Admin"},
|
||||||
{Name: "Multi-factor authentication", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
{Name: "Multi-factor authentication", Visible: true, ViewRule: "Self", ModifyRule: "Self"},
|
||||||
|
@ -620,7 +620,7 @@ export function isAdminUser(account) {
|
|||||||
if (account === undefined || account === null) {
|
if (account === undefined || account === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return account.owner === "built-in" || account.isGlobalAdmin === true;
|
return account.owner === "built-in";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isLocalAdminUser(account) {
|
export function isLocalAdminUser(account) {
|
||||||
|
@ -842,19 +842,6 @@ class UserEditPage extends React.Component {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
} else if (accountItem.name === "Is global admin") {
|
|
||||||
return (
|
|
||||||
<Row style={{marginTop: "20px"}} >
|
|
||||||
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
|
|
||||||
{Setting.getLabel(i18next.t("user:Is global admin"), i18next.t("user:Is global admin - Tooltip"))} :
|
|
||||||
</Col>
|
|
||||||
<Col span={(Setting.isMobile()) ? 22 : 2} >
|
|
||||||
<Switch disabled={disabled} checked={this.state.user.isGlobalAdmin} onChange={checked => {
|
|
||||||
this.updateUserField("isGlobalAdmin", checked);
|
|
||||||
}} />
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
);
|
|
||||||
} else if (accountItem.name === "Is forbidden") {
|
} else if (accountItem.name === "Is forbidden") {
|
||||||
return (
|
return (
|
||||||
<Row style={{marginTop: "20px"}} >
|
<Row style={{marginTop: "20px"}} >
|
||||||
|
@ -81,7 +81,6 @@ class UserListPage extends BaseListPage {
|
|||||||
tag: "staff",
|
tag: "staff",
|
||||||
region: "",
|
region: "",
|
||||||
isAdmin: (owner === "built-in"),
|
isAdmin: (owner === "built-in"),
|
||||||
isGlobalAdmin: (owner === "built-in"),
|
|
||||||
IsForbidden: false,
|
IsForbidden: false,
|
||||||
score: this.state.organization.initScore,
|
score: this.state.organization.initScore,
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
@ -354,18 +353,6 @@ class UserListPage extends BaseListPage {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: i18next.t("user:Is global admin"),
|
|
||||||
dataIndex: "isGlobalAdmin",
|
|
||||||
key: "isGlobalAdmin",
|
|
||||||
width: "140px",
|
|
||||||
sorter: true,
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return (
|
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: i18next.t("user:Is forbidden"),
|
title: i18next.t("user:Is forbidden"),
|
||||||
dataIndex: "isForbidden",
|
dataIndex: "isForbidden",
|
||||||
|
@ -79,7 +79,6 @@ const userTemplate = {
|
|||||||
"ranking": 10,
|
"ranking": 10,
|
||||||
"isOnline": false,
|
"isOnline": false,
|
||||||
"isAdmin": true,
|
"isAdmin": true,
|
||||||
"isGlobalAdmin": false,
|
|
||||||
"isForbidden": false,
|
"isForbidden": false,
|
||||||
"isDeleted": false,
|
"isDeleted": false,
|
||||||
"signupApplication": "app-casnode",
|
"signupApplication": "app-casnode",
|
||||||
|
@ -188,7 +188,7 @@ class OAuthWidget extends React.Component {
|
|||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<Button disabled={!providerItem.canUnlink && !account.isGlobalAdmin} style={{marginLeft: "20px", width: linkButtonWidth}} onClick={() => this.unlinkUser(provider.type, linkedValue)}>{i18next.t("user:Unlink")}</Button>
|
<Button disabled={!providerItem.canUnlink && !Setting.isAdminUser(account)} style={{marginLeft: "20px", width: linkButtonWidth}} onClick={() => this.unlinkUser(provider.type, linkedValue)}>{i18next.t("user:Unlink")}</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -100,7 +100,6 @@ class AccountTable extends React.Component {
|
|||||||
{name: "Properties", label: i18next.t("user:Properties")},
|
{name: "Properties", label: i18next.t("user:Properties")},
|
||||||
{name: "Is online", label: i18next.t("user:Is online")},
|
{name: "Is online", label: i18next.t("user:Is online")},
|
||||||
{name: "Is admin", label: i18next.t("user:Is admin")},
|
{name: "Is admin", label: i18next.t("user:Is admin")},
|
||||||
{name: "Is global admin", label: i18next.t("user:Is global admin")},
|
|
||||||
{name: "Is forbidden", label: i18next.t("user:Is forbidden")},
|
{name: "Is forbidden", label: i18next.t("user:Is forbidden")},
|
||||||
{name: "Is deleted", label: i18next.t("user:Is deleted")},
|
{name: "Is deleted", label: i18next.t("user:Is deleted")},
|
||||||
{name: "Multi-factor authentication", label: i18next.t("user:Multi-factor authentication")},
|
{name: "Multi-factor authentication", label: i18next.t("user:Multi-factor authentication")},
|
||||||
@ -179,7 +178,7 @@ class AccountTable extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let options;
|
let options;
|
||||||
if (record.viewRule === "Admin" || record.name === "Is admin" || record.name === "Is global admin") {
|
if (record.viewRule === "Admin" || record.name === "Is admin") {
|
||||||
options = [
|
options = [
|
||||||
{id: "Admin", name: "Admin"},
|
{id: "Admin", name: "Admin"},
|
||||||
{id: "Immutable", name: "Immutable"},
|
{id: "Immutable", name: "Immutable"},
|
||||||
|
@ -100,7 +100,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
{
|
{
|
||||||
["Name", "CreatedTime", "UpdatedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar",
|
["Name", "CreatedTime", "UpdatedTime", "Id", "Type", "Password", "PasswordSalt", "DisplayName", "FirstName", "LastName", "Avatar", "PermanentAvatar",
|
||||||
"Email", "EmailVerified", "Phone", "Location", "Address", "Affiliation", "Title", "IdCardType", "IdCard", "Homepage", "Bio", "Tag", "Region",
|
"Email", "EmailVerified", "Phone", "Location", "Address", "Affiliation", "Title", "IdCardType", "IdCard", "Homepage", "Bio", "Tag", "Region",
|
||||||
"Language", "Gender", "Birthday", "Education", "Score", "Ranking", "IsDefaultAvatar", "IsOnline", "IsAdmin", "IsGlobalAdmin", "IsForbidden", "IsDeleted", "CreatedIp"]
|
"Language", "Gender", "Birthday", "Education", "Score", "Ranking", "IsDefaultAvatar", "IsOnline", "IsAdmin", "IsForbidden", "IsDeleted", "CreatedIp"]
|
||||||
.map((item, index) => <Option key={index} value={item}>{item}</Option>)
|
.map((item, index) => <Option key={index} value={item}>{item}</Option>)
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user