mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-06-04 13:30:32 +08:00
feat: 调整模态框层级显示并完善跨租户访问权限控制,优化数据库字段类型定义
This commit is contained in:
@@ -845,7 +845,7 @@ const handleCancel = () => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
z-index: 1200;
|
||||
backdrop-filter: blur(4px);
|
||||
overflow: hidden;
|
||||
padding: 20px;
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/config"
|
||||
"github.com/Tencent/WeKnora/internal/errors"
|
||||
"github.com/Tencent/WeKnora/internal/logger"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
@@ -19,6 +20,7 @@ import (
|
||||
type AuthHandler struct {
|
||||
userService interfaces.UserService
|
||||
tenantService interfaces.TenantService
|
||||
configInfo *config.Config
|
||||
}
|
||||
|
||||
// NewAuthHandler creates a new auth handler instance with the provided services
|
||||
@@ -27,8 +29,10 @@ type AuthHandler struct {
|
||||
// - tenantService: An implementation of the TenantService interface for tenant management
|
||||
//
|
||||
// Returns a pointer to the newly created AuthHandler
|
||||
func NewAuthHandler(userService interfaces.UserService, tenantService interfaces.TenantService) *AuthHandler {
|
||||
func NewAuthHandler(configInfo *config.Config,
|
||||
userService interfaces.UserService, tenantService interfaces.TenantService) *AuthHandler {
|
||||
return &AuthHandler{
|
||||
configInfo: configInfo,
|
||||
userService: userService,
|
||||
tenantService: tenantService,
|
||||
}
|
||||
@@ -241,11 +245,12 @@ func (h *AuthHandler) GetCurrentUser(c *gin.Context) {
|
||||
// Don't fail the request if tenant info is not available
|
||||
}
|
||||
}
|
||||
|
||||
userInfo := user.ToUserInfo()
|
||||
userInfo.CanAccessAllTenants = user.CanAccessAllTenants && h.configInfo.Tenant.EnableCrossTenantAccess
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": true,
|
||||
"data": gin.H{
|
||||
"user": user.ToUserInfo(),
|
||||
"user": userInfo,
|
||||
"tenant": tenant,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
-- When enabled, the system generates questions for document chunks to improve recall
|
||||
|
||||
ALTER TABLE knowledge_bases
|
||||
ADD COLUMN IF NOT EXISTS question_generation_config JSON NULL
|
||||
COMMENT 'Question generation configuration for document knowledge bases';
|
||||
ADD COLUMN IF NOT EXISTS question_generation_config JSONB NULL ;
|
||||
|
||||
Reference in New Issue
Block a user