mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge pull request #112 from APIParkLab/feature/permission
Feature/permission
This commit is contained in:
+4
-11
@@ -348,20 +348,13 @@ func (i *imlProviderModule) UpdateProviderDefaultLLM(ctx context.Context, id str
|
||||
})
|
||||
}
|
||||
|
||||
func (i *imlProviderModule) getAiProviders(ctx context.Context, clusterId string) ([]*gateway.DynamicRelease, error) {
|
||||
list, err := i.providerService.List(ctx, clusterId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
func (i *imlProviderModule) getAiProviders(ctx context.Context) ([]*gateway.DynamicRelease, error) {
|
||||
list, err := i.providerService.List(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
providers := make([]*gateway.DynamicRelease, 0, len(list))
|
||||
for _, p := range list {
|
||||
if !p.Status {
|
||||
// 关闭
|
||||
continue
|
||||
}
|
||||
cfg := make(map[string]interface{})
|
||||
err = json.Unmarshal([]byte(p.Config), &cfg)
|
||||
if err != nil {
|
||||
@@ -384,7 +377,7 @@ func (i *imlProviderModule) getAiProviders(ctx context.Context, clusterId string
|
||||
return providers, nil
|
||||
}
|
||||
func (i *imlProviderModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error {
|
||||
providers, err := i.getAiProviders(ctx, clusterId)
|
||||
providers, err := i.getAiProviders(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -401,7 +394,7 @@ func (i *imlProviderModule) initGateway(ctx context.Context, clusterId string, c
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = client.Online(ctx, providers...)
|
||||
err = client.Online(ctx, p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ system:
|
||||
- "DELETE:/api/v1/certificate"
|
||||
dependents:
|
||||
- system.settings.ssl_certificate.view
|
||||
- name: Data Source
|
||||
- name: data source
|
||||
value: 'data_source'
|
||||
children:
|
||||
- name: view
|
||||
@@ -264,7 +264,7 @@ team:
|
||||
- "DELETE:/api/v1/service/release"
|
||||
dependents:
|
||||
- team.service.release.view
|
||||
- name: subscription management
|
||||
- name: subscription review
|
||||
value: 'subscription'
|
||||
children:
|
||||
- name: view
|
||||
@@ -296,13 +296,12 @@ team:
|
||||
- name: consumer
|
||||
value: 'consumer'
|
||||
children:
|
||||
- name: subscription Service
|
||||
- name: subscription service
|
||||
cname: 订阅服务
|
||||
value: 'subscription'
|
||||
children:
|
||||
- name: subscribe
|
||||
- name: allow subscribe service
|
||||
value: 'subscribe'
|
||||
|
||||
- name: view subscribed services
|
||||
value: 'view_subscribed_service'
|
||||
guest_allow: true
|
||||
@@ -371,20 +370,15 @@ team:
|
||||
value: 'manager'
|
||||
dependents:
|
||||
- team.team.member.view
|
||||
- name: team
|
||||
- name: team settings
|
||||
value: 'team'
|
||||
children:
|
||||
- name: view
|
||||
value: 'view'
|
||||
guest_allow: true
|
||||
apis:
|
||||
- "GET:/api/v1/manager/teams"
|
||||
- "GET:/api/v1/manager/team"
|
||||
- name: manager
|
||||
value: 'manager'
|
||||
apis:
|
||||
- "POST:/api/v1/manager/team"
|
||||
- "PUT:/api/v1/manager/team"
|
||||
- "DELETE:/api/v1/manager/team"
|
||||
dependents:
|
||||
- team.team.team.view
|
||||
@@ -1,44 +1,46 @@
|
||||
{
|
||||
"ai provider": "AI供应商",
|
||||
"api market": "API门户",
|
||||
"account": "账号",
|
||||
"ai provider": "AI模型供应商",
|
||||
"analysis": "分析报告",
|
||||
"api": "API",
|
||||
"api doc": "API文档",
|
||||
"application": "应用",
|
||||
"application admin": "应用管理员",
|
||||
"application developer": "应用开发者",
|
||||
"authorization": "鉴权",
|
||||
"cluster": "集群",
|
||||
"dashboard": "仪表盘",
|
||||
"api gateway": "API网关",
|
||||
"api portal": "API门户",
|
||||
"authorization": "访问授权",
|
||||
"consumer": "消费者",
|
||||
"consumer admin": "消费者管理员",
|
||||
"consumer developer": "消费者开发者",
|
||||
"create": "创建",
|
||||
"data source": "数据源",
|
||||
"devops": "运维",
|
||||
"devops admin": "运维管理员",
|
||||
"general": "常规设置",
|
||||
"general member": "普通成员",
|
||||
"guest": "访客",
|
||||
"log configuration": "日志配置",
|
||||
"manager": "管理",
|
||||
"manager all consumer": "管理所有消费者",
|
||||
"manager subscribed services": "管理已订阅的服务",
|
||||
"member": "成员",
|
||||
"organization": "组织管理",
|
||||
"release": "发布",
|
||||
"role": "角色",
|
||||
"router": "路由",
|
||||
"run view": "运行视图",
|
||||
"service": "服务",
|
||||
"service admin": "服务管理员",
|
||||
"service classification": "服务目录",
|
||||
"service developer": "服务开发者",
|
||||
"service intro": "服务文档",
|
||||
"ssl certificate": "SSL证书",
|
||||
"subscription management": "订阅方管理",
|
||||
"allow subscribe service": "允许订阅服务",
|
||||
"subscription review": "订阅审核",
|
||||
"subscription service": "订阅服务",
|
||||
"super admin": "超级管理员",
|
||||
"system settings": "系统设置",
|
||||
"team": "团队",
|
||||
"team settings": "团队设置",
|
||||
"team admin": "团队管理员",
|
||||
"upstream": "上游",
|
||||
"view": "查看",
|
||||
"view all application": "查看所有应用",
|
||||
"view all consumer": "查看所有消费者",
|
||||
"view all service": "查看所有服务",
|
||||
"view all team": "查看所有团队",
|
||||
"view system role": "查看系统角色",
|
||||
"view team role": "查看团队角色",
|
||||
"view subscribed services": "查看已经订阅的服务",
|
||||
"workspace": "工作空间"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user