feat: add organization management features
- Introduced a new API for organization management, including creation, updating, and deletion of organizations. - Implemented organization sharing functionality for knowledge bases, allowing users to share knowledge bases with specific organizations and set permissions. - Added UI components for organization selection and sharing dialogs. - Enhanced existing components to support organization-related features, including shared knowledge base handling and organization role management. This update enhances collaboration capabilities within the application by allowing users to manage and share knowledge bases across different organizations.
This commit is contained in:
@@ -100,6 +100,19 @@ func (s *chunkService) GetChunkByID(ctx context.Context, id string) (*types.Chun
|
||||
return chunk, nil
|
||||
}
|
||||
|
||||
// GetChunkByIDOnly retrieves a chunk by ID without tenant filter (for permission resolution).
|
||||
func (s *chunkService) GetChunkByIDOnly(ctx context.Context, id string) (*types.Chunk, error) {
|
||||
chunk, err := s.chunkRepository.GetChunkByIDOnly(ctx, id)
|
||||
if err != nil {
|
||||
if err != nil && err.Error() == "chunk not found" {
|
||||
return nil, ErrChunkNotFound
|
||||
}
|
||||
logger.ErrorWithFields(ctx, err, map[string]interface{}{"chunk_id": id})
|
||||
return nil, err
|
||||
}
|
||||
return chunk, nil
|
||||
}
|
||||
|
||||
// ListChunksByKnowledgeID lists all chunks for a knowledge ID
|
||||
// This method retrieves all chunks belonging to a specific knowledge document
|
||||
// Parameters:
|
||||
|
||||
Reference in New Issue
Block a user