feat: Implement cross-tenant access functionality

- Added configuration for enabling cross-tenant access in the application.
- Introduced new API endpoints for listing and searching tenants, accessible only to users with the appropriate permissions.
- Updated user and tenant models to include the `can_access_all_tenants` field.
- Enhanced the authentication middleware to handle cross-tenant requests and validate user permissions.
- Created a new TenantSelector component for selecting tenants in the frontend, improving user experience.
- Updated internationalization files to support new tenant-related strings and messages.
This commit is contained in:
wizardchen
2025-12-02 12:17:39 +08:00
parent e66ace9c14
commit cdf576eb18
22 changed files with 1079 additions and 29 deletions
+8
View File
@@ -1149,6 +1149,7 @@ export default {
},
tenant: {
title: 'Tenant Information',
currentTenant: 'Current Tenant',
sectionDescription: 'View detailed configuration for the tenant',
apiDocument: 'API Document',
name: 'Tenant Name',
@@ -1195,6 +1196,13 @@ export default {
apiKeyCopied: 'API Key copied to clipboard',
unknown: 'Unknown',
formatError: 'Format error',
searchPlaceholder: 'Search by name or enter tenant ID...',
searchHint: 'Search by name or enter tenant ID directly',
noMatch: 'No matching tenants found',
switchSuccess: 'Tenant switched successfully',
loadTenantsFailed: 'Failed to load tenant list',
loading: 'Loading...',
loadMore: 'Load more',
details: {
idLabel: 'Tenant ID',
idDescription: 'Unique identifier of your tenant',