{"Message":"增加钉钉登录","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/其他登录方式"},{"State":1,"Type":12,"Name":"CustomLibrary"},{"State":1,"Type":15,"Name":"ServerCommand/获取CorpId"},{"State":3,"Type":15,"Name":"ServerCommand/钉钉授权登录"},{"State":3,"Type":15,"Name":"ServerCommand/dingtalkLogin"},{"State":3,"Type":1,"Name":"PCPage/dingtalkLogin"}],"Version":"v1"}
This commit is contained in:
169
ServerCommands/钉钉/dingtalkLogin.json
Normal file
169
ServerCommands/钉钉/dingtalkLogin.json
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"Name": "dingtalkLogin",
|
||||
"Enabled": true,
|
||||
"Triggers": [
|
||||
{
|
||||
"$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon",
|
||||
"Permission": {
|
||||
"PermissionData": {
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core",
|
||||
"permissionResource": {
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core"
|
||||
},
|
||||
"permissionBindings": [
|
||||
{
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
|
||||
"roleNames": [
|
||||
"FGC_Anonymous"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"HttpMethod": 3,
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "authCode",
|
||||
"DataValidationInfo": {
|
||||
"IgnoreBlank": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "state",
|
||||
"DataValidationInfo": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "DingTalkPlugin.GetUserToken, DingTalkPlugin",
|
||||
"Code": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=authCode"
|
||||
},
|
||||
"ResultTo": "Result"
|
||||
},
|
||||
{
|
||||
"$type": "DingTalkPlugin.GetUserWithOptions, DingTalkPlugin",
|
||||
"Token": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=Result.AccessToken"
|
||||
},
|
||||
"UnionId": "me",
|
||||
"ResultTo": "个人信息"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||||
"ParameterName": "查找用户",
|
||||
"TableValue": {
|
||||
"TableName": "用户信息视图",
|
||||
"TableValueType": 1,
|
||||
"BindingInfos": [
|
||||
{
|
||||
"GUID": "091476fe-6eb5-4527-9cda-e8d32077337a",
|
||||
"BindingInfo": {
|
||||
"TableName": "用户信息视图",
|
||||
"ColumnName": "用户名",
|
||||
"GUID": "1f400365-2901-41d6-a354-c6ebb1a6a41f"
|
||||
},
|
||||
"ColumnName": "用户名"
|
||||
}
|
||||
],
|
||||
"SqlCondition": {
|
||||
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
||||
"ColumnBindingInfo": {
|
||||
"TableName": "用户信息视图",
|
||||
"ColumnName": "DingTalkUnionID",
|
||||
"GUID": "8f9a3983-cded-410b-b825-8c5094d18049"
|
||||
},
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=个人信息.UnionId"
|
||||
}
|
||||
},
|
||||
"NullFormulaValueQueryPolicy": 0,
|
||||
"TopCount": "1"
|
||||
},
|
||||
"ID": "d954848ee70b4bf884e8265e47ec577f"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
|
||||
"ConditionAndCommandPairList": [
|
||||
{
|
||||
"Condition": {
|
||||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||||
"param": {
|
||||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||||
"ParamObject": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户"
|
||||
}
|
||||
},
|
||||
"value": "%Null%",
|
||||
"compareType": 1
|
||||
},
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2",
|
||||
"OperationType": "202",
|
||||
"CommandOperator": {
|
||||
"$type": "UserManagementCommandsV2.UpdateUserOperator, UserManagementCommandsV2",
|
||||
"UserName": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户.用户名"
|
||||
},
|
||||
"FullName": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=个人信息.Nick"
|
||||
},
|
||||
"Email": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=个人信息.Email"
|
||||
},
|
||||
"ExtendedProperties": [
|
||||
{
|
||||
"Name": "DingTalkUnionID",
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=个人信息.UnionId"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2",
|
||||
"OperationType": "101",
|
||||
"CommandOperator": {
|
||||
"$type": "UserManagementCommandsV2.LoginOperator, UserManagementCommandsV2",
|
||||
"UserName": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户.用户名"
|
||||
},
|
||||
"IsCheckPassword": false,
|
||||
"RememberMe": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": "登录成功"
|
||||
}
|
||||
],
|
||||
"ID": "711e6405-f2b3-4a58-aaf2-86afae80e8d0"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "400",
|
||||
"Message": "请先使用账号登录,前往个人中心绑定钉钉后方可使用钉钉登录。"
|
||||
}
|
||||
],
|
||||
"ID": "f355aff9-e63b-4147-9319-e09f6f808512"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -14,12 +14,13 @@
|
||||
{
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
|
||||
"roleNames": [
|
||||
"FGC_LoginUser"
|
||||
"FGC_Anonymous"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"HttpMethod": 3
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
|
||||
148
ServerCommands/钉钉/钉钉授权登录.json
Normal file
148
ServerCommands/钉钉/钉钉授权登录.json
Normal file
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"Name": "钉钉授权登录",
|
||||
"Enabled": true,
|
||||
"Triggers": [
|
||||
{
|
||||
"$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon",
|
||||
"Permission": {
|
||||
"PermissionData": {
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core",
|
||||
"permissionResource": {
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core"
|
||||
},
|
||||
"permissionBindings": [
|
||||
{
|
||||
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
|
||||
"roleNames": [
|
||||
"FGC_Anonymous"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"HttpMethod": 3,
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "授权码",
|
||||
"DataValidationInfo": {
|
||||
"IgnoreBlank": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "DingTalkPlugin.Getuserinfo, DingTalkPlugin",
|
||||
"Code": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=授权码"
|
||||
},
|
||||
"UserInfo": "用户信息"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||||
"ParameterName": "查找用户",
|
||||
"TableValue": {
|
||||
"TableName": "用户信息视图",
|
||||
"TableValueType": 1,
|
||||
"BindingInfos": [
|
||||
{
|
||||
"GUID": "38bab2f8-693a-431c-8b04-6befe101687c",
|
||||
"BindingInfo": {
|
||||
"TableName": "用户信息视图",
|
||||
"ColumnName": "用户名",
|
||||
"GUID": "37f86a0d-9aa8-4731-8aef-ab55b140fe53"
|
||||
},
|
||||
"ColumnName": "用户名"
|
||||
}
|
||||
],
|
||||
"SqlCondition": {
|
||||
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
|
||||
"ColumnBindingInfo": {
|
||||
"TableName": "用户信息视图",
|
||||
"ColumnName": "DingTalkUnionID",
|
||||
"GUID": "44ae3fa7-ee61-42a7-a76c-4654379d177f"
|
||||
},
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=用户信息.unionid"
|
||||
}
|
||||
},
|
||||
"NullFormulaValueQueryPolicy": 0,
|
||||
"TopCount": "1"
|
||||
},
|
||||
"ID": "83afb5df01fa4520b302ab0cc912b78c"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
|
||||
"ConditionAndCommandPairList": [
|
||||
{
|
||||
"Condition": {
|
||||
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
|
||||
"param": {
|
||||
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
|
||||
"ParamObject": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户"
|
||||
}
|
||||
},
|
||||
"value": "%Null%",
|
||||
"compareType": 1
|
||||
},
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2",
|
||||
"OperationType": "202",
|
||||
"CommandOperator": {
|
||||
"$type": "UserManagementCommandsV2.UpdateUserOperator, UserManagementCommandsV2",
|
||||
"UserName": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户.用户名"
|
||||
},
|
||||
"ExtendedProperties": [
|
||||
{
|
||||
"Name": "DingTalkUnionID",
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=用户信息.unionid"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2",
|
||||
"OperationType": "101",
|
||||
"CommandOperator": {
|
||||
"$type": "UserManagementCommandsV2.LoginOperator, UserManagementCommandsV2",
|
||||
"UserName": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=查找用户.用户名"
|
||||
},
|
||||
"IsCheckPassword": false,
|
||||
"RememberMe": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": "登录成功"
|
||||
}
|
||||
],
|
||||
"ID": "1e2e9225-9a6f-4372-a72f-df5bdf80e57d"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "400",
|
||||
"Message": "请先使用账号登录,前往个人中心绑定钉钉后方可使用钉钉登录。"
|
||||
}
|
||||
],
|
||||
"ID": "e3e5479d-4ca5-4c73-821b-9225e1f99b96"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user