diff --git a/admin/server/source/system/api.go b/admin/server/source/system/api.go index d0812e645..63b81be93 100644 --- a/admin/server/source/system/api.go +++ b/admin/server/source/system/api.go @@ -244,10 +244,12 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) { {ApiGroup: "模型管理", Method: "PATCH", Path: "/gaia/proxy/*", Description: "中转API(第三方)-PATCH"}, {ApiGroup: "模型管理", Method: "DELETE", Path: "/gaia/proxy/*", Description: "中转API(第三方)-DELETE"}, // Extend Stop: model provider - // 转发 Token 管理 + + // Extend Start: 转发集成 (forward tokens) {ApiGroup: "转发集成", Method: "GET", Path: "/gaia/system/forward-tokens", Description: "获取转发 Token 列表"}, {ApiGroup: "转发集成", Method: "POST", Path: "/gaia/system/forward-tokens", Description: "新增转发 Token"}, {ApiGroup: "转发集成", Method: "DELETE", Path: "/gaia/system/forward-tokens/:id", Description: "删除转发 Token"}, + // Extend Stop: 转发集成 } if err := db.Create(&entities).Error; err != nil { return ctx, errors.Wrap(err, sysModel.SysApi{}.TableName()+"表数据初始化失败!") diff --git a/admin/server/source/system/casbin.go b/admin/server/source/system/casbin.go index dacbfc9a7..888c838b8 100644 --- a/admin/server/source/system/casbin.go +++ b/admin/server/source/system/casbin.go @@ -403,6 +403,15 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error {Ptype: "p", V0: "8881", V1: "/gaia/proxy/*", V2: "PATCH"}, {Ptype: "p", V0: "8881", V1: "/gaia/proxy/*", V2: "DELETE"}, // Extend Stop: model provider + + // Extend Start: 转发集成 (forward tokens) + {Ptype: "p", V0: "888", V1: "/gaia/system/forward-tokens", V2: "GET"}, + {Ptype: "p", V0: "888", V1: "/gaia/system/forward-tokens", V2: "POST"}, + {Ptype: "p", V0: "888", V1: "/gaia/system/forward-tokens/:id", V2: "DELETE"}, + {Ptype: "p", V0: "8881", V1: "/gaia/system/forward-tokens", V2: "GET"}, + {Ptype: "p", V0: "8881", V1: "/gaia/system/forward-tokens", V2: "POST"}, + {Ptype: "p", V0: "8881", V1: "/gaia/system/forward-tokens/:id", V2: "DELETE"}, + // Extend Stop: 转发集成 } if err := db.Create(&entities).Error; err != nil { return ctx, errors.Wrap(err, "Casbin 表 ("+i.InitializerName()+") 数据初始化失败!") diff --git a/admin/web/src/view/systemIntegrated/dingTalk/index.vue b/admin/web/src/view/systemIntegrated/dingTalk/index.vue index 6632bba20..9c10403f3 100644 --- a/admin/web/src/view/systemIntegrated/dingTalk/index.vue +++ b/admin/web/src/view/systemIntegrated/dingTalk/index.vue @@ -438,7 +438,7 @@
第三方钉钉 ID 匹配用户 API
-

当本地表中找不到钉钉 ID 对应用户时,调用此 API 通过 ding_id 获取用户名

+

当本地表中找不到钉钉 ID 对应用户时,调用此 API 通过 ding_id 获取用户名。开启或修改后请点击下方「保存」按钮。

启用: @@ -470,19 +470,23 @@ {{ dingIdApiConfig.response_user_name_path || '未配置' }}
+
+ + 保存「转发集成」与「钉钉 ID 匹配 API」配置 + +
- +
-

输入 Token 明文,系统将存储其 SHA256 哈希。Token 仅展示一次,请妥善保管。

- +

点击「生成并保存」将随机生成 Token,保存后会自动复制到系统剪贴板,请粘贴到安全位置保管。Token 仅展示一次。

- +