Add API key member and space capabilities
This commit is contained in:
@@ -63,6 +63,8 @@ export interface APIPrincipalTestToken {
|
||||
// - 'manage_vector_stores': manage vector stores and parser/storage checks
|
||||
// - 'manage_web_search': manage web-search providers
|
||||
// - 'run_evaluations': run/read evaluation jobs
|
||||
// - 'manage_members': manage tenant members and invitations
|
||||
// - 'manage_spaces': manage organization/space collaboration
|
||||
// - 'manage_tenant_settings': read/update tenant integration settings (API principal mode, headers, tenant KV)
|
||||
export type TenantAPIKeyCapability =
|
||||
| 'retrieve'
|
||||
@@ -79,6 +81,8 @@ export type TenantAPIKeyCapability =
|
||||
| 'manage_vector_stores'
|
||||
| 'manage_web_search'
|
||||
| 'run_evaluations'
|
||||
| 'manage_members'
|
||||
| 'manage_spaces'
|
||||
| 'manage_tenant_settings'
|
||||
|
||||
export interface TenantAPIKey {
|
||||
|
||||
@@ -5786,6 +5786,7 @@ export default {
|
||||
apiKeyCapabilities: 'Capabilities',
|
||||
apiKeyCapabilityGroupKnowledge: 'Knowledge-base data',
|
||||
apiKeyCapabilityGroupAutomation: 'Agents and integrations',
|
||||
apiKeyCapabilityGroupCollaboration: 'Members and spaces',
|
||||
apiKeyCapabilityGroupTenant: 'Tenant configuration',
|
||||
apiKeyCapabilitySelectGroup: 'Select all',
|
||||
apiKeyCapabilityClearGroup: 'Clear',
|
||||
@@ -5819,6 +5820,10 @@ export default {
|
||||
capabilityManageWebSearchHint: 'Manage web-search provider configurations, credentials, and connection tests.',
|
||||
capabilityRunEvaluations: 'Run evaluations',
|
||||
capabilityRunEvaluationsHint: 'Run evaluation jobs and read evaluation results.',
|
||||
capabilityManageMembers: 'Manage members',
|
||||
capabilityManageMembersHint: 'List and manage tenant members, roles, invitations, and invite links. Does not include API key management, tenant deletion, or ownership transfer.',
|
||||
capabilityManageSpaces: 'Manage spaces',
|
||||
capabilityManageSpacesHint: 'Manage organization spaces, join flows, space membership, invitations, and shared-space visibility. Does not grant KB or agent share management.',
|
||||
capabilityManageTenantSettings: 'Manage tenant settings',
|
||||
capabilityManageTenantSettingsHint: 'Read and update tenant-level integration settings such as API end-user identity mode, request header configuration, and tenant KV settings. Does not include API key management, member management, tenant deletion, or ownership transfer.',
|
||||
apiKeyKnowledgeScope: 'Knowledge bases',
|
||||
|
||||
@@ -5797,6 +5797,7 @@ export default {
|
||||
apiKeyCapabilities: "사용 가능 기능",
|
||||
apiKeyCapabilityGroupKnowledge: "지식베이스 데이터",
|
||||
apiKeyCapabilityGroupAutomation: "에이전트 및 통합",
|
||||
apiKeyCapabilityGroupCollaboration: "멤버 및 공간",
|
||||
apiKeyCapabilityGroupTenant: "테넌트 설정",
|
||||
apiKeyCapabilitySelectGroup: "전체 선택",
|
||||
apiKeyCapabilityClearGroup: "비우기",
|
||||
@@ -5830,6 +5831,10 @@ export default {
|
||||
capabilityManageWebSearchHint: "웹 검색 공급자 설정, 자격 증명 및 연결 테스트를 관리합니다.",
|
||||
capabilityRunEvaluations: "평가 실행",
|
||||
capabilityRunEvaluationsHint: "평가 작업을 실행하고 결과를 읽을 수 있습니다.",
|
||||
capabilityManageMembers: "멤버 관리",
|
||||
capabilityManageMembersHint: "테넌트 멤버, 역할, 초대 및 초대 링크를 조회하고 관리할 수 있습니다. API Key 관리, 테넌트 삭제 또는 소유권 이전은 포함하지 않습니다.",
|
||||
capabilityManageSpaces: "공간 관리",
|
||||
capabilityManageSpacesHint: "조직/공간, 가입 흐름, 공간 멤버, 초대 및 공유 공간 표시를 관리할 수 있습니다. 지식베이스 또는 에이전트 공유 관리는 부여하지 않습니다.",
|
||||
capabilityManageTenantSettings: "테넌트 설정 관리",
|
||||
capabilityManageTenantSettingsHint: "API 최종 사용자 식별 모드, 요청 헤더 설정, 테넌트 KV 설정 등 테넌트 수준 통합 설정을 읽고 업데이트합니다. API Key 관리, 멤버 관리, 테넌트 삭제 또는 소유권 이전은 포함하지 않습니다.",
|
||||
apiKeyKnowledgeScope: "지식베이스 범위",
|
||||
|
||||
@@ -5618,6 +5618,7 @@ export default {
|
||||
apiKeyCapabilities: 'Возможности',
|
||||
apiKeyCapabilityGroupKnowledge: 'Данные баз знаний',
|
||||
apiKeyCapabilityGroupAutomation: 'Агенты и интеграции',
|
||||
apiKeyCapabilityGroupCollaboration: 'Участники и пространства',
|
||||
apiKeyCapabilityGroupTenant: 'Настройки арендатора',
|
||||
apiKeyCapabilitySelectGroup: 'Выбрать всё',
|
||||
apiKeyCapabilityClearGroup: 'Очистить',
|
||||
@@ -5651,6 +5652,10 @@ export default {
|
||||
capabilityManageWebSearchHint: 'Управление провайдерами веб-поиска, учётными данными и проверками подключения.',
|
||||
capabilityRunEvaluations: 'Запуск оценок',
|
||||
capabilityRunEvaluationsHint: 'Запуск задач оценки и чтение результатов.',
|
||||
capabilityManageMembers: 'Управление участниками',
|
||||
capabilityManageMembersHint: 'Просмотр и управление участниками арендатора, ролями, приглашениями и ссылками-приглашениями. Не включает управление API Key, удаление арендатора или передачу владения.',
|
||||
capabilityManageSpaces: 'Управление пространствами',
|
||||
capabilityManageSpacesHint: 'Управление организациями/пространствами, вступлением, участниками, приглашениями и видимостью общих пространств. Не даёт управление шарингом баз знаний или агентов.',
|
||||
capabilityManageTenantSettings: 'Управление настройками арендатора',
|
||||
capabilityManageTenantSettingsHint: 'Чтение и обновление интеграционных настроек арендатора: режим идентификации конечного пользователя API, настройки заголовков запросов и tenant KV. Не включает управление API Key, участниками, удаление арендатора или передачу владения.',
|
||||
apiKeyKnowledgeScope: 'Базы знаний',
|
||||
|
||||
@@ -5799,6 +5799,7 @@ export default {
|
||||
apiKeyCapabilities: "可用能力",
|
||||
apiKeyCapabilityGroupKnowledge: "知识库数据",
|
||||
apiKeyCapabilityGroupAutomation: "智能体与集成",
|
||||
apiKeyCapabilityGroupCollaboration: "成员与空间",
|
||||
apiKeyCapabilityGroupTenant: "租户配置",
|
||||
apiKeyCapabilitySelectGroup: "全选",
|
||||
apiKeyCapabilityClearGroup: "清空",
|
||||
@@ -5832,6 +5833,10 @@ export default {
|
||||
capabilityManageWebSearchHint: "允许管理联网搜索供应商配置、凭据和连接测试。",
|
||||
capabilityRunEvaluations: "运行评测",
|
||||
capabilityRunEvaluationsHint: "允许运行评测任务并读取评测结果。",
|
||||
capabilityManageMembers: "管理成员",
|
||||
capabilityManageMembersHint: "允许查看和管理租户成员、角色、邀请和邀请链接;不包含 API Key 管理、租户删除或所有权转移。",
|
||||
capabilityManageSpaces: "管理空间",
|
||||
capabilityManageSpacesHint: "允许管理组织空间、加入流程、空间成员、邀请和共享空间可见性;不授予知识库或智能体分享管理权限。",
|
||||
capabilityManageTenantSettings: "管理租户设置",
|
||||
capabilityManageTenantSettingsHint: "允许读取和更新租户级集成设置,例如 API 终端用户身份模式、请求头配置、租户 KV 配置等;不包含 API Key 管理、成员管理、租户删除或所有权转移。",
|
||||
apiKeyKnowledgeScope: "知识库范围",
|
||||
|
||||
@@ -636,6 +636,8 @@ const API_KEY_CAPABILITIES: TenantAPIKeyCapability[] = [
|
||||
'manage_web_search',
|
||||
'manage_channels',
|
||||
'run_evaluations',
|
||||
'manage_members',
|
||||
'manage_spaces',
|
||||
'manage_tenant_settings',
|
||||
]
|
||||
|
||||
@@ -671,6 +673,14 @@ const apiKeyCapabilityGroups: ApiKeyCapabilityGroup[] = [
|
||||
{ value: 'manage_datasources', labelKey: 'integrations.api.capabilityManageDatasources', hintKey: 'integrations.api.capabilityManageDatasourcesHint' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'collaboration',
|
||||
labelKey: 'integrations.api.apiKeyCapabilityGroupCollaboration',
|
||||
capabilities: [
|
||||
{ value: 'manage_members', labelKey: 'integrations.api.capabilityManageMembers', hintKey: 'integrations.api.capabilityManageMembersHint' },
|
||||
{ value: 'manage_spaces', labelKey: 'integrations.api.capabilityManageSpaces', hintKey: 'integrations.api.capabilityManageSpacesHint' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'tenant',
|
||||
labelKey: 'integrations.api.apiKeyCapabilityGroupTenant',
|
||||
@@ -766,6 +776,8 @@ function keyCapabilityLabels(key: TenantAPIKey): string[] {
|
||||
manage_vector_stores: t('integrations.api.capabilityManageVectorStores'),
|
||||
manage_web_search: t('integrations.api.capabilityManageWebSearch'),
|
||||
run_evaluations: t('integrations.api.capabilityRunEvaluations'),
|
||||
manage_members: t('integrations.api.capabilityManageMembers'),
|
||||
manage_spaces: t('integrations.api.capabilityManageSpaces'),
|
||||
manage_tenant_settings: t('integrations.api.capabilityManageTenantSettings'),
|
||||
}
|
||||
return (key.capabilities ?? [])
|
||||
|
||||
Reference in New Issue
Block a user