Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions application/single_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
mimetypes.add_type('font/ttf', '.ttf')
mimetypes.add_type('font/otf', '.otf')
mimetypes.add_type('application/vnd.ms-outlook', '.msg')
mimetypes.add_type('application/xml', '.xsd')
import openpyxl
import xlrd
import traceback
Expand Down Expand Up @@ -97,7 +98,7 @@
EXECUTOR_TYPE = 'thread'
EXECUTOR_MAX_WORKERS = 30
SESSION_TYPE = 'filesystem'
VERSION = "0.261.021"
VERSION = "0.261.023"
IS_DEVELOPMENT = is_development_env_enabled()

# Opt-out for deployments where App Service Easy Auth is active but the platform
Expand Down Expand Up @@ -184,6 +185,7 @@ def _split_env_list(raw_value, lowercase=False):
BASE_ALLOWED_EXTENSIONS = {'txt', 'doc', 'docm', 'html', 'md', 'json', 'xml', 'yaml', 'yml', 'log'}
DOCUMENT_EXTENSIONS = {'pdf', 'docx', 'pptx', 'ppt'}
TABULAR_EXTENSIONS = {'csv', 'xlsx', 'xls', 'xlsm'}
SCHEMA_EXTENSIONS = {'xsd'}
VISIO_EXTENSIONS = {'vsdx'}
EMAIL_EXTENSIONS = {'msg'}

Expand Down Expand Up @@ -217,6 +219,7 @@ def get_allowed_extensions(enable_video=False, enable_audio=False):
extensions.update(DOCUMENT_EXTENSIONS)
extensions.update(IMAGE_EXTENSIONS)
extensions.update(TABULAR_EXTENSIONS)
extensions.update(SCHEMA_EXTENSIONS)
extensions.update(VISIO_EXTENSIONS)
extensions.update(EMAIL_EXTENSIONS)

Expand All @@ -228,7 +231,7 @@ def get_allowed_extensions(enable_video=False, enable_audio=False):

return extensions

def get_allowed_extension_categories(enable_video=False, enable_audio=False):
def get_allowed_extension_categories(enable_video=False, enable_audio=False, enable_xsd=False):
"""
Get allowed file extensions grouped for display in workspace upload dialogs.
"""
Expand Down Expand Up @@ -263,6 +266,12 @@ def get_allowed_extension_categories(enable_video=False, enable_audio=False):
'extensions': VIDEO_EXTENSIONS,
})

if enable_xsd:
categories.append({
'name': 'XML schemas',
'extensions': SCHEMA_EXTENSIONS,
})

return [
{
'name': category['name'],
Expand Down
34 changes: 33 additions & 1 deletion application/single_app/functions_document_access_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
DOCUMENT_ACCESS_BACKFILL_STATE_DOC_ID = 'document_access_index_backfill_state'
DOCUMENT_ACCESS_SHADOW_STATE_TYPE = 'document_access_index_shadow_validation_state'
DOCUMENT_ACCESS_SHADOW_STATE_DOC_ID = 'document_access_index_shadow_validation_state'
DOCUMENT_ACCESS_INDEX_SCHEMA_VERSION = 2
DOCUMENT_ACCESS_INDEX_SCHEMA_VERSION = 3

DOCUMENT_ACCESS_SCOPE_PERSONAL = 'personal'
DOCUMENT_ACCESS_SCOPE_GROUP = 'group'
Expand Down Expand Up @@ -1738,6 +1738,22 @@ def _build_base_row(document_item, source_scope, scope_type, scope_id, access_ro
'number_of_pages': document_item.get('number_of_pages'),
'publication_date': document_item.get('publication_date'),
'enhanced_citations': _has_persisted_blob_reference(document_item),
'document_kind': document_item.get('document_kind'),
'xsd_logical_path': document_item.get('xsd_logical_path'),
'xsd_schema_status': document_item.get('xsd_schema_status'),
'xsd_profile': document_item.get('xsd_profile'),
'xsd_validator_id': document_item.get('xsd_validator_id'),
'xsd_dialect': document_item.get('xsd_dialect'),
'xsd_effective_dialect': document_item.get('xsd_effective_dialect'),
'xsd_target_namespace': document_item.get('xsd_target_namespace'),
'xsd_sha256': document_item.get('xsd_sha256'),
'xsd_byte_size': document_item.get('xsd_byte_size'),
'xsd_author_version': document_item.get('xsd_author_version'),
'xsd_global_elements': document_item.get('xsd_global_elements'),
'xsd_global_types': document_item.get('xsd_global_types'),
'xsd_dependencies': document_item.get('xsd_dependencies'),
'xsd_dependency_count': document_item.get('xsd_dependency_count'),
'xsd_diagnostics': document_item.get('xsd_diagnostics'),
'document_intelligence_extraction_mode': document_item.get('document_intelligence_extraction_mode'),
'extraction_engine': document_item.get('extraction_engine'),
'extraction_engine_reason': document_item.get('extraction_engine_reason'),
Expand Down Expand Up @@ -2410,6 +2426,22 @@ def _projection_row_to_document(row, source_scope):
'number_of_pages': row.get('number_of_pages'),
'publication_date': row.get('publication_date'),
'enhanced_citations': row.get('enhanced_citations'),
'document_kind': row.get('document_kind'),
'xsd_logical_path': row.get('xsd_logical_path'),
'xsd_schema_status': row.get('xsd_schema_status'),
'xsd_profile': row.get('xsd_profile'),
'xsd_validator_id': row.get('xsd_validator_id'),
'xsd_dialect': row.get('xsd_dialect'),
'xsd_effective_dialect': row.get('xsd_effective_dialect'),
'xsd_target_namespace': row.get('xsd_target_namespace'),
'xsd_sha256': row.get('xsd_sha256'),
'xsd_byte_size': row.get('xsd_byte_size'),
'xsd_author_version': row.get('xsd_author_version'),
'xsd_global_elements': row.get('xsd_global_elements'),
'xsd_global_types': row.get('xsd_global_types'),
'xsd_dependencies': row.get('xsd_dependencies'),
'xsd_dependency_count': row.get('xsd_dependency_count'),
'xsd_diagnostics': row.get('xsd_diagnostics'),
'document_intelligence_extraction_mode': row.get('document_intelligence_extraction_mode'),
'extraction_engine': row.get('extraction_engine'),
'extraction_engine_reason': row.get('extraction_engine_reason'),
Expand Down
Loading
Loading