mirror of
https://github.com/ONLYOFFICE/DocSpace-buildtools.git
synced 2025-04-18 13:44:02 +03:00
Merge branch 'develop' into feature/management
# Conflicts: # build.backend.docker.sh # build.static.bat # common/ASC.Api.Core/Security/EmailValidationKeyModelHelper.cs # common/ASC.Core.Common/Caching/CachedTenantService.cs # common/ASC.Core.Common/Core/TenantRegistrationInfo.cs # common/ASC.Core.Common/HostedSolution.cs # common/ASC.Core.Common/Security/EmailValidationKeyProvider.cs # common/ASC.Data.Backup.Core/BackupAjaxHandler.cs # common/ASC.Data.Backup.Core/Contracts/BackupServiceModel.cs # common/ASC.Data.Backup.Core/EF/Model/BackupSchedule.cs # common/ASC.Data.Backup.Core/IntegrationEvents/Events/BackupRequestIntegrationEvent.cs # common/ASC.Data.Backup.Core/Service/BackupService.cs # common/ASC.Data.Backup.Core/Service/ProgressItems/BackupProgressItem.cs # common/ASC.Data.Backup.Core/Tasks/BackupPortalTask.cs # common/ASC.Data.Backup.Core/Tasks/TransferPortalTask.cs # common/services/ASC.ApiSystem/ASC.ApiSystem.csproj # common/services/ASC.ApiSystem/Classes/CommonMethods.cs # common/services/ASC.ApiSystem/Controllers/PortalController.cs # common/services/ASC.ApiSystem/Controllers/SettingsController.cs # common/services/ASC.ApiSystem/GlobalUsings.cs # common/services/ASC.ApiSystem/Models/SettingsModel.cs # common/services/ASC.ApiSystem/Startup.cs # common/services/ASC.Data.Backup.BackgroundTasks/IntegrationEvents/EventHandling/BackupRequestedIntegrationEventHandler.cs # common/services/ASC.Data.Backup/Api/BackupController.cs # common/services/ASC.Data.Backup/ApiModels/BackupDto.cs # common/services/ASC.Data.Backup/ApiModels/BackupScheduleDto.cs # common/services/ASC.Data.Backup/GlobalUsings.cs # frontend.code-workspace # frontend.macos.code-workspace # migrations/mysql/SaaS/MigrationContext/MigrationContextModelSnapshot.cs # migrations/postgre/SaaS/MigrationContext/MigrationContextModelSnapshot.cs # package.json # packages/client/package.json # packages/client/src/components/MainBar/index.js # packages/client/src/components/NavMenu/index.js # packages/client/src/components/NavMenu/sub-components/header-nav.js # packages/client/src/components/NavMenu/sub-components/header.js # packages/client/src/pages/Confirm/sub-components/auth.js # packages/client/src/pages/PortalSettings/categories/common/Branding/additionalResources.js # packages/client/src/pages/PortalSettings/categories/common/Branding/companyInfoSettings.js # packages/client/src/pages/PortalSettings/categories/common/Branding/whitelabel.js # packages/client/src/pages/PortalSettings/categories/common/branding.js # packages/client/src/pages/PortalSettings/categories/common/sub-components/loaderWhiteLabel.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/auto-backup/index.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/manual-backup/index.js # packages/client/src/pages/PortalSettings/categories/data-management/backup/restore-backup/sub-components/backup-list/index.js # packages/client/src/pages/PortalSettings/categories/data-management/index.js # packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/index.js # packages/client/src/store/ProfileActionsStore.js # packages/client/webpack.config.js # packages/common/api/index.js # packages/common/api/portal/index.js # packages/common/components/Article/index.js # packages/common/components/Article/sub-components/article-apps.js # packages/common/components/Article/sub-components/article-header.js # packages/common/components/Article/sub-components/article-hide-menu-button.js # packages/common/components/Article/sub-components/article-profile.js # packages/common/store/AuthStore.js # packages/common/store/SettingsStore.js # packages/common/utils/axiosClient.js # packages/common/utils/whiteLabelHelper.js # packages/components/context-menu/index.js # packages/components/themes/base.js # packages/components/themes/dark.js # public/locales/en/Common.json # public/scripts/config.json # web/ASC.Web.Api/Api/Settings/SettingsController.cs # web/ASC.Web.Api/Api/Settings/StorageController.cs # web/ASC.Web.Api/Api/Settings/WhitelabelController.cs # web/ASC.Web.Api/ApiModels/ResponseDto/SettingsDto.cs # web/ASC.Web.Core/Utility/TenantExtra.cs # yarn.lock
This commit is contained in:
commit
0266838db5
290
.editorconfig
290
.editorconfig
@ -1,290 +0,0 @@
|
||||
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||
root = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
|
||||
#### Core EditorConfig Options ####
|
||||
|
||||
# Indentation and spacing
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
|
||||
# New line preferences
|
||||
end_of_line = crlf
|
||||
insert_final_newline = false
|
||||
|
||||
#### .NET Coding Conventions ####
|
||||
|
||||
# Organize usings
|
||||
dotnet_separate_import_directive_groups = true
|
||||
dotnet_sort_system_directives_first = true
|
||||
file_header_template = unset
|
||||
|
||||
# this. and Me. preferences
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
|
||||
# Language keywords vs BCL types preferences
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
|
||||
# Modifier preferences
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
|
||||
# Field preferences
|
||||
dotnet_style_readonly_field = true:warning
|
||||
|
||||
# Parameter preferences
|
||||
dotnet_code_quality_unused_parameters = all:warning
|
||||
|
||||
# Suppression preferences
|
||||
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||
|
||||
# New line preferences
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = false
|
||||
|
||||
#### C# Coding Conventions ####
|
||||
|
||||
# var preferences
|
||||
csharp_style_var_elsewhere = true:warning
|
||||
csharp_style_var_for_built_in_types = true:warning
|
||||
csharp_style_var_when_type_is_apparent = true:warning
|
||||
|
||||
# Expression-bodied members
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
|
||||
# Pattern matching preferences
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
|
||||
# Null-checking preferences
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
# Modifier preferences
|
||||
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
||||
|
||||
# Code-block preferences
|
||||
csharp_prefer_braces = true:warning
|
||||
csharp_prefer_simple_using_statement = false:silent
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
|
||||
# Expression-level preferences
|
||||
csharp_prefer_simple_default_expression = false:silent
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = false:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_prefer_index_operator = false:suggestion
|
||||
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
||||
csharp_style_prefer_range_operator = false:suggestion
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
|
||||
|
||||
# 'using' directive preferences
|
||||
csharp_using_directive_placement = outside_namespace:warning
|
||||
|
||||
# New line preferences
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:silent
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:silent
|
||||
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
|
||||
|
||||
#### C# Formatting Rules ####
|
||||
|
||||
# New line preferences
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = true
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_indent_switch_labels = true
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# Wrapping preferences
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = true
|
||||
|
||||
#### Naming styles ####
|
||||
|
||||
# Naming rules
|
||||
|
||||
dotnet_naming_rule.private_field_should_be_begin_with_underscore.severity = warning
|
||||
dotnet_naming_rule.private_field_should_be_begin_with_underscore.symbols = private_field
|
||||
dotnet_naming_rule.private_field_should_be_begin_with_underscore.style = begin_with_underscore
|
||||
|
||||
dotnet_naming_rule.public_field_should_be_begin_without_underscore.severity = warning
|
||||
dotnet_naming_rule.public_field_should_be_begin_without_underscore.symbols = public_field
|
||||
dotnet_naming_rule.public_field_should_be_begin_without_underscore.style = begin_without_underscore
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
|
||||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Symbol specifications
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.private_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_field.applicable_accessibilities = private, protected, private_protected
|
||||
dotnet_naming_symbols.private_field.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.constant_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.constant_fields.required_modifiers = const
|
||||
|
||||
dotnet_naming_symbols.public_field.applicable_kinds = field
|
||||
dotnet_naming_symbols.public_field.applicable_accessibilities = public, internal, protected_internal
|
||||
dotnet_naming_symbols.public_field.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, property
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
# Naming styles
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.begin_with_underscore.required_prefix = _
|
||||
dotnet_naming_style.begin_with_underscore.required_suffix =
|
||||
dotnet_naming_style.begin_with_underscore.word_separator =
|
||||
dotnet_naming_style.begin_with_underscore.capitalization = camel_case
|
||||
|
||||
dotnet_naming_style.begin_without_underscore.required_prefix =
|
||||
dotnet_naming_style.begin_without_underscore.required_suffix =
|
||||
dotnet_naming_style.begin_without_underscore.word_separator =
|
||||
dotnet_naming_style.begin_without_underscore.capitalization = pascal_case
|
||||
|
||||
csharp_style_expression_bodied_lambdas = true:silent
|
||||
csharp_style_expression_bodied_local_functions = false:silent
|
||||
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
||||
csharp_style_prefer_tuple_swap = true:suggestion
|
||||
csharp_prefer_static_local_function = true:suggestion
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
csharp_style_prefer_pattern_matching = true:silent
|
||||
csharp_style_prefer_not_pattern = true:suggestion
|
||||
csharp_style_prefer_extended_property_pattern = true:suggestion
|
||||
dotnet_diagnostic.CA1001.severity = warning
|
||||
dotnet_diagnostic.CA1805.severity = warning
|
||||
dotnet_diagnostic.CA1841.severity = warning
|
||||
dotnet_diagnostic.SYSLIB1006.severity = silent
|
||||
dotnet_diagnostic.SYSLIB1015.severity = silent
|
||||
|
||||
[*.{cs,vb}]
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
tab_width = 4
|
||||
indent_size = 4
|
||||
end_of_line = crlf
|
||||
dotnet_style_coalesce_expression = true:suggestion
|
||||
dotnet_style_null_propagation = true:suggestion
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
dotnet_style_prefer_auto_properties = true:silent
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
dotnet_style_explicit_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
||||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
||||
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||
dotnet_style_namespace_match_folder = true:suggestion
|
||||
dotnet_style_readonly_field = true:warning
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
|
||||
dotnet_style_predefined_type_for_member_access = true:silent
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false:silent
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = false:silent
|
||||
dotnet_code_quality_unused_parameters = all:warning
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
|
||||
dotnet_style_parentheses_in_other_operators = always_for_clarity:silent
|
||||
dotnet_style_qualification_for_field = false:silent
|
||||
dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
dotnet_diagnostic.CA1715.severity = warning
|
||||
dotnet_diagnostic.CA1716.severity = silent
|
||||
dotnet_diagnostic.CA5397.severity = warning
|
||||
|
||||
|
||||
file_header_template = (c) Copyright Ascensio System SIA 2010-2022\n\nThis program is a free software product.\nYou can redistribute it and/or modify it under the terms\nof the GNU Affero General Public License (AGPL) version 3 as published by the Free Software\nFoundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended\nto the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of\nany third-party rights.\n\nThis program is distributed WITHOUT ANY WARRANTY, without even the implied warranty\nof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see\nthe GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html\n\nYou can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.\n\nThe interactive user interfaces in modified source and object code versions of the Program must\ndisplay Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.\n\nPursuant to Section 7(b) of the License you must retain the original Product logo when\ndistributing the program. Pursuant to Section 7(e) we decline to grant you any rights under\ntrademark law for use of our trademarks.\n\nAll the Product's GUI elements, including illustrations and icon sets, as well as technical writing\ncontent are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0\nInternational. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
45
.github/workflows/4testing-multi-build.yml
vendored
45
.github/workflows/4testing-multi-build.yml
vendored
@ -1,45 +0,0 @@
|
||||
name: 4testing multiarch-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'hotfix/v**'
|
||||
- 'release/v**'
|
||||
- 'feature/v*-git-action'
|
||||
env:
|
||||
DOCKER_PATH: "/build/install/docker"
|
||||
REPO: "onlyoffice"
|
||||
DOCKER_IMAGE_PREFIX: "4testing-docspace"
|
||||
DOCKERFILE: "Dockerfile.app"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [linux/amd64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build 4testing
|
||||
run: |
|
||||
cd .${DOCKER_PATH}
|
||||
DOCKER_TAG=$(echo "${GITHUB_REF_NAME}" | sed '/^release\b\|^hotfix\b\|^feature\b/s/release.*\/\|hotfix.*\/\|feature.*\///; s/-git-action$//; s/^v//').${{github.run_number}}
|
||||
export DOCKER_TAG
|
||||
|
||||
docker buildx bake -f build.yml \
|
||||
--set *.args.GIT_BRANCH=$GITHUB_REF_NAME \
|
||||
--set *.platform=linux/amd64 \
|
||||
--push
|
||||
shell: bash
|
41
.github/workflows/build-ffvideo.yml
vendored
41
.github/workflows/build-ffvideo.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: ffvideo build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'hotfix/v**'
|
||||
- 'release/v**'
|
||||
paths:
|
||||
- 'build/install/docker/**.ffvideo'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [linux/amd64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./build/install/docker/Dockerfile.ffvideo
|
||||
push: true
|
||||
tags: onlyoffice/ffvideo:6.0
|
||||
|
137
.github/workflows/build-runtime-images.yml
vendored
137
.github/workflows/build-runtime-images.yml
vendored
@ -1,137 +0,0 @@
|
||||
name: build docker runtime images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'hotfix/v**'
|
||||
- 'release/v**'
|
||||
- 'feature/docker-dev'
|
||||
paths:
|
||||
- '/build/install/docker/Dockerfile.runtime'
|
||||
- '.github/workflows/build-runtime-images.yml'
|
||||
- 'config/*'
|
||||
- '/build/install/docker/config/nginx/**'
|
||||
env:
|
||||
REPOSITORY_NAME: "onlyoffice"
|
||||
TAG: "v1.0.0"
|
||||
DOTNET_RUNTIME_IMAGE: "4testing-docspace-dotnet-runtime"
|
||||
NODEJS_RUNTIME_IMAGE: "4testing-docspace-nodejs-runtime"
|
||||
PROXY_RUNTIME_IMAGE: "4testing-docspace-proxy-runtime"
|
||||
DOCKERFILE_BUILD: "build/install/docker/Dockerfile.runtime"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build ${{ env.REPOSITORY_NAME }}/${{ env.DOTNET_RUNTIME_IMAGE }}
|
||||
uses: docker/build-push-action@v4
|
||||
id: build-dotnetrun
|
||||
with:
|
||||
context: .
|
||||
file: ${{ env.DOCKERFILE_BUILD }}
|
||||
platforms: ${{ matrix.platform}}
|
||||
target: dotnetrun
|
||||
outputs: type=image,name=${{ env.REPOSITORY_NAME }}/${{ env.DOTNET_RUNTIME_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
-
|
||||
name: Build ${{ env.REPOSITORY_NAME }}/${{ env.NODEJS_RUNTIME_IMAGE }}
|
||||
uses: docker/build-push-action@v4
|
||||
id: build-noderun
|
||||
with:
|
||||
context: .
|
||||
file: ${{ env.DOCKERFILE_BUILD }}
|
||||
platforms: ${{ matrix.platform}}
|
||||
target: noderun
|
||||
outputs: type=image,name=${{ env.REPOSITORY_NAME }}/${{ env.NODEJS_RUNTIME_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
-
|
||||
name: Build ${{ env.REPOSITORY_NAME }}/${{ env.PROXY_RUNTIME_IMAGE }}
|
||||
uses: docker/build-push-action@v4
|
||||
id: build-proxy
|
||||
with:
|
||||
context: .
|
||||
file: ${{ env.DOCKERFILE_BUILD }}
|
||||
platforms: ${{ matrix.platform}}
|
||||
target: proxy
|
||||
outputs: type=image,name=${{ env.REPOSITORY_NAME }}/${{ env.PROXY_RUNTIME_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
-
|
||||
name: Export digest
|
||||
run: |
|
||||
mkdir -p /tmp/digests/${{ env.DOTNET_RUNTIME_IMAGE }}
|
||||
digest="${{ steps.build-dotnetrun.outputs.digest }}"
|
||||
touch "/tmp/digests/${{ env.DOTNET_RUNTIME_IMAGE }}/${digest#sha256:}"
|
||||
|
||||
mkdir -p /tmp/digests/${{ env.NODEJS_RUNTIME_IMAGE }}
|
||||
digest="${{ steps.build-noderun.outputs.digest }}"
|
||||
touch "/tmp/digests/${{ env.NODEJS_RUNTIME_IMAGE }}/${digest#sha256:}"
|
||||
|
||||
mkdir -p /tmp/digests/${{ env.PROXY_RUNTIME_IMAGE }}
|
||||
digest="${{ steps.build-proxy.outputs.digest }}"
|
||||
touch "/tmp/digests/${{ env.PROXY_RUNTIME_IMAGE }}/${digest#sha256:}"
|
||||
-
|
||||
name: Upload digest
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
steps:
|
||||
-
|
||||
name: Download digests
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: digests
|
||||
path: /tmp/digests
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Create ${{ env.DOTNET_RUNTIME_IMAGE }} list and push
|
||||
working-directory: /tmp/digests/${{ env.DOTNET_RUNTIME_IMAGE }}
|
||||
run: |
|
||||
docker buildx imagetools create -t ${{ env.REPOSITORY_NAME }}/${{ env.DOTNET_RUNTIME_IMAGE }}:${{ env.TAG }} \
|
||||
$(printf '${{ env.REPOSITORY_NAME }}/${{ env.DOTNET_RUNTIME_IMAGE }}@sha256:%s ' *)
|
||||
-
|
||||
name: Create ${{ env.NODEJS_RUNTIME_IMAGE }} list and push
|
||||
working-directory: /tmp/digests/${{ env.NODEJS_RUNTIME_IMAGE }}
|
||||
run: |
|
||||
docker buildx imagetools create -t ${{ env.REPOSITORY_NAME }}/${{ env.NODEJS_RUNTIME_IMAGE }}:${{ env.TAG }} \
|
||||
$(printf '${{ env.REPOSITORY_NAME }}/${{ env.NODEJS_RUNTIME_IMAGE }}@sha256:%s ' *)
|
||||
-
|
||||
name: Create ${{ env.PROXY_RUNTIME_IMAGE }} list and push
|
||||
working-directory: /tmp/digests/${{ env.PROXY_RUNTIME_IMAGE }}
|
||||
run: |
|
||||
docker buildx imagetools create -t ${{ env.REPOSITORY_NAME }}/${{ env.PROXY_RUNTIME_IMAGE }}:${{ env.TAG }} \
|
||||
$(printf '${{ env.REPOSITORY_NAME }}/${{ env.PROXY_RUNTIME_IMAGE }}@sha256:%s ' *)
|
195
.github/workflows/build_packages.yml
vendored
195
.github/workflows/build_packages.yml
vendored
@ -1,195 +0,0 @@
|
||||
name: Build packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/*
|
||||
- develop
|
||||
- hotfix/*
|
||||
paths:
|
||||
- build/install/deb**
|
||||
- build/install/rpm**
|
||||
- build/install/common**
|
||||
workflow_dispatch:
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
BRANCH_NAME: $(echo ${GITHUB_REF#refs/heads/})
|
||||
PRODUCT_LOW: $(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' )
|
||||
PRODUCT: "${{ github.event.repository.name }}"
|
||||
BUILD_NUMBER: "${{ github.run_number }}"
|
||||
|
||||
|
||||
jobs:
|
||||
build_deb:
|
||||
name: DEB packages
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Free Disk Space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: true
|
||||
android: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: true
|
||||
|
||||
- name: Import GPG
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
id: gpg_step
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
|
||||
|
||||
- name: Get files from repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Prepare build
|
||||
id: get_vars
|
||||
run: |
|
||||
wget -O - https://dl.yarnpkg.com/debian/pubkey.gpg | \
|
||||
sudo gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/yarnkey.gpg --import
|
||||
sudo chmod 644 /usr/share/keyrings/yarnkey.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" | \
|
||||
sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
wget https://packages.microsoft.com/config/$(lsb_release -is | \
|
||||
tr [:upper:] [:lower:])/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | \
|
||||
sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
wget -O - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
|
||||
sudo gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/nodesource.gpg --import
|
||||
sudo chmod 644 /usr/share/keyrings/nodesource.gpg
|
||||
sudo apt-get -y update
|
||||
sudo apt install -y dotnet-sdk-7.0 yarn nodejs dh-make rename dpkg-sig lintian
|
||||
sudo npm install -g json
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
|
||||
echo "VERSION=$(echo "${{ github.ref }}" | grep -oP '\d+\.\d+\.\d+' || echo "1.1.0")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
cd build/install/deb/
|
||||
rename -f -v "s/product([^\/]*)$/${{ env.PRODUCT_LOW }}\$1/g" debian/* ../common/* ../common/logrotate/*
|
||||
find ../ -type f -exec sed -i "s/{{product}}/${{ env.PRODUCT_LOW }}/g" {} ';'
|
||||
sed -i "s/{{package_header_tag_version}}/${{ steps.get_vars.outputs.VERSION }}.$BUILD_NUMBER/g" \
|
||||
debian/changelog debian/control
|
||||
dpkg-buildpackage -uc -k${{ steps.gpg_step.outputs.fingerprint }}
|
||||
|
||||
- name: Upload to Nexus
|
||||
run: |
|
||||
for file in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/*.deb; do
|
||||
echo $file
|
||||
curl --verbose --user ${{ secrets.REPO_LOGIN }}:${{ secrets.REPO_PASS }} -H "Content-Type: multipart/form-data" \
|
||||
--data-binary "@$file" ${{ secrets.REPO_URL_4TESTING_DEB }}
|
||||
done
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
lintian --suppress-tags=mismatched-override --profile debian /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/*.deb \
|
||||
| tee -a file
|
||||
if grep -qE '^(W:|E:)' file; then echo \
|
||||
"::warning Noticedeb=lintian::$(cat file | awk '/^W:/ { ws += 1 } /^E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')"; fi
|
||||
|
||||
build_rpm:
|
||||
name: RPM packages
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Free Disk Space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: true
|
||||
android: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
docker-images: true
|
||||
swap-storage: true
|
||||
|
||||
- name: Import GPG
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
|
||||
|
||||
- name: Get files from repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Prepare build
|
||||
id: get_vars
|
||||
run: |
|
||||
wget -O - https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --no-default-keyring --keyring \
|
||||
gnupg-ring:/usr/share/keyrings/yarnkey.gpg --import
|
||||
sudo chmod 644 /usr/share/keyrings/yarnkey.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" | \
|
||||
sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
wget https://packages.microsoft.com/config/$(lsb_release -is | \
|
||||
tr [:upper:] [:lower:])/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | \
|
||||
sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
wget -O - https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \
|
||||
sudo gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/nodesource.gpg --import
|
||||
sudo chmod 644 /usr/share/keyrings/nodesource.gpg
|
||||
sudo apt-get -y update
|
||||
sudo apt install -y dotnet-sdk-7.0 yarn nodejs dh-make rename python3-pip python3-rpm
|
||||
sudo npm install -g json
|
||||
sudo pip install rpmlint
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
|
||||
echo "VERSION=$(echo "${ GITHUB_REF##*/ }" | grep -oP '\d+\.\d+\.\d+' || echo "1.1.0")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd build/install/rpm/SPECS
|
||||
mv ./SOURCES/product.rpmlintrc ./SOURCES/${{ env.PRODUCT_LOW }}.rpmlintrc
|
||||
wget https://github.com/ONLYOFFICE/${{ env.PRODUCT }}/archive/${{ env.BRANCH_NAME }}.tar.gz \
|
||||
-O ./SOURCES/${{ env.PRODUCT }}-$(echo ${{ env.BRANCH_NAME }} | tr '/' '-').tar.gz
|
||||
wget https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz \
|
||||
-O ./SOURCES/document-templates-main-community-server.tar.gz
|
||||
wget https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz \
|
||||
-O ./SOURCES/dictionaries-master.tar.gz
|
||||
sed -i -e '/BuildRequires/d' product.spec
|
||||
rpmbuild -D "packager Ascensio System SIA <support@onlyoffice.com>" -D "GIT_BRANCH $(echo ${{ env.BRANCH_NAME }} \
|
||||
| tr '/' '-')" -D "_topdir $(pwd)" -D "version ${{ steps.get_vars.outputs.VERSION }}" \
|
||||
-D "release ${{ env.BUILD_NUMBER }}" -ba product.spec
|
||||
|
||||
- name: Sign
|
||||
run: |
|
||||
cat << EOF >> $HOME/.rpmmacros
|
||||
%_signature gpg
|
||||
%_gpg_name ${{ secrets.GPG_KEY_NAME }}
|
||||
%_gpg_path $HOME/.gnupg
|
||||
%__gpg /usr/bin/gpg
|
||||
EOF
|
||||
gpg --export --armor --output onlyoffice-gpgkey.pub
|
||||
rpm --import onlyoffice-gpgkey.pub
|
||||
rpm --addsign /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm
|
||||
|
||||
- name: Upload
|
||||
run: |
|
||||
for file in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm; do
|
||||
curl --verbose --user ${{ secrets.REPO_LOGIN }}:${{ secrets.REPO_PASS }} \
|
||||
--upload-file "$file" ${{ secrets.REPO_URL_4TESTING_RPM }}
|
||||
done
|
||||
|
||||
- name: Rpmlint
|
||||
run: |
|
||||
for package in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm
|
||||
do rpmlint --ignore-unused-rpmlintrc --rpmlintrc \
|
||||
/home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/SOURCES/${{ env.PRODUCT_LOW }}.rpmlintrc $package \
|
||||
| tee -a file2
|
||||
done
|
||||
if grep -qE '^(W:|E:)' file2; then echo \
|
||||
"::warning NoticeRpm=rpmLint::$(cat file2 | awk '/W:/ { ws += 1 } /E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" ; fi
|
63
.github/workflows/oci-release.yml
vendored
63
.github/workflows/oci-release.yml
vendored
@ -1,63 +0,0 @@
|
||||
name: Upload OneСlickInstall scripts on S3
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'build/install/OneClickInstall/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SCRIPT_DIR: 'build/install/OneClickInstall'
|
||||
PRODUCT: $(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' )
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Scripts release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Creating an enterprise script
|
||||
run: |
|
||||
cp ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-install.sh ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-enterprise-install.sh
|
||||
sed -i 's/\(PARAMETERS -it\).*";/\1 ENTERPRISE";/' ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-enterprise-install.sh
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_OCI }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_OCI }}
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Upload scripts
|
||||
run: |
|
||||
cd ${{ env.SCRIPT_DIR }}
|
||||
aws s3 cp . ${{ secrets.AWS_BUCKET_URL_OCI }}/ \
|
||||
--recursive \
|
||||
--acl public-read \
|
||||
--content-type application/x-sh \
|
||||
--metadata-directive REPLACE \
|
||||
--exclude '*' \
|
||||
--include="${{ env.PRODUCT }}-install.sh" \
|
||||
--include="${{ env.PRODUCT }}-enterprise-install.sh" \
|
||||
--include="install-RedHat.sh" \
|
||||
--include="install-RedHat/*" \
|
||||
--include="install-Debian.sh" \
|
||||
--include="install-Debian/*" \
|
||||
--include="install.Docker"
|
||||
|
||||
- name: Invalidate AWS CloudFront cache
|
||||
run: |
|
||||
aws cloudfront create-invalidation \
|
||||
--distribution-id ${{ secrets.AWS_DISTRIBUTION_ID_OCI }} \
|
||||
--paths \
|
||||
"/${{ env.PRODUCT }}-install.sh" \
|
||||
"/${{ env.PRODUCT }}-enterprise-install.sh" \
|
||||
"/install-RedHat.sh" \
|
||||
"/install-RedHat/*" \
|
||||
"/install-Debian.sh" \
|
||||
"/install-Debian/*" \
|
||||
"/install-Docker.sh"
|
43
.github/workflows/storybook-publish.yml
vendored
43
.github/workflows/storybook-publish.yml
vendored
@ -1,43 +0,0 @@
|
||||
name: storybook build/publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'public/**'
|
||||
- 'packages/components/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [linux/amd64]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18.x'
|
||||
- run: yarn
|
||||
- run: yarn storybook-build
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Upload storybook files
|
||||
run: |
|
||||
aws s3 cp ./packages/components/storybook-static/ ${{ secrets.AWS_BUCKER_URL }}/ \
|
||||
--recursive
|
||||
|
||||
- name: Invalidate AWS CLOUDFRONT cache
|
||||
run: |
|
||||
aws cloudfront create-invalidation \
|
||||
-- --paths "/*" \
|
||||
--distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }}
|
58
.gitignore
vendored
58
.gitignore
vendored
@ -1,56 +1,2 @@
|
||||
**/obj/
|
||||
**/bin/
|
||||
*.suo
|
||||
*.user
|
||||
.vs/
|
||||
*-lock.json
|
||||
**/node_modules/
|
||||
**/storybook-static/
|
||||
**/dist
|
||||
/build/deploy
|
||||
*.log
|
||||
/products/ASC.People/Data/
|
||||
/Data
|
||||
Logs/
|
||||
**/.DS_Store
|
||||
.eslintcache
|
||||
build/deploy/
|
||||
/public/debuginfo.md
|
||||
TestsResults/
|
||||
/Data.Test
|
||||
/build/install/RadicalePlugins/app_auth_plugin/app_auth_plugin.egg-info/PKG-INFO
|
||||
/build/install/RadicalePlugins/app_auth_plugin/app_auth_plugin.egg-info/SOURCES.txt
|
||||
/build/install/RadicalePlugins/app_auth_plugin/app_auth_plugin.egg-info/dependency_links.txt
|
||||
/build/install/RadicalePlugins/app_auth_plugin/app_auth_plugin.egg-info/top_level.txt
|
||||
/build/install/RadicalePlugins/app_auth_plugin/build/lib/app_auth_plugin/__init__.py
|
||||
/build/install/RadicalePlugins/app_rights_plugin/app_rights_plugin.egg-info/PKG-INFO
|
||||
/build/install/RadicalePlugins/app_rights_plugin/app_rights_plugin.egg-info/SOURCES.txt
|
||||
/build/install/RadicalePlugins/app_rights_plugin/app_rights_plugin.egg-info/dependency_links.txt
|
||||
/build/install/RadicalePlugins/app_rights_plugin/app_rights_plugin.egg-info/top_level.txt
|
||||
/build/install/RadicalePlugins/app_rights_plugin/build/lib/app_rights_plugin/__init__.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/app_store_plugin.egg-info/PKG-INFO
|
||||
/build/install/RadicalePlugins/app_store_plugin/app_store_plugin.egg-info/SOURCES.txt
|
||||
/build/install/RadicalePlugins/app_store_plugin/app_store_plugin.egg-info/dependency_links.txt
|
||||
/build/install/RadicalePlugins/app_store_plugin/app_store_plugin.egg-info/top_level.txt
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/__init__.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/cache.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/delete.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/history.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/log.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/sync.py
|
||||
/build/install/RadicalePlugins/app_store_plugin/build/lib/app_store_plugin/upload.py
|
||||
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
|
||||
**/.yarn/cache
|
||||
**/.yarn/install-state.gz
|
||||
licenses.csv
|
||||
publish/
|
||||
|
||||
.idea
|
||||
.DS_Store
|
||||
/*.log
|
||||
|
7
.gitmodules
vendored
7
.gitmodules
vendored
@ -1,7 +0,0 @@
|
||||
[submodule "products/ASC.Files/Server/DocStore"]
|
||||
path = products/ASC.Files/Server/DocStore
|
||||
url = https://github.com/ONLYOFFICE/document-templates
|
||||
branch = main/community-server
|
||||
[submodule "common/Tests/Frontend.Translations.Tests/dictionaries"]
|
||||
path = common/Tests/Frontend.Translations.Tests/dictionaries
|
||||
url = https://github.com/ONLYOFFICE/dictionaries
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
.vscode/settings.json
vendored
23
.vscode/settings.json
vendored
@ -1,23 +0,0 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/packages": true,
|
||||
"**/.nuget": true,
|
||||
"**/common": true,
|
||||
"**/Data": true,
|
||||
"**/i18next": true,
|
||||
//"**/node_modules": true,
|
||||
"**/migrations": true,
|
||||
"**/products": true,
|
||||
"**/Logs": true,
|
||||
"**/thirdparty": true,
|
||||
"**/web": true,
|
||||
"**/*.sln": true,
|
||||
"**/*.slnf": true,
|
||||
"**/NuGet.Config": true,
|
||||
"**/.gitignore": true,
|
||||
"**/.gitmodules": true,
|
||||
"**/.editorconfig": true,
|
||||
"**/LICENSE": true,
|
||||
"**/build/install": true
|
||||
}
|
||||
}
|
63
.vscode/tasks.json
vendored
63
.vscode/tasks.json
vendored
@ -1,63 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"focus": true,
|
||||
"close": true
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Frontend | Start",
|
||||
"type": "shell",
|
||||
"command": "cd ${workspaceFolder} ; yarn start"
|
||||
},
|
||||
{
|
||||
"label": "Backend | Build",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/build/build.backend.docker.sh",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\build\\build.bat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Backend | Start",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/build/start/start.backend.docker.sh",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\build\\start\\start.bat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Backend | Restart",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/build/start/restart.backend.docker.sh",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\build\\start\\restart.bat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Backend | Stop",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/build/start/stop.backend.docker.sh",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\build\\start\\stop.bat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "start-param",
|
||||
"description": "Command",
|
||||
"default": "Start",
|
||||
"type": "pickString",
|
||||
"options": ["Start", "Restart", "Stop"]
|
||||
},
|
||||
{
|
||||
"id": "local-docker",
|
||||
"description": "Manipulation",
|
||||
"default": "Local",
|
||||
"type": "pickString",
|
||||
"options": ["Local", "Docker"]
|
||||
}
|
||||
]
|
||||
}
|
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
541
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
File diff suppressed because one or more lines are too long
46
.yarn/plugins/@yarnpkg/plugin-licenses-audit.cjs
vendored
46
.yarn/plugins/@yarnpkg/plugin-licenses-audit.cjs
vendored
File diff suppressed because one or more lines are too long
550
.yarn/plugins/@yarnpkg/plugin-version.cjs
vendored
550
.yarn/plugins/@yarnpkg/plugin-version.cjs
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
801
.yarn/releases/yarn-3.2.4.cjs
vendored
801
.yarn/releases/yarn-3.2.4.cjs
vendored
File diff suppressed because one or more lines are too long
13
.yarnrc.yml
13
.yarnrc.yml
@ -1,13 +0,0 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: "@yarnpkg/plugin-workspace-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-licenses-audit.cjs
|
||||
spec: "https://raw.githubusercontent.com/tophat/yarn-plugin-licenses/master/bundles/@yarnpkg/plugin-licenses-audit.js"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.4.cjs
|
@ -1,121 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32616.157
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{93D91A49-A397-40FC-90DE-85D8ED774803}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage", "common\ASC.Data.Storage\ASC.Data.Storage.csproj", "{582AF3E8-ACA4-49B8-809D-36A586C4307E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{03B5483D-2EEF-4A42-83E7-487592434D3B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.Extensions.Logger", "common\ASC.EventBus.Extensions.Logger\ASC.EventBus.Extensions.Logger.csproj", "{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{FD61091C-F0C1-47B3-B442-9B69CEA603DF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Creator", "common\Tools\ASC.Migration.Creator\ASC.Migration.Creator.csproj", "{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.Core", "common\Tools\ASC.Migrations.Core\ASC.Migrations.Core.csproj", "{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Runner", "common\Tools\ASC.Migration.Runner\ASC.Migration.Runner.csproj", "{249DC522-AC3B-475C-B77E-52CE0322E686}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ActiveDirectory", "common\ASC.ActiveDirectory\ASC.ActiveDirectory.csproj", "{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.PersonalToDocspace", "common\Tools\ASC.MigrationPersonalToDocspace\ASC.Migration.PersonalToDocspace.csproj", "{9493BF4B-46DF-4BE7-AC63-83992B205A00}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Common", "common\ASC.Common\ASC.Common.csproj", "{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql.SaaS", "migrations\mysql\SaaS\ASC.Migrations.MySql.SaaS.csproj", "{57A7DD9D-373D-4270-9FF0-986F62B594EF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql.Standalone", "migrations\mysql\Standalone\ASC.Migrations.MySql.Standalone.csproj", "{2608185A-415E-4D21-B5F8-A7F9C95DA918}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.PostgreSql.SaaS", "migrations\postgre\SaaS\ASC.Migrations.PostgreSql.SaaS.csproj", "{50A3CFE6-F7A3-49FB-B801-70E793BC8B5A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.PostgreSql.Standalone", "migrations\postgre\Standalone\ASC.Migrations.PostgreSql.Standalone.csproj", "{46AF60C1-EEA6-4C0F-8C02-1B74A8C9720F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{57A7DD9D-373D-4270-9FF0-986F62B594EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{57A7DD9D-373D-4270-9FF0-986F62B594EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{57A7DD9D-373D-4270-9FF0-986F62B594EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{57A7DD9D-373D-4270-9FF0-986F62B594EF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2608185A-415E-4D21-B5F8-A7F9C95DA918}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2608185A-415E-4D21-B5F8-A7F9C95DA918}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2608185A-415E-4D21-B5F8-A7F9C95DA918}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2608185A-415E-4D21-B5F8-A7F9C95DA918}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50A3CFE6-F7A3-49FB-B801-70E793BC8B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{50A3CFE6-F7A3-49FB-B801-70E793BC8B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{50A3CFE6-F7A3-49FB-B801-70E793BC8B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50A3CFE6-F7A3-49FB-B801-70E793BC8B5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{46AF60C1-EEA6-4C0F-8C02-1B74A8C9720F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{46AF60C1-EEA6-4C0F-8C02-1B74A8C9720F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{46AF60C1-EEA6-4C0F-8C02-1B74A8C9720F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{46AF60C1-EEA6-4C0F-8C02-1B74A8C9720F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {933E5EEB-E9B0-4389-B318-11E283E7FCF7}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
233
ASC.Tests.sln
233
ASC.Tests.sln
@ -1,233 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Tests", "products\ASC.Files\Tests\ASC.Files.Tests.csproj", "{EFB99A37-EF25-4A0F-8D7A-786402B1554C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Api.Core", "common\ASC.Api.Core\ASC.Api.Core.csproj", "{CAA6EED2-094A-42AE-81B6-3FDF142EC277}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Common", "common\ASC.Common\ASC.Common.csproj", "{19FFE246-4270-41A6-AA8D-FB961715FB21}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage", "common\ASC.Data.Storage\ASC.Data.Storage.csproj", "{D7F459CE-9EAF-423A-B3DC-EFD107007BCE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.FederatedLogin", "common\ASC.FederatedLogin\ASC.FederatedLogin.csproj", "{484E9663-B9B7-40CA-B600-D5FDCD7CB862}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.MessagingSystem", "common\ASC.MessagingSystem\ASC.MessagingSystem.csproj", "{AB0EFA45-1DAF-42F4-9EE1-4A8EC497DE35}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ElasticSearch", "common\services\ASC.ElasticSearch\ASC.ElasticSearch.csproj", "{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{C277388C-E19E-4A62-A895-8AAB322A4004}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files", "products\ASC.Files\Server\ASC.Files.csproj", "{77BA2F61-6155-4283-BB39-F8E42F46A0B0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.People", "products\ASC.People\Server\ASC.People.csproj", "{DB492BA0-B072-4056-8A3D-032CD108CD82}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Core", "web\ASC.Web.Core\ASC.Web.Core.csproj", "{9A703423-594E-4851-8A0D-FF582BAF9FC9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Reassigns", "common\ASC.Data.Reassigns\ASC.Data.Reassigns.csproj", "{8682FCD3-C5C5-4946-99FA-B900E9CB68C3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{5A0DF88C-45C8-4FE2-8144-88E8AC8B7C45}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.IPSecurity", "common\ASC.IPSecurity\ASC.IPSecurity.csproj", "{5E5496B5-5686-4415-B3E0-5F61FCD146A3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify.Textile", "common\ASC.Notify.Textile\ASC.Notify.Textile.csproj", "{5FE0EDA2-1FD7-4D43-885E-DBDD858DCC86}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Textile", "common\ASC.Textile\ASC.Textile.csproj", "{1A82BE07-0836-4620-A95D-C6D1E9327589}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.VoipService", "common\ASC.VoipService\ASC.VoipService.csproj", "{664031A4-1652-4B68-8168-FD18998700EE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Studio.Notify", "common\services\ASC.Studio.Notify\ASC.Studio.Notify.csproj", "{C024C35A-D0F0-42D6-86B2-64ABF7513C4A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify", "common\services\ASC.Notify\ASC.Notify.csproj", "{B30A0D35-7B32-4E13-9F37-B8BC59F839E5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed.Aggregator", "common\services\ASC.Feed.Aggregator\ASC.Feed.Aggregator.csproj", "{8ACDEBBD-12DD-43DC-86CF-D66E37528ACC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup", "common\services\ASC.Data.Backup\ASC.Data.Backup.csproj", "{630E2649-71B6-4C07-A2FC-C0BC05D77A78}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Api", "web\ASC.Web.Api\ASC.Web.Api.csproj", "{D7C5E8A0-0A5E-4BC4-9946-B43D6682D421}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Studio", "web\ASC.Web.Studio\ASC.Web.Studio.csproj", "{9BF17F6E-04A9-4597-9273-21AD09600329}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Common.Tests", "common\Tests\ASC.Common.Tests\ASC.Common.Tests.csproj", "{E6DEAA28-9A73-470A-8F17-3E72B1E8D208}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common.Tests", "common\Tests\ASC.Core.Common.Tests\ASC.Core.Common.Tests.csproj", "{EF613F37-CFA9-4631-AA6E-512262FABC8E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify.Textile.Tests", "common\Tests\ASC.Notify.Textile.Tests\ASC.Notify.Textile.Tests.csproj", "{8FAD3D1B-3ADC-470C-9933-CAE1B95A8599}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{A0475D4F-29B7-490C-85C2-8AFD60118B35}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Tests", "common\Tests\ASC.Webhooks.Tests\ASC.Webhooks.Tests.csproj", "{B48C0E24-EBEB-4AF9-891B-D28BB4A9461E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Service", "common\services\ASC.Webhooks.Service\ASC.Webhooks.Service.csproj", "{23310CB9-1A14-4ED5-BF81-8BD38277FEFE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Api.Tests", "common\Tests\ASC.Web.Api.Tests\ASC.Web.Api.Tests.csproj", "{14823E93-C749-4069-9E0A-95E63DE0B254}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{5E948877-52BD-42B9-95A9-0FF37931D0A5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Encryption", "common\ASC.Data.Encryption\ASC.Data.Encryption.csproj", "{9E572FE2-8C3C-46B2-A314-532F7198B3EB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.AuditTrail", "common\services\ASC.AuditTrail\ASC.AuditTrail.csproj", "{B53587B7-58F6-48A9-B122-69BEA3E2572A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE86ABA2-8B71-4E0D-A2A6-3921E0467F09}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql", "migrations\mysql\ASC.Migrations.MySql.csproj", "{E81DC433-3555-4151-BDBC-16368A0FE14E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EFB99A37-EF25-4A0F-8D7A-786402B1554C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFB99A37-EF25-4A0F-8D7A-786402B1554C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFB99A37-EF25-4A0F-8D7A-786402B1554C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFB99A37-EF25-4A0F-8D7A-786402B1554C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CAA6EED2-094A-42AE-81B6-3FDF142EC277}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CAA6EED2-094A-42AE-81B6-3FDF142EC277}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CAA6EED2-094A-42AE-81B6-3FDF142EC277}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CAA6EED2-094A-42AE-81B6-3FDF142EC277}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{19FFE246-4270-41A6-AA8D-FB961715FB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{19FFE246-4270-41A6-AA8D-FB961715FB21}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{19FFE246-4270-41A6-AA8D-FB961715FB21}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{19FFE246-4270-41A6-AA8D-FB961715FB21}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7F459CE-9EAF-423A-B3DC-EFD107007BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7F459CE-9EAF-423A-B3DC-EFD107007BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7F459CE-9EAF-423A-B3DC-EFD107007BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7F459CE-9EAF-423A-B3DC-EFD107007BCE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{484E9663-B9B7-40CA-B600-D5FDCD7CB862}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{484E9663-B9B7-40CA-B600-D5FDCD7CB862}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{484E9663-B9B7-40CA-B600-D5FDCD7CB862}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{484E9663-B9B7-40CA-B600-D5FDCD7CB862}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB0EFA45-1DAF-42F4-9EE1-4A8EC497DE35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB0EFA45-1DAF-42F4-9EE1-4A8EC497DE35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB0EFA45-1DAF-42F4-9EE1-4A8EC497DE35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AB0EFA45-1DAF-42F4-9EE1-4A8EC497DE35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C277388C-E19E-4A62-A895-8AAB322A4004}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C277388C-E19E-4A62-A895-8AAB322A4004}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C277388C-E19E-4A62-A895-8AAB322A4004}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C277388C-E19E-4A62-A895-8AAB322A4004}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB492BA0-B072-4056-8A3D-032CD108CD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DB492BA0-B072-4056-8A3D-032CD108CD82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB492BA0-B072-4056-8A3D-032CD108CD82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB492BA0-B072-4056-8A3D-032CD108CD82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9A703423-594E-4851-8A0D-FF582BAF9FC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9A703423-594E-4851-8A0D-FF582BAF9FC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9A703423-594E-4851-8A0D-FF582BAF9FC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9A703423-594E-4851-8A0D-FF582BAF9FC9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8682FCD3-C5C5-4946-99FA-B900E9CB68C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8682FCD3-C5C5-4946-99FA-B900E9CB68C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8682FCD3-C5C5-4946-99FA-B900E9CB68C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8682FCD3-C5C5-4946-99FA-B900E9CB68C3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5A0DF88C-45C8-4FE2-8144-88E8AC8B7C45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5A0DF88C-45C8-4FE2-8144-88E8AC8B7C45}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5A0DF88C-45C8-4FE2-8144-88E8AC8B7C45}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5A0DF88C-45C8-4FE2-8144-88E8AC8B7C45}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5E5496B5-5686-4415-B3E0-5F61FCD146A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5E5496B5-5686-4415-B3E0-5F61FCD146A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5E5496B5-5686-4415-B3E0-5F61FCD146A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5E5496B5-5686-4415-B3E0-5F61FCD146A3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5FE0EDA2-1FD7-4D43-885E-DBDD858DCC86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5FE0EDA2-1FD7-4D43-885E-DBDD858DCC86}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5FE0EDA2-1FD7-4D43-885E-DBDD858DCC86}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5FE0EDA2-1FD7-4D43-885E-DBDD858DCC86}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1A82BE07-0836-4620-A95D-C6D1E9327589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A82BE07-0836-4620-A95D-C6D1E9327589}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A82BE07-0836-4620-A95D-C6D1E9327589}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A82BE07-0836-4620-A95D-C6D1E9327589}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{664031A4-1652-4B68-8168-FD18998700EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{664031A4-1652-4B68-8168-FD18998700EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{664031A4-1652-4B68-8168-FD18998700EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{664031A4-1652-4B68-8168-FD18998700EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C024C35A-D0F0-42D6-86B2-64ABF7513C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C024C35A-D0F0-42D6-86B2-64ABF7513C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C024C35A-D0F0-42D6-86B2-64ABF7513C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C024C35A-D0F0-42D6-86B2-64ABF7513C4A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B30A0D35-7B32-4E13-9F37-B8BC59F839E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B30A0D35-7B32-4E13-9F37-B8BC59F839E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B30A0D35-7B32-4E13-9F37-B8BC59F839E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B30A0D35-7B32-4E13-9F37-B8BC59F839E5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8ACDEBBD-12DD-43DC-86CF-D66E37528ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8ACDEBBD-12DD-43DC-86CF-D66E37528ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8ACDEBBD-12DD-43DC-86CF-D66E37528ACC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8ACDEBBD-12DD-43DC-86CF-D66E37528ACC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{630E2649-71B6-4C07-A2FC-C0BC05D77A78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{630E2649-71B6-4C07-A2FC-C0BC05D77A78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{630E2649-71B6-4C07-A2FC-C0BC05D77A78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{630E2649-71B6-4C07-A2FC-C0BC05D77A78}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7C5E8A0-0A5E-4BC4-9946-B43D6682D421}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7C5E8A0-0A5E-4BC4-9946-B43D6682D421}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7C5E8A0-0A5E-4BC4-9946-B43D6682D421}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7C5E8A0-0A5E-4BC4-9946-B43D6682D421}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9BF17F6E-04A9-4597-9273-21AD09600329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9BF17F6E-04A9-4597-9273-21AD09600329}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9BF17F6E-04A9-4597-9273-21AD09600329}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9BF17F6E-04A9-4597-9273-21AD09600329}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E6DEAA28-9A73-470A-8F17-3E72B1E8D208}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E6DEAA28-9A73-470A-8F17-3E72B1E8D208}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E6DEAA28-9A73-470A-8F17-3E72B1E8D208}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E6DEAA28-9A73-470A-8F17-3E72B1E8D208}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EF613F37-CFA9-4631-AA6E-512262FABC8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EF613F37-CFA9-4631-AA6E-512262FABC8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EF613F37-CFA9-4631-AA6E-512262FABC8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EF613F37-CFA9-4631-AA6E-512262FABC8E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8FAD3D1B-3ADC-470C-9933-CAE1B95A8599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8FAD3D1B-3ADC-470C-9933-CAE1B95A8599}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8FAD3D1B-3ADC-470C-9933-CAE1B95A8599}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8FAD3D1B-3ADC-470C-9933-CAE1B95A8599}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A0475D4F-29B7-490C-85C2-8AFD60118B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A0475D4F-29B7-490C-85C2-8AFD60118B35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0475D4F-29B7-490C-85C2-8AFD60118B35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A0475D4F-29B7-490C-85C2-8AFD60118B35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B48C0E24-EBEB-4AF9-891B-D28BB4A9461E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B48C0E24-EBEB-4AF9-891B-D28BB4A9461E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B48C0E24-EBEB-4AF9-891B-D28BB4A9461E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B48C0E24-EBEB-4AF9-891B-D28BB4A9461E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{23310CB9-1A14-4ED5-BF81-8BD38277FEFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{23310CB9-1A14-4ED5-BF81-8BD38277FEFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{23310CB9-1A14-4ED5-BF81-8BD38277FEFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{14823E93-C749-4069-9E0A-95E63DE0B254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{14823E93-C749-4069-9E0A-95E63DE0B254}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{14823E93-C749-4069-9E0A-95E63DE0B254}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{14823E93-C749-4069-9E0A-95E63DE0B254}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5E948877-52BD-42B9-95A9-0FF37931D0A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5E948877-52BD-42B9-95A9-0FF37931D0A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5E948877-52BD-42B9-95A9-0FF37931D0A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5E948877-52BD-42B9-95A9-0FF37931D0A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E572FE2-8C3C-46B2-A314-532F7198B3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E572FE2-8C3C-46B2-A314-532F7198B3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E572FE2-8C3C-46B2-A314-532F7198B3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E572FE2-8C3C-46B2-A314-532F7198B3EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {73201867-1BA9-4F5E-AA69-AFA74662FFFC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
267
ASC.Web.sln
267
ASC.Web.sln
@ -1,267 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Studio", "web\ASC.Web.Studio\ASC.Web.Studio.csproj", "{90183112-BCD6-4E16-9CA2-12231930DAB4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Api", "web\ASC.Web.Api\ASC.Web.Api.csproj", "{4AA9F8E3-2F48-44DA-B6C5-37ED7A4739C1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926} = {BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Common", "common\ASC.Common\ASC.Common.csproj", "{EB8F47B3-39DE-4B7D-8EC6-01726368B45D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.People", "products\ASC.People\Server\ASC.People.csproj", "{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Api.Core", "common\ASC.Api.Core\ASC.Api.Core.csproj", "{62C49C91-1A5A-4C0D-A3B3-A9AE8C9718CE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage", "common\ASC.Data.Storage\ASC.Data.Storage.csproj", "{3ABB21D3-D990-4005-9EEF-701A93948C27}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.FederatedLogin", "common\ASC.FederatedLogin\ASC.FederatedLogin.csproj", "{481B0D9C-B2F8-4DE9-8597-BA8D24585099}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Core", "web\ASC.Web.Core\ASC.Web.Core.csproj", "{02C40A64-FE22-41D0-9037-69F0D6F787A9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.MessagingSystem", "common\ASC.MessagingSystem\ASC.MessagingSystem.csproj", "{BD8A18A5-60C5-4411-9719-0AA11B4BE0E9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.IPSecurity", "common\ASC.IPSecurity\ASC.IPSecurity.csproj", "{2FF2177F-2D1A-4396-84EB-51F14FD99385}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{B0431EC9-21D8-4D96-B333-6DD430031C82}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Reassigns", "common\ASC.Data.Reassigns\ASC.Data.Reassigns.csproj", "{104D045A-F9CC-4DD7-B04D-8DA7543435DD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify", "common\services\ASC.Notify\ASC.Notify.csproj", "{8484A675-1C93-4D87-8FF2-7530A5711208}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Studio.Notify", "common\services\ASC.Studio.Notify\ASC.Studio.Notify.csproj", "{E3567AB9-0926-444D-A0D0-A369D5890EAA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Textile", "common\ASC.Textile\ASC.Textile.csproj", "{C8F410B4-B83B-47B9-9ECD-07590A8750A7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify.Textile", "common\ASC.Notify.Textile\ASC.Notify.Textile.csproj", "{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ElasticSearch", "common\services\ASC.ElasticSearch\ASC.ElasticSearch.csproj", "{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files", "products\ASC.Files\Server\ASC.Files.csproj", "{77BA2F61-6155-4283-BB39-F8E42F46A0B0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Service", "products\ASC.Files\Service\ASC.Files.Service.csproj", "{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed.Aggregator", "common\services\ASC.Feed.Aggregator\ASC.Feed.Aggregator.csproj", "{07CCC11F-76CB-448E-B15A-72E09FBB348B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{F0A39728-940D-4DBE-A37A-05D4EB57F342}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.TelegramService", "common\services\ASC.TelegramService\ASC.TelegramService.csproj", "{95CE7371-17B6-4EEE-8E38-2FDE6347E955}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.AuditTrail", "common\services\ASC.AuditTrail\ASC.AuditTrail.csproj", "{2C111161-B7C5-4869-9F52-EA725E64BA40}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0E35EB77-EC53-44C2-99EB-3D845C79675D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Encryption", "common\ASC.Data.Encryption\ASC.Data.Encryption.csproj", "{C4DF1A63-C9EB-4D8F-A4E5-4FD9249A5089}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.HealthChecks.UI", "web\ASC.Web.HealthChecks.UI\ASC.Web.HealthChecks.UI.csproj", "{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ClearEvents", "common\services\ASC.ClearEvents\ASC.ClearEvents.csproj", "{448221A8-EABA-4200-9192-E08BF241A487}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{F5D9DE01-06CD-4881-9F41-46882E9ED45C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup", "common\services\ASC.Data.Backup\ASC.Data.Backup.csproj", "{027EEE53-7491-48F4-B467-6404D68798A7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.BackgroundTasks", "common\services\ASC.Data.Backup.BackgroundTasks\ASC.Data.Backup.BackgroundTasks.csproj", "{C0C28A02-943C-4A38-B474-A2B49C6201ED}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus", "common\ASC.EventBus\ASC.EventBus.csproj", "{26540DA7-604B-474B-97BA-9CDC85A84B6D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.RabbitMQ", "common\ASC.EventBus.RabbitMQ\ASC.EventBus.RabbitMQ.csproj", "{3FACF656-6DED-407E-AC23-A7EF08D704E3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.Extensions.Logger", "common\ASC.EventBus.Extensions.Logger\ASC.EventBus.Extensions.Logger.csproj", "{ED8CEB38-7C95-43A8-B208-9C9828654AC1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration", "common\ASC.Migration\ASC.Migration.csproj", "{05B8FF27-446B-49BF-B508-4A4C096D2BB2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ActiveDirectory", "common\ASC.ActiveDirectory\ASC.ActiveDirectory.csproj", "{9F81862F-303D-467F-8DC9-044BE2CCF329}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.ActiveMQ", "common\ASC.EventBus.ActiveMQ\ASC.EventBus.ActiveMQ.csproj", "{86916EF2-4A1B-441C-B673-EB0F68EC9C3A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage.Encryption", "common\services\ASC.Data.Storage.Encryption\ASC.Data.Storage.Encryption.csproj", "{76BFD0A6-3F28-4BCE-983B-9FE3FBDD966D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ApiSystem", "common\services\ASC.ApiSystem\ASC.ApiSystem.csproj", "{EB0FC2DF-D8AC-460B-8FBE-307A7B163C6C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ApiCache", "common\services\ASC.ApiCache\ASC.ApiCache.csproj", "{AD4F5F31-625C-472D-BE2C-AD1FB693E065}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{90183112-BCD6-4E16-9CA2-12231930DAB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{90183112-BCD6-4E16-9CA2-12231930DAB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{90183112-BCD6-4E16-9CA2-12231930DAB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{90183112-BCD6-4E16-9CA2-12231930DAB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4AA9F8E3-2F48-44DA-B6C5-37ED7A4739C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4AA9F8E3-2F48-44DA-B6C5-37ED7A4739C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4AA9F8E3-2F48-44DA-B6C5-37ED7A4739C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4AA9F8E3-2F48-44DA-B6C5-37ED7A4739C1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB8F47B3-39DE-4B7D-8EC6-01726368B45D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB8F47B3-39DE-4B7D-8EC6-01726368B45D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB8F47B3-39DE-4B7D-8EC6-01726368B45D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB8F47B3-39DE-4B7D-8EC6-01726368B45D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BE4816E7-7CD2-4D9B-ABC6-D9E5C04E3926}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{62C49C91-1A5A-4C0D-A3B3-A9AE8C9718CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{62C49C91-1A5A-4C0D-A3B3-A9AE8C9718CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{62C49C91-1A5A-4C0D-A3B3-A9AE8C9718CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{62C49C91-1A5A-4C0D-A3B3-A9AE8C9718CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3ABB21D3-D990-4005-9EEF-701A93948C27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3ABB21D3-D990-4005-9EEF-701A93948C27}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3ABB21D3-D990-4005-9EEF-701A93948C27}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3ABB21D3-D990-4005-9EEF-701A93948C27}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{481B0D9C-B2F8-4DE9-8597-BA8D24585099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{481B0D9C-B2F8-4DE9-8597-BA8D24585099}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{481B0D9C-B2F8-4DE9-8597-BA8D24585099}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{481B0D9C-B2F8-4DE9-8597-BA8D24585099}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02C40A64-FE22-41D0-9037-69F0D6F787A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02C40A64-FE22-41D0-9037-69F0D6F787A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02C40A64-FE22-41D0-9037-69F0D6F787A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02C40A64-FE22-41D0-9037-69F0D6F787A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BD8A18A5-60C5-4411-9719-0AA11B4BE0E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BD8A18A5-60C5-4411-9719-0AA11B4BE0E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BD8A18A5-60C5-4411-9719-0AA11B4BE0E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BD8A18A5-60C5-4411-9719-0AA11B4BE0E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8484A675-1C93-4D87-8FF2-7530A5711208}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8484A675-1C93-4D87-8FF2-7530A5711208}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8484A675-1C93-4D87-8FF2-7530A5711208}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8484A675-1C93-4D87-8FF2-7530A5711208}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{77BA2F61-6155-4283-BB39-F8E42F46A0B0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{95CE7371-17B6-4EEE-8E38-2FDE6347E955}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{95CE7371-17B6-4EEE-8E38-2FDE6347E955}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{95CE7371-17B6-4EEE-8E38-2FDE6347E955}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{95CE7371-17B6-4EEE-8E38-2FDE6347E955}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2C111161-B7C5-4869-9F52-EA725E64BA40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2C111161-B7C5-4869-9F52-EA725E64BA40}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2C111161-B7C5-4869-9F52-EA725E64BA40}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2C111161-B7C5-4869-9F52-EA725E64BA40}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4DF1A63-C9EB-4D8F-A4E5-4FD9249A5089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C4DF1A63-C9EB-4D8F-A4E5-4FD9249A5089}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C4DF1A63-C9EB-4D8F-A4E5-4FD9249A5089}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C4DF1A63-C9EB-4D8F-A4E5-4FD9249A5089}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{448221A8-EABA-4200-9192-E08BF241A487}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{448221A8-EABA-4200-9192-E08BF241A487}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{448221A8-EABA-4200-9192-E08BF241A487}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{448221A8-EABA-4200-9192-E08BF241A487}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{027EEE53-7491-48F4-B467-6404D68798A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{027EEE53-7491-48F4-B467-6404D68798A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{027EEE53-7491-48F4-B467-6404D68798A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{027EEE53-7491-48F4-B467-6404D68798A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C0C28A02-943C-4A38-B474-A2B49C6201ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C0C28A02-943C-4A38-B474-A2B49C6201ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C0C28A02-943C-4A38-B474-A2B49C6201ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C0C28A02-943C-4A38-B474-A2B49C6201ED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{26540DA7-604B-474B-97BA-9CDC85A84B6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26540DA7-604B-474B-97BA-9CDC85A84B6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26540DA7-604B-474B-97BA-9CDC85A84B6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26540DA7-604B-474B-97BA-9CDC85A84B6D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3FACF656-6DED-407E-AC23-A7EF08D704E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3FACF656-6DED-407E-AC23-A7EF08D704E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3FACF656-6DED-407E-AC23-A7EF08D704E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3FACF656-6DED-407E-AC23-A7EF08D704E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ED8CEB38-7C95-43A8-B208-9C9828654AC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ED8CEB38-7C95-43A8-B208-9C9828654AC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ED8CEB38-7C95-43A8-B208-9C9828654AC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ED8CEB38-7C95-43A8-B208-9C9828654AC1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05B8FF27-446B-49BF-B508-4A4C096D2BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05B8FF27-446B-49BF-B508-4A4C096D2BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05B8FF27-446B-49BF-B508-4A4C096D2BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05B8FF27-446B-49BF-B508-4A4C096D2BB2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9F81862F-303D-467F-8DC9-044BE2CCF329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9F81862F-303D-467F-8DC9-044BE2CCF329}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F81862F-303D-467F-8DC9-044BE2CCF329}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F81862F-303D-467F-8DC9-044BE2CCF329}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{86916EF2-4A1B-441C-B673-EB0F68EC9C3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{86916EF2-4A1B-441C-B673-EB0F68EC9C3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{86916EF2-4A1B-441C-B673-EB0F68EC9C3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{86916EF2-4A1B-441C-B673-EB0F68EC9C3A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{76BFD0A6-3F28-4BCE-983B-9FE3FBDD966D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{76BFD0A6-3F28-4BCE-983B-9FE3FBDD966D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{76BFD0A6-3F28-4BCE-983B-9FE3FBDD966D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76BFD0A6-3F28-4BCE-983B-9FE3FBDD966D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EB0FC2DF-D8AC-460B-8FBE-307A7B163C6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EB0FC2DF-D8AC-460B-8FBE-307A7B163C6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB0FC2DF-D8AC-460B-8FBE-307A7B163C6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB0FC2DF-D8AC-460B-8FBE-307A7B163C6C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AD4F5F31-625C-472D-BE2C-AD1FB693E065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AD4F5F31-625C-472D-BE2C-AD1FB693E065}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AD4F5F31-625C-472D-BE2C-AD1FB693E065}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AD4F5F31-625C-472D-BE2C-AD1FB693E065}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {62783077-E041-40BA-A406-E7EF12CAFF2D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
44
ASC.Web.slnf
44
ASC.Web.slnf
@ -1,44 +0,0 @@
|
||||
{
|
||||
"solution": {
|
||||
"path": "ASC.Web.sln",
|
||||
"projects": [
|
||||
"common\\ASC.ActiveDirectory\\ASC.ActiveDirectory.csproj",
|
||||
"common\\ASC.Api.Core\\ASC.Api.Core.csproj",
|
||||
"common\\ASC.Common\\ASC.Common.csproj",
|
||||
"common\\ASC.Core.Common\\ASC.Core.Common.csproj",
|
||||
"common\\ASC.Data.Backup.Core\\ASC.Data.Backup.Core.csproj",
|
||||
"common\\ASC.Data.Encryption\\ASC.Data.Encryption.csproj",
|
||||
"common\\ASC.Data.Reassigns\\ASC.Data.Reassigns.csproj",
|
||||
"common\\ASC.Data.Storage\\ASC.Data.Storage.csproj",
|
||||
"common\\ASC.EventBus.ActiveMQ\\ASC.EventBus.ActiveMQ.csproj",
|
||||
"common\\ASC.EventBus.Extensions.Logger\\ASC.EventBus.Extensions.Logger.csproj",
|
||||
"common\\ASC.EventBus.RabbitMQ\\ASC.EventBus.RabbitMQ.csproj",
|
||||
"common\\ASC.EventBus\\ASC.EventBus.csproj",
|
||||
"common\\ASC.FederatedLogin\\ASC.FederatedLogin.csproj",
|
||||
"common\\ASC.Feed\\ASC.Feed.csproj",
|
||||
"common\\ASC.IPSecurity\\ASC.IPSecurity.csproj",
|
||||
"common\\ASC.MessagingSystem\\ASC.MessagingSystem.csproj",
|
||||
"common\\ASC.Notify.Textile\\ASC.Notify.Textile.csproj",
|
||||
"common\\ASC.Textile\\ASC.Textile.csproj",
|
||||
"common\\ASC.Webhooks.Core\\ASC.Webhooks.Core.csproj",
|
||||
"common\\services\\ASC.ApiCache\\ASC.ApiCache.csproj",
|
||||
"common\\services\\ASC.ApiSystem\\ASC.ApiSystem.csproj",
|
||||
"common\\services\\ASC.AuditTrail\\ASC.AuditTrail.csproj",
|
||||
"common\\services\\ASC.ClearEvents\\ASC.ClearEvents.csproj",
|
||||
"common\\services\\ASC.Data.Backup.BackgroundTasks\\ASC.Data.Backup.BackgroundTasks.csproj",
|
||||
"common\\services\\ASC.Data.Backup\\ASC.Data.Backup.csproj",
|
||||
"common\\services\\ASC.ElasticSearch\\ASC.ElasticSearch.csproj",
|
||||
"common\\services\\ASC.Feed.Aggregator\\ASC.Feed.Aggregator.csproj",
|
||||
"common\\services\\ASC.Notify\\ASC.Notify.csproj",
|
||||
"common\\services\\ASC.Studio.Notify\\ASC.Studio.Notify.csproj",
|
||||
"products\\ASC.Files\\Core\\ASC.Files.Core.csproj",
|
||||
"products\\ASC.Files\\Server\\ASC.Files.csproj",
|
||||
"products\\ASC.Files\\Service\\ASC.Files.Service.csproj",
|
||||
"products\\ASC.People\\Server\\ASC.People.csproj",
|
||||
"web\\ASC.Web.Api\\ASC.Web.Api.csproj",
|
||||
"web\\ASC.Web.Core\\ASC.Web.Core.csproj",
|
||||
"web\\ASC.Web.HealthChecks.UI\\ASC.Web.HealthChecks.UI.csproj",
|
||||
"web\\ASC.Web.Studio\\ASC.Web.Studio.csproj"
|
||||
]
|
||||
}
|
||||
}
|
224
build/Jenkinsfile → Jenkinsfile
vendored
224
build/Jenkinsfile → Jenkinsfile
vendored
@ -1,113 +1,113 @@
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
stage('Build') {
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
agent { label 'net-core' }
|
||||
stages {
|
||||
stage('Frontend') {
|
||||
steps {
|
||||
sh 'yarn install --frozen-lockfile && yarn build'
|
||||
}
|
||||
}
|
||||
stage('Backend') {
|
||||
steps {
|
||||
sh 'dotnet build -c Release ASC.Web.slnf'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'win-core' }
|
||||
stages {
|
||||
stage('Frontend') {
|
||||
steps {
|
||||
bat "yarn install --frozen-lockfile && yarn build"
|
||||
}
|
||||
}
|
||||
stage('Backend') {
|
||||
steps {
|
||||
bat 'dotnet build -c Release ASC.Web.slnf'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
when { expression { return env.CHANGE_ID != null } }
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
agent { label 'net-core' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
sh "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}/packages/components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
junit 'packages/components/junit.xml'
|
||||
publishHTML target: [
|
||||
allowMissing : false,
|
||||
alwaysLinkToLastBuild: false,
|
||||
keepAll : true,
|
||||
reportDir : 'packages/components/coverage/lcov-report',
|
||||
reportFiles : 'index.html',
|
||||
reportName : 'Unix Test Report'
|
||||
]
|
||||
publishCoverage adapters: [coberturaAdapter('packages/components/coverage/cobertura-coverage.xml')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Files') {
|
||||
steps {
|
||||
sh "git submodule update --progress --init -- products/ASC.Files/Server/DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}/products/ASC.Files/Tests/ && dotnet test ASC.Files.Tests.csproj -r linux-x64 -l \"console;verbosity=detailed\""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'win-core' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
bat "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}\\packages\\components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
junit 'packages\\components\\junit.xml'
|
||||
publishHTML target: [
|
||||
allowMissing : false,
|
||||
alwaysLinkToLastBuild: false,
|
||||
keepAll : true,
|
||||
reportDir : 'packages\\components\\coverage\\lcov-report',
|
||||
reportFiles : 'index.html',
|
||||
reportName : 'Windows Test Report'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Files') {
|
||||
steps {
|
||||
bat "git submodule update --progress --init -- products\\ASC.Files\\Server\\DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}\\products\\ASC.Files\\Tests\\ && dotnet test ASC.Files.Tests.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Notify') {
|
||||
when { expression { return env.CHANGE_ID != null && env.BUILD_NUMBER == '1' } }
|
||||
agent { label 'net-core' }
|
||||
options { skipDefaultCheckout() }
|
||||
environment {
|
||||
Telegram_Token = credentials('telegram_token')
|
||||
Chat_Id = credentials('telegram_chat')
|
||||
}
|
||||
steps {
|
||||
sh 'curl -s -X GET -G "https://api.telegram.org/bot$Telegram_Token/sendMessage" --data-urlencode "chat_id=$Chat_Id" --data "text=CHANGE URL:$CHANGE_URL %0A Build Url: $BUILD_URL %0A Branch Name:$CHANGE_TITLE"'
|
||||
}
|
||||
}
|
||||
}
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
stage('Build') {
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
agent { label 'net-core' }
|
||||
stages {
|
||||
stage('Frontend') {
|
||||
steps {
|
||||
sh 'yarn install --frozen-lockfile && yarn build'
|
||||
}
|
||||
}
|
||||
stage('Backend') {
|
||||
steps {
|
||||
sh 'dotnet build -c Release ASC.Web.slnf'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'win-core' }
|
||||
stages {
|
||||
stage('Frontend') {
|
||||
steps {
|
||||
bat "yarn install --frozen-lockfile && yarn build"
|
||||
}
|
||||
}
|
||||
stage('Backend') {
|
||||
steps {
|
||||
bat 'dotnet build -c Release ASC.Web.slnf'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
when { expression { return env.CHANGE_ID != null } }
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
agent { label 'net-core' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
sh "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}/packages/components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
junit 'packages/components/junit.xml'
|
||||
publishHTML target: [
|
||||
allowMissing : false,
|
||||
alwaysLinkToLastBuild: false,
|
||||
keepAll : true,
|
||||
reportDir : 'packages/components/coverage/lcov-report',
|
||||
reportFiles : 'index.html',
|
||||
reportName : 'Unix Test Report'
|
||||
]
|
||||
publishCoverage adapters: [coberturaAdapter('packages/components/coverage/cobertura-coverage.xml')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Files') {
|
||||
steps {
|
||||
sh "git submodule update --progress --init -- products/ASC.Files/Server/DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}/products/ASC.Files/Tests/ && dotnet test ASC.Files.Tests.csproj -r linux-x64 -l \"console;verbosity=detailed\""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'win-core' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
bat "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}\\packages\\components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
junit 'packages\\components\\junit.xml'
|
||||
publishHTML target: [
|
||||
allowMissing : false,
|
||||
alwaysLinkToLastBuild: false,
|
||||
keepAll : true,
|
||||
reportDir : 'packages\\components\\coverage\\lcov-report',
|
||||
reportFiles : 'index.html',
|
||||
reportName : 'Windows Test Report'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Files') {
|
||||
steps {
|
||||
bat "git submodule update --progress --init -- products\\ASC.Files\\Server\\DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}\\products\\ASC.Files\\Tests\\ && dotnet test ASC.Files.Tests.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Notify') {
|
||||
when { expression { return env.CHANGE_ID != null && env.BUILD_NUMBER == '1' } }
|
||||
agent { label 'net-core' }
|
||||
options { skipDefaultCheckout() }
|
||||
environment {
|
||||
Telegram_Token = credentials('telegram_token')
|
||||
Chat_Id = credentials('telegram_chat')
|
||||
}
|
||||
steps {
|
||||
sh 'curl -s -X GET -G "https://api.telegram.org/bot$Telegram_Token/sendMessage" --data-urlencode "chat_id=$Chat_Id" --data "text=CHANGE URL:$CHANGE_URL %0A Build Url: $BUILD_URL %0A Branch Name:$CHANGE_TITLE"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
661
LICENSE
661
LICENSE
@ -1,661 +0,0 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
14
NuGet.Config
14
NuGet.Config
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<solution>
|
||||
<add key="disableSourceControlIntegration" value="true" />
|
||||
</solution>
|
||||
<packageSources>
|
||||
<add key="Custom NuGet Server" value=".nuget\packages" />
|
||||
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
</configuration>
|
32
README.md
32
README.md
@ -1,32 +0,0 @@
|
||||
# ONLYOFFICE DocSpace
|
||||
|
||||
## Overview
|
||||
|
||||
ONLYOFFICE DocSpace is a document hub where you can connect users and documents in one place to boost collaboration.
|
||||
|
||||
## Functionality
|
||||
|
||||
* Various room types with different access levels: view-only, review, collaboration, filling forms, custom rooms.
|
||||
* Ability to work with multiple file formats: text documents, spreadsheets, presentations, digital forms, PDFs, e-books.
|
||||
* Document collaboration: two co-editing modes, Track Changes, comments, built-in chat, plugins for making audio and video calls.
|
||||
* Connecting 3rd party clouds and storages.
|
||||
|
||||
## Technology stack
|
||||
|
||||
Backend: С# 11.0, .NET 7.0/.NET Core/ASP.NET Core/MySQL 8.0/Kafka/ElasticSearch
|
||||
|
||||
Frontend: ES6, TypeScript, React, Mobx, Styled-Components, CSS/SAAS, i18next, Webpack 5
|
||||
|
||||
## Licensing
|
||||
|
||||
ONLYOFFICE DocSpace is released under AGPLv3 license. See the LICENSE file for more information.
|
||||
|
||||
## Project info
|
||||
|
||||
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=DocSpace "https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=DocSpace")
|
||||
|
||||
Code repository: [https://github.com/ONLYOFFICE/DocSpace](https://github.com/ONLYOFFICE/DocSpace)
|
||||
|
||||
## User feedback and support
|
||||
|
||||
If you face any issues or have questions about ONLYOFFICE DocSpace, use the Issues section in this repository or visit our [official forum](https://forum.onlyoffice.com/).
|
@ -8,7 +8,7 @@ call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
call start\stop.bat nopause
|
||||
dotnet build ..\asc.web.slnf /fl1 /flp1:logfile=asc.web.log;verbosity=normal
|
||||
dotnet build ..\server\asc.web.slnf /fl1 /flp1:logfile=asc.web.log;verbosity=normal
|
||||
echo.
|
||||
)
|
||||
|
@ -7,7 +7,7 @@ if ($PSversionMajor -lt 7 -or $PSversionMinor -lt 2) {
|
||||
}
|
||||
|
||||
$RootDir = Split-Path -Parent $PSScriptRoot
|
||||
$DockerDir = "$RootDir\build\install\docker"
|
||||
$DockerDir = "$RootDir\buildtools\install\docker"
|
||||
$LocalIp = (Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where-Object { $_.DHCPEnabled -ne $null -and $_.DefaultIPGateway -ne $null }).IPAddress | Select-Object -First 1
|
||||
|
||||
$Doceditor = ($LocalIp + ":5013")
|
||||
@ -39,9 +39,11 @@ if (-not $ExistsNetwork) {
|
||||
Write-Host "Run MySQL" -ForegroundColor Green
|
||||
docker compose -f "$DockerDir\db.yml" up -d
|
||||
|
||||
Write-Host "Run local dns server" -ForegroundColor Green
|
||||
$Env:ROOT_DIR=$RootDir
|
||||
docker compose -f "$DockerDir\dnsmasq.yml" up -d
|
||||
if ($args[0] -eq "--dns" ) {
|
||||
Write-Host "Run local dns server" -ForegroundColor Green
|
||||
$Env:ROOT_DIR=$RootDir
|
||||
docker compose -f "$DockerDir\dnsmasq.yml" up -d
|
||||
}
|
||||
|
||||
Write-Host "Build backend services (to `publish/` folder)" -ForegroundColor Green
|
||||
& "$PSScriptRoot\install\common\build-services.ps1"
|
||||
@ -97,7 +99,7 @@ $Env:SERVICE_MANAGEMENT=$Management
|
||||
$Env:ROOT_DIR=$RootDir
|
||||
$Env:BUILD_PATH="/var/www"
|
||||
$Env:SRC_PATH="$RootDir\publish\services"
|
||||
$Env:DATA_DIR="$RootDir\Data"
|
||||
$Env:DATA_DIR="$RootDir\data"
|
||||
$Env:APP_URL_PORTAL=$PortalUrl
|
||||
docker compose -f "$DockerDir\docspace.profiles.yml" -f "$DockerDir\docspace.overcome.yml" --profile migration-runner --profile backend-local up -d
|
||||
|
@ -4,7 +4,7 @@ rd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
echo "Run script directory:" $dir
|
||||
|
||||
dir=$(builtin cd $rd/../; pwd)
|
||||
dockerDir="$dir/build/install/docker"
|
||||
dockerDir="$dir/buildtools/install/docker"
|
||||
|
||||
echo "Root directory:" $dir
|
||||
echo "Docker files root directory:" $dockerDir
|
||||
@ -34,7 +34,7 @@ fi
|
||||
echo "FORCE BUILD BASE IMAGES: $force"
|
||||
|
||||
# Stop all backend services"
|
||||
$dir/build/start/stop.backend.docker.sh
|
||||
$dir/buildtools/start/stop.backend.docker.sh
|
||||
|
||||
echo "Run MySQL"
|
||||
|
||||
@ -58,15 +58,17 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Run local dns server"
|
||||
ROOT_DIR=$dir \
|
||||
docker compose -f $dockerDir/dnsmasq.yml up -d
|
||||
if [ "$1" = "--dns" ]; then
|
||||
echo "Run local dns server"
|
||||
ROOT_DIR=$dir \
|
||||
docker compose -f $dockerDir/dnsmasq.yml up -d
|
||||
fi
|
||||
|
||||
echo "Clear publish folder"
|
||||
rm -rf $dir/publish
|
||||
rm -rf $dir/publish/services
|
||||
|
||||
echo "Build backend services (to "publish/" folder)"
|
||||
bash $dir/build/install/common/build-services.sh -pb backend-publish -pc Debug -de "$dockerDir/docker-entrypoint.py"
|
||||
bash $dir/buildtools/install/common/build-services.sh -pb backend-publish -pc Debug -de "$dockerDir/docker-entrypoint.py"
|
||||
|
||||
DOCUMENT_SERVER_IMAGE_NAME=onlyoffice/documentserver-de:latest
|
||||
INSTALLATION_TYPE=ENTERPRISE
|
||||
@ -83,7 +85,7 @@ exists=$(docker images | egrep "onlyoffice/4testing-docspace-dotnet-runtime" | e
|
||||
|
||||
if [ "${exists}" = "" ] || [ "$force" = true ]; then
|
||||
echo "Build dotnet base image from source (apply new dotnet config)"
|
||||
docker build -t onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version -f ./build/install/docker/Dockerfile.runtime --target dotnetrun .
|
||||
docker build -t onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version -f $dockerDir/Dockerfile.runtime --target dotnetrun .
|
||||
else
|
||||
echo "SKIP build dotnet base image (already exists)"
|
||||
fi
|
||||
@ -94,7 +96,7 @@ exists=$(docker images | egrep "onlyoffice/4testing-docspace-nodejs-runtime" | e
|
||||
|
||||
if [ "${exists}" = "" ] || [ "$force" = true ]; then
|
||||
echo "Build nodejs base image from source"
|
||||
docker build -t onlyoffice/4testing-docspace-nodejs-runtime:$node_version -f ./build/install/docker/Dockerfile.runtime --target noderun .
|
||||
docker build -t onlyoffice/4testing-docspace-nodejs-runtime:$node_version -f $dockerDir/Dockerfile.runtime --target noderun .
|
||||
else
|
||||
echo "SKIP build nodejs base image (already exists)"
|
||||
fi
|
||||
@ -105,7 +107,7 @@ exists=$(docker images | egrep "onlyoffice/4testing-docspace-proxy-runtime" | eg
|
||||
|
||||
if [ "${exists}" = "" ] || [ "$force" = true ]; then
|
||||
echo "Build proxy base image from source (apply new nginx config)"
|
||||
docker build -t onlyoffice/4testing-docspace-proxy-runtime:$proxy_version -f ./build/install/docker/Dockerfile.runtime --target router .
|
||||
docker build -t onlyoffice/4testing-docspace-proxy-runtime:$proxy_version -f $dockerDir/Dockerfile.runtime --target router .
|
||||
else
|
||||
echo "SKIP build proxy base image (already exists)"
|
||||
fi
|
||||
@ -124,7 +126,7 @@ SERVICE_MANAGEMENT=$management \
|
||||
ROOT_DIR=$dir \
|
||||
BUILD_PATH="/var/www" \
|
||||
SRC_PATH="$dir/publish/services" \
|
||||
DATA_DIR="$dir/Data" \
|
||||
DATA_DIR="$dir/data" \
|
||||
APP_URL_PORTAL=$portal_url \
|
||||
docker-compose -f $dockerDir/docspace.profiles.yml -f $dockerDir/docspace.overcome.yml --profile migration-runner --profile backend-local up -d
|
||||
|
@ -1,27 +1,27 @@
|
||||
@echo off
|
||||
|
||||
echo "##########################################################"
|
||||
echo "######### Start build and deploy #######################"
|
||||
echo "##########################################################"
|
||||
|
||||
echo.
|
||||
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
|
||||
call start\stop.bat nopause
|
||||
|
||||
echo "FRONT-END (for start run command 'yarn start' inside the root folder)"
|
||||
call build.frontend.bat nopause
|
||||
|
||||
echo "BACK-END"
|
||||
call build.backend.bat nopause
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo.
|
||||
|
||||
pause
|
||||
@echo off
|
||||
|
||||
echo "##########################################################"
|
||||
echo "######### Start build and deploy #######################"
|
||||
echo "##########################################################"
|
||||
|
||||
echo.
|
||||
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
|
||||
call start\stop.bat nopause
|
||||
|
||||
echo "FRONT-END (for start run command 'yarn start' inside the root folder)"
|
||||
call build.frontend.bat nopause
|
||||
|
||||
echo "BACK-END"
|
||||
call build.backend.bat nopause
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo.
|
||||
|
||||
pause
|
||||
)
|
@ -12,4 +12,4 @@ Write-Host "Run Document server" -ForegroundColor Green
|
||||
$DOCUMENT_SERVER_IMAGE_NAME = "onlyoffice/documentserver-de:latest"
|
||||
|
||||
|
||||
docker run -i -t -d -p 8085:80 -e JWT_ENABLED=true -e JWT_SECRET=secret -e JWT_HEADER=AuthorizationJwt --restart=always -v $RootDir/Data:/var/www/onlyoffice/Data $DOCUMENT_SERVER_IMAGE_NAME
|
||||
docker run -i -t -d -p 8085:80 -e JWT_ENABLED=true -e JWT_SECRET=secret -e JWT_HEADER=AuthorizationJwt --restart=always -v $RootDir/data:/var/www/onlyoffice/Data $DOCUMENT_SERVER_IMAGE_NAME
|
@ -1,6 +1,11 @@
|
||||
PUSHD %~dp0..
|
||||
|
||||
cd client
|
||||
|
||||
REM call yarn wipe
|
||||
|
||||
call yarn install
|
||||
|
||||
cd ..
|
||||
|
||||
POPD
|
70
build.static.bat
Normal file
70
build.static.bat
Normal file
@ -0,0 +1,70 @@
|
||||
@echo off
|
||||
|
||||
for %%i in ("%~dp0..") do set "parentFolder=%%~fi"
|
||||
|
||||
cd /D "%~dp0"
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
IF "%2"=="personal" (
|
||||
echo "mode=%2"
|
||||
) ELSE (
|
||||
echo "mode="
|
||||
)
|
||||
|
||||
cd client
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn install
|
||||
|
||||
REM call yarn build
|
||||
IF "%2"=="personal" (
|
||||
call yarn build:personal
|
||||
) ELSE (
|
||||
call yarn build
|
||||
)
|
||||
|
||||
REM call yarn wipe
|
||||
IF "%2"=="personal" (
|
||||
call yarn deploy:personal
|
||||
) ELSE (
|
||||
call yarn deploy
|
||||
)
|
||||
|
||||
cd ..
|
||||
|
||||
REM copy nginx configurations to deploy folder
|
||||
xcopy buildtools\config\nginx\onlyoffice.conf publish\nginx\ /E /R /Y
|
||||
powershell -Command "(gc publish\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII publish\nginx\onlyoffice.conf"
|
||||
|
||||
xcopy buildtools\config\nginx\sites-enabled\* publish\nginx\sites-enabled\ /E /R /Y
|
||||
|
||||
REM fix paths
|
||||
powershell -Command "(gc publish\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%parentFolder%\publish\web\client' -replace '\\', '/' | Out-File -encoding ASCII publish\nginx\sites-enabled\onlyoffice-client.conf"
|
||||
powershell -Command "(gc publish\nginx\sites-enabled\onlyoffice-management.conf) -replace 'ROOTPATH', '%parentFolder%\publish\web\management' -replace '\\', '/' | Out-File -encoding ASCII publish\nginx\sites-enabled\onlyoffice-management.conf"
|
||||
|
||||
REM restart nginx
|
||||
echo service nginx stop
|
||||
call sc stop nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
echo service nginx start
|
||||
call sc start nginx > nul
|
||||
|
||||
if NOT %errorlevel% == 0 (
|
||||
echo Couldn't restart Onlyoffice%%~nf service
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
pause
|
||||
:start
|
@ -1,64 +0,0 @@
|
||||
@echo off
|
||||
|
||||
cd /D "%~dp0"
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
IF "%2"=="personal" (
|
||||
echo "mode=%2"
|
||||
) ELSE (
|
||||
echo "mode="
|
||||
)
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn install
|
||||
|
||||
REM call yarn build
|
||||
IF "%2"=="personal" (
|
||||
call yarn build:personal
|
||||
) ELSE (
|
||||
call yarn build
|
||||
)
|
||||
|
||||
REM call yarn wipe
|
||||
IF "%2"=="personal" (
|
||||
call yarn deploy:personal
|
||||
) ELSE (
|
||||
call yarn deploy
|
||||
)
|
||||
|
||||
REM copy nginx configurations to deploy folder
|
||||
xcopy config\nginx\onlyoffice.conf build\deploy\nginx\ /E /R /Y
|
||||
powershell -Command "(gc build\deploy\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII build\deploy\nginx\onlyoffice.conf"
|
||||
|
||||
xcopy config\nginx\sites-enabled\* build\deploy\nginx\sites-enabled\ /E /R /Y
|
||||
|
||||
REM fix paths
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%~dp0deploy\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-client.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-management.conf) -replace 'ROOTPATH', '%~dp0deploy\management' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-management.conf"
|
||||
|
||||
REM restart nginx
|
||||
echo service nginx stop
|
||||
call sc stop nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
echo service nginx start
|
||||
call sc start nginx > nul
|
||||
|
||||
if NOT %errorlevel% == 0 (
|
||||
echo Couldn't restart Onlyoffice%%~nf service
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
pause
|
||||
:start
|
@ -1,29 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_input low {{product}}/environment || true
|
||||
db_input low {{product}}/host || true
|
||||
db_input low {{product}}/port || true
|
||||
|
||||
db_input medium {{product}}/elasticsearch-sheme || true
|
||||
db_input medium {{product}}/elasticsearch-host || true
|
||||
db_input medium {{product}}/elasticsearch-port || true
|
||||
|
||||
db_input medium {{product}}/redis-host || true
|
||||
db_input medium {{product}}/redis-port || true
|
||||
|
||||
db_input medium {{product}}/rabbitmq-host || true
|
||||
db_input medium {{product}}/rabbitmq-user || true
|
||||
db_input medium {{product}}/rabbitmq-port || true
|
||||
db_input medium {{product}}/rabbitmq-password || true
|
||||
|
||||
db_input medium {{product}}/db-host || true
|
||||
db_input high {{product}}/db-name || true
|
||||
db_input high {{product}}/db-user || true
|
||||
db_go
|
||||
|
||||
db_input critical {{product}}/db-pwd || true
|
||||
db_go
|
@ -1 +0,0 @@
|
||||
../../../build/deploy/editor var/www/{{product}}/products/ASC.Files
|
@ -1 +0,0 @@
|
||||
../../../build/deploy/login/* var/www/{{product}}/products/ASC.Login/login
|
@ -1,8 +0,0 @@
|
||||
## COPY PUBLIC ##
|
||||
../../../build/install/common/{{product}}-ssl-setup usr/bin
|
||||
../../../build/install/docker/config/nginx/templates/*.template etc/onlyoffice/{{product}}/nginx
|
||||
../../../build/install/docker/config/nginx/onlyoffice* etc/nginx/conf.d
|
||||
../../../config/nginx/onlyoffice*.conf etc/nginx/conf.d
|
||||
../../../config/nginx/includes/onlyoffice*.conf etc/nginx/includes
|
||||
../../../build/deploy/public/* var/www/{{product}}/public
|
||||
../../../build/deploy/client/* var/www/{{product}}/client
|
@ -1 +0,0 @@
|
||||
../../../build/install/RadicalePlugins/* var/www/{{product}}/Tools/radicale/plugins
|
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
PUSHD %~dp0..
|
||||
set dir=%~dp0..
|
||||
echo %dir%
|
||||
dotnet test common\Tests\Backend.Translations.Tests\Backend.Translations.Tests.csproj -l:html --environment "BASE_DIR=%dir%" --results-directory "%dir%/TestsResults"
|
@ -1,65 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
|
||||
echo "mode="
|
||||
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn install
|
||||
|
||||
REM call yarn build
|
||||
call yarn build:test
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn deploy
|
||||
|
||||
|
||||
REM copy nginx configurations to deploy folder
|
||||
xcopy config\nginx\onlyoffice.conf build\deploy\nginx\ /E /R /Y
|
||||
powershell -Command "(gc build\deploy\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII build\deploy\nginx\onlyoffice.conf"
|
||||
|
||||
xcopy config\nginx\sites-enabled\* build\deploy\nginx\sites-enabled\ /E /R /Y
|
||||
|
||||
REM fix paths
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-editor.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\editor' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-editor.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%~dp0deploy\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-client.conf"
|
||||
|
||||
REM restart nginx
|
||||
echo service nginx stop
|
||||
call sc stop nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
echo service nginx start
|
||||
call sc start nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
|
||||
choice /t 10 /d Y /m "Do you want to start tests in sequential mode?"
|
||||
if errorlevel 2 call yarn e2e.test
|
||||
if errorlevel 1 call yarn e2e.test:sequential
|
||||
|
||||
|
||||
if NOT %errorlevel% == 0 (
|
||||
echo Couldn't restarte Onlyoffice%%~nf service
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
pause
|
||||
:start
|
@ -1,65 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
|
||||
echo "mode="
|
||||
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn install
|
||||
|
||||
REM call yarn build
|
||||
call yarn build:test.translation
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn deploy
|
||||
|
||||
|
||||
REM copy nginx configurations to deploy folder
|
||||
xcopy config\nginx\onlyoffice.conf build\deploy\nginx\ /E /R /Y
|
||||
powershell -Command "(gc build\deploy\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII build\deploy\nginx\onlyoffice.conf"
|
||||
|
||||
xcopy config\nginx\sites-enabled\* build\deploy\nginx\sites-enabled\ /E /R /Y
|
||||
|
||||
REM fix paths
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-editor.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\editor' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-editor.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%~dp0deploy\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-client.conf"
|
||||
|
||||
REM restart nginx
|
||||
echo service nginx stop
|
||||
call sc stop nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
echo service nginx start
|
||||
call sc start nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
call yarn e2e.test:translation
|
||||
|
||||
exit
|
||||
|
||||
|
||||
|
||||
if NOT %errorlevel% == 0 (
|
||||
echo Couldn't restarte Onlyoffice%%~nf service
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
pause
|
||||
:start
|
@ -1,65 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
PUSHD %~dp0..
|
||||
|
||||
|
||||
echo "mode="
|
||||
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn install
|
||||
|
||||
call yarn build:test.translation:personal
|
||||
|
||||
REM call yarn wipe
|
||||
call yarn deploy:personal
|
||||
|
||||
|
||||
|
||||
REM copy nginx configurations to deploy folder
|
||||
xcopy config\nginx\onlyoffice.conf build\deploy\nginx\ /E /R /Y
|
||||
powershell -Command "(gc build\deploy\nginx\onlyoffice.conf) -replace '#', '' | Out-File -encoding ASCII build\deploy\nginx\onlyoffice.conf"
|
||||
|
||||
xcopy config\nginx\sites-enabled\* build\deploy\nginx\sites-enabled\ /E /R /Y
|
||||
|
||||
REM fix paths
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-editor.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\editor' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-editor.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-client.conf) -replace 'ROOTPATH', '%~dp0deploy\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-client.conf"
|
||||
|
||||
REM restart nginx
|
||||
echo service nginx stop
|
||||
call sc stop nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
echo service nginx start
|
||||
call sc start nginx > nul
|
||||
|
||||
REM sleep 5 seconds
|
||||
call ping 127.0.0.1 -n 6 > nul
|
||||
|
||||
call yarn e2e.test:translation:personal
|
||||
|
||||
exit
|
||||
|
||||
|
||||
|
||||
if NOT %errorlevel% == 0 (
|
||||
echo Couldn't restarte Onlyoffice%%~nf service
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
pause
|
||||
:start
|
@ -1,10 +0,0 @@
|
||||
PUSHD %~dp0..
|
||||
set dir=%~dp0..
|
||||
echo %dir%
|
||||
|
||||
set save=false
|
||||
|
||||
if /I "%1" == "-s" set save=%2 & shift
|
||||
shift
|
||||
|
||||
dotnet test common\Tests\Frontend.Translations.Tests\Frontend.Translations.Tests.csproj --filter Name~SpellCheckTest -l:html --environment "BASE_DIR=%dir%" --environment "SAVE=%save%" --results-directory "%dir%/TestsResults"
|
@ -1,4 +0,0 @@
|
||||
PUSHD %~dp0\..
|
||||
set dir="%cd%"
|
||||
echo %dir%
|
||||
dotnet test %dir%\common\Tests\Frontend.Translations.Tests\Frontend.Translations.Tests.csproj --filter "TestCategory=Locales" -l:html --environment "BASE_DIR=%dir%" --results-directory "%dir%\TestsResults"
|
@ -1,8 +0,0 @@
|
||||
rd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
echo "Run script directory:" $dir
|
||||
|
||||
dir=$(builtin cd $rd/../; pwd)
|
||||
|
||||
echo "Root directory:" $dir
|
||||
|
||||
dotnet test $dir/common/Tests/Frontend.Translations.Tests/Frontend.Translations.Tests.csproj --filter "TestCategory=Locales" -l:html --results-directory "$dir/TestsResults" --environment "BASE_DIR=$dir"
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.ApiSystem\bin\Debug\ASC.ApiSystem.exe urls=http://0.0.0.0:5010 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=apisystem pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.Data.Backup.BackgroundTasks\bin\Debug\ASC.Data.Backup.BackgroundTasks.exe urls=http://0.0.0.0:5032 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=backup.backgroundtasks pathToConf=%cd%\config core:products:folder=%cd%\products core:eventBus:subscriptionClientName=asc_event_bus_backup_queue
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.Data.Backup\bin\Debug\ASC.Data.Backup.exe urls=http://0.0.0.0:5012 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=backup pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.ClearEvents\bin\Debug\ASC.ClearEvents.exe urls=http://0.0.0.0:5027 $STORAGE_ROOT=%cd%\Data pathToConf=%cd%\config log:dir=%cd%\Logs log:name=clearEvents core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\products\ASC.Files\Server\bin\Debug\ASC.Files.exe urls=http://0.0.0.0:5007 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=files pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\products\ASC.Files\Service\bin\Debug\ASC.Files.Service.exe urls=http://0.0.0.0:5009 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=files.service pathToConf=%cd%\config core:products:folder=%cd%\products core:eventBus:subscriptionClientName=asc_event_bus_files_service_queue
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.Notify\bin\Debug\ASC.Notify.exe urls=http://0.0.0.0:5005 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=notify pathToConf=%cd%\config core:products:folder=%cd%\products core:eventBus:subscriptionClientName=asc_event_bus_notify_queue
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\products\ASC.People\Server\bin\Debug\ASC.People.exe urls=http://0.0.0.0:5004 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=people pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\common\services\ASC.Studio.Notify\bin\Debug\ASC.Studio.Notify.exe urls=http://0.0.0.0:5006 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=studio.notify pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\web\ASC.Web.Api\bin\Debug\ASC.Web.Api.exe urls=http://0.0.0.0:5000 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.api pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\web\ASC.Web.HealthChecks.UI\bin\Debug\ASC.Web.HealthChecks.UI.exe urls=http://0.0.0.0:5033
|
@ -1,10 +0,0 @@
|
||||
<service>
|
||||
<id>OnlyofficeWebPlugins</id>
|
||||
<name>ONLYOFFICE WebPlugins Server</name>
|
||||
<startmode>manual</startmode>
|
||||
<executable>node</executable>
|
||||
<arguments>../../common/ASC.WebPlugins/dist/src/main.js</arguments>
|
||||
<log mode="none"/>
|
||||
<delayedAutoStart>true</delayedAutoStart>
|
||||
<onfailure action="restart" delay="5 sec" />
|
||||
</service>
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..\..
|
||||
set servicepath=%cd%\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.studio pathToConf=%cd%\config core:products:folder=%cd%\products
|
@ -1,10 +0,0 @@
|
||||
@echo "MIGRATIONS"
|
||||
@echo off
|
||||
|
||||
cd /D "%~dp0"
|
||||
call start\stop.bat nopause
|
||||
dotnet build ..\asc.web.slnf
|
||||
dotnet build ..\ASC.Migrations.sln
|
||||
PUSHD %~dp0..\common\Tools\ASC.Migration.Runner\bin\Debug\net7.0
|
||||
dotnet ASC.Migration.Runner.dll
|
||||
pause
|
@ -1,10 +0,0 @@
|
||||
@echo "MIGRATIONS"
|
||||
@echo off
|
||||
|
||||
cd /D "%~dp0"
|
||||
call start\stop.bat nopause
|
||||
dotnet build ..\asc.web.slnf
|
||||
dotnet build ..\ASC.Migrations.sln
|
||||
PUSHD %~dp0..\common\Tools\ASC.Migration.Runner\bin\Debug\net7.0
|
||||
dotnet ASC.Migration.Runner.dll standalone=true
|
||||
pause
|
@ -1,43 +0,0 @@
|
||||
const { join } = require("path");
|
||||
const { readdirSync, readFileSync, writeFileSync } = require("fs");
|
||||
const minifyJson = require("../../packages/common/utils/minifyJson.js");
|
||||
|
||||
const localesDir = join(
|
||||
__dirname,
|
||||
"../../build",
|
||||
"deploy",
|
||||
"public",
|
||||
"locales"
|
||||
);
|
||||
|
||||
//console.log("localesDir", localesDir);
|
||||
|
||||
const getFileList = (dirName) => {
|
||||
let files = [];
|
||||
|
||||
const items = readdirSync(dirName, { withFileTypes: true });
|
||||
|
||||
for (const item of items) {
|
||||
if (item.isDirectory()) {
|
||||
files = [...files, ...getFileList(`${dirName}/${item.name}`)];
|
||||
} else {
|
||||
files.push(`${dirName}/${item.name}`);
|
||||
}
|
||||
}
|
||||
|
||||
return files;
|
||||
};
|
||||
|
||||
const files = getFileList(localesDir);
|
||||
|
||||
files.forEach((filePath) => {
|
||||
try {
|
||||
if (filePath.endsWith(".DS_Store")) return;
|
||||
|
||||
let content = readFileSync(filePath);
|
||||
writeFileSync(filePath, minifyJson(content, filePath));
|
||||
//console.log(`File '${filePath}' minified`);
|
||||
} catch (e) {
|
||||
console.error("Unable to minify file ", filePath, e);
|
||||
}
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
PUSHD %~dp0..
|
||||
|
||||
cd %~dp0../../common/ASC.WebPlugins/
|
||||
|
||||
call yarn install --immutable
|
||||
|
||||
call yarn build
|
||||
|
||||
POPD
|
@ -1,7 +1,7 @@
|
||||
$Containers = docker ps -aqf "name=^onlyoffice"
|
||||
$Images = docker images onlyoffice/4testing-docspace* -q
|
||||
$RootDir = Split-Path -Parent $PSScriptRoot
|
||||
$DockerDir = ($RootDir + "\build\install\docker")
|
||||
$DockerDir = ($RootDir + "\buildtools\install\docker")
|
||||
|
||||
Write-Host "Clean up containers, volumes or networks" -ForegroundColor Green
|
||||
|
||||
@ -17,7 +17,7 @@ if ($Containers -or $Images) {
|
||||
$Env:BUILD_PATH="/var/www"
|
||||
$Env:SRC_PATH="$RootDir\publish\services"
|
||||
$Env:ROOT_DIR=$RootDir
|
||||
$Env:DATA_DIR="$RootDir\Data"
|
||||
$Env:DATA_DIR="$RootDir\data"
|
||||
|
||||
docker compose -f "$DockerDir\docspace.profiles.yml" -f "$DockerDir\docspace.overcome.yml" --profile "migration-runner" --profile "backend-local" down --volumes
|
||||
|
@ -3,7 +3,7 @@
|
||||
Containers=$(docker ps -a | egrep "onlyoffice" | awk 'NR>0 {print $1}')
|
||||
RunDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
RootDir=$(builtin cd $RunDir/../; pwd)
|
||||
DockerDir="${RootDir}/build/install/docker"
|
||||
DockerDir="${RootDir}/buildtools/install/docker"
|
||||
|
||||
echo "Clean up containers, volumes or networks"
|
||||
|
||||
@ -20,7 +20,7 @@ then
|
||||
BUILD_PATH="/var/www" \
|
||||
SRC_PATH="${RootDir}/publish/services" \
|
||||
ROOT_DIR=$RootDir \
|
||||
DATA_DIR="${RootDir}/Data" \
|
||||
DATA_DIR="${RootDir}/data" \
|
||||
docker-compose -f "${DockerDir}/docspace.profiles.yml" -f "${DockerDir}/docspace.overcome.yml" --profile migration-runner --profile backend-local down --volumes
|
||||
|
||||
echo "Remove docker contatiners 'mysql'"
|
||||
@ -36,4 +36,4 @@ then
|
||||
docker network prune -f
|
||||
else
|
||||
echo "No containers, images, volumes or networks to clean up"
|
||||
fi
|
||||
fi
|
@ -1,18 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ASC.Common\ASC.Common.csproj" />
|
||||
<ProjectReference Include="..\ASC.Core.Common\ASC.Core.Common.csproj" />
|
||||
<ProjectReference Include="..\..\web\ASC.Web.Core\ASC.Web.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,173 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Data;
|
||||
[Serializable]
|
||||
public class LdapCertificateConfirmRequest
|
||||
{
|
||||
private volatile bool _approved;
|
||||
private volatile bool _requested;
|
||||
private volatile string _serialNumber;
|
||||
private volatile string _issuerName;
|
||||
private volatile string _subjectName;
|
||||
private volatile string _hash;
|
||||
private volatile int[] _certificateErrors;
|
||||
|
||||
public bool Approved { get { return _approved; } set { _approved = value; } }
|
||||
|
||||
public bool Requested { get { return _requested; } set { _requested = value; } }
|
||||
|
||||
public string SerialNumber { get { return _serialNumber; } set { _serialNumber = value; } }
|
||||
|
||||
public string IssuerName { get { return _issuerName; } set { _issuerName = value; } }
|
||||
|
||||
public string SubjectName { get { return _subjectName; } set { _subjectName = value; } }
|
||||
|
||||
public DateTime ValidFrom { get; set; }
|
||||
|
||||
public DateTime ValidUntil { get; set; }
|
||||
|
||||
public string Hash { get { return _hash; } set { _hash = value; } }
|
||||
|
||||
public int[] CertificateErrors { get { return _certificateErrors; } set { _certificateErrors = value; } }
|
||||
|
||||
private enum LdapCertificateProblem
|
||||
{
|
||||
CertExpired = -2146762495,
|
||||
CertCnNoMatch = -2146762481,
|
||||
// ReSharper disable once UnusedMember.Local
|
||||
CertIssuerChaining = -2146762489,
|
||||
CertUntrustedCa = -2146762478,
|
||||
// ReSharper disable once UnusedMember.Local
|
||||
CertUntrustedRoot = -2146762487,
|
||||
CertMalformed = -2146762488,
|
||||
CertUnrecognizedError = -2146762477
|
||||
}
|
||||
|
||||
public static int[] GetLdapCertProblems(X509Certificate certificate, X509Chain chain,
|
||||
SslPolicyErrors sslPolicyErrors, ILogger log = null)
|
||||
{
|
||||
var certificateErrors = new List<int>();
|
||||
try
|
||||
{
|
||||
if (sslPolicyErrors == SslPolicyErrors.None)
|
||||
{
|
||||
return certificateErrors.ToArray();
|
||||
}
|
||||
|
||||
var expDate = DateTime.Parse(certificate.GetExpirationDateString()).ToUniversalTime();
|
||||
var utcNow = DateTime.UtcNow;
|
||||
if (expDate < utcNow && expDate.AddDays(1) >= utcNow)
|
||||
{
|
||||
certificateErrors.Add((int)LdapCertificateProblem.CertExpired);
|
||||
}
|
||||
|
||||
if (sslPolicyErrors.HasFlag(SslPolicyErrors.RemoteCertificateChainErrors))
|
||||
{
|
||||
certificateErrors.Add((int)LdapCertificateProblem.CertMalformed);
|
||||
}
|
||||
|
||||
if (sslPolicyErrors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch))
|
||||
{
|
||||
if (log != null)
|
||||
{
|
||||
log.WarnGetLdapCertProblems(Enum.GetName(typeof(SslPolicyErrors), LdapCertificateProblem.CertCnNoMatch));
|
||||
}
|
||||
|
||||
certificateErrors.Add((int)LdapCertificateProblem.CertCnNoMatch);
|
||||
}
|
||||
|
||||
if (sslPolicyErrors.HasFlag(SslPolicyErrors.RemoteCertificateNotAvailable))
|
||||
{
|
||||
if (log != null)
|
||||
{
|
||||
log.WarnGetLdapCertProblems(Enum.GetName(typeof(SslPolicyErrors), LdapCertificateProblem.CertCnNoMatch));
|
||||
}
|
||||
|
||||
certificateErrors.Add((int)LdapCertificateProblem.CertUntrustedCa);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (log != null)
|
||||
{
|
||||
log.ErrorGetLdapCertProblems(ex);
|
||||
}
|
||||
|
||||
certificateErrors.Add((int)LdapCertificateProblem.CertUnrecognizedError);
|
||||
}
|
||||
|
||||
return certificateErrors.ToArray();
|
||||
}
|
||||
|
||||
public static LdapCertificateConfirmRequest FromCert(X509Certificate certificate, X509Chain chain,
|
||||
SslPolicyErrors sslPolicyErrors, bool approved = false, bool requested = false, ILogger log = null)
|
||||
{
|
||||
var certificateErrors = GetLdapCertProblems(certificate, chain, sslPolicyErrors, log);
|
||||
|
||||
try
|
||||
{
|
||||
string serialNumber = "", issuerName = "", subjectName = "", hash = "";
|
||||
DateTime validFrom = DateTime.UtcNow, validUntil = DateTime.UtcNow;
|
||||
|
||||
LdapUtils.SkipErrors(() => serialNumber = certificate.GetSerialNumberString(), log);
|
||||
LdapUtils.SkipErrors(() => issuerName = certificate.Issuer, log);
|
||||
LdapUtils.SkipErrors(() => subjectName = certificate.Subject, log);
|
||||
LdapUtils.SkipErrors(() => validFrom = DateTime.Parse(certificate.GetEffectiveDateString()), log);
|
||||
LdapUtils.SkipErrors(() => validUntil = DateTime.Parse(certificate.GetExpirationDateString()), log);
|
||||
LdapUtils.SkipErrors(() => hash = certificate.GetCertHashString(), log);
|
||||
|
||||
var certificateConfirmRequest = new LdapCertificateConfirmRequest
|
||||
{
|
||||
SerialNumber = serialNumber,
|
||||
IssuerName = issuerName,
|
||||
SubjectName = subjectName,
|
||||
ValidFrom = validFrom,
|
||||
ValidUntil = validUntil,
|
||||
Hash = hash,
|
||||
CertificateErrors = certificateErrors,
|
||||
Approved = approved,
|
||||
Requested = requested
|
||||
};
|
||||
|
||||
return certificateConfirmRequest;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (log != null)
|
||||
{
|
||||
log.ErrorLdapCertificateConfirmRequest(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Data;
|
||||
public class LdapLogin
|
||||
{
|
||||
public string Username { get; private set; }
|
||||
public string Domain { get; private set; }
|
||||
|
||||
public LdapLogin(string username, string domain)
|
||||
{
|
||||
Username = username;
|
||||
Domain = domain;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return !string.IsNullOrEmpty(Domain) ? string.Format("{0}@{1}", Username, Domain) : Username;
|
||||
}
|
||||
|
||||
public static LdapLogin ParseLogin(string login)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string username;
|
||||
string domain = null;
|
||||
|
||||
if (login.Contains("\\"))
|
||||
{
|
||||
var splited = login.Split('\\');
|
||||
|
||||
if (!splited.Any() || splited.Length != 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
domain = splited[0];
|
||||
username = splited[1];
|
||||
|
||||
}
|
||||
else if (login.Contains("@"))
|
||||
{
|
||||
var splited = login.Split('@');
|
||||
|
||||
if (!splited.Any() || splited.Length != 2)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
username = splited[0];
|
||||
domain = splited[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
username = login;
|
||||
}
|
||||
|
||||
var result = new LdapLogin(username, domain);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Data;
|
||||
/// <summary>
|
||||
/// LDAP object class
|
||||
/// </summary>
|
||||
public abstract class LdapObject
|
||||
{
|
||||
#region .Public
|
||||
|
||||
public abstract string DistinguishedName { get; }
|
||||
|
||||
public abstract string Sid { get; }
|
||||
|
||||
public abstract string SidAttribute { get; }
|
||||
|
||||
public abstract bool IsDisabled { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Get property object
|
||||
/// </summary>
|
||||
/// <param name="propertyName">property name</param>
|
||||
/// <param name="getBytes"></param>
|
||||
/// <returns>value object</returns>
|
||||
public abstract object GetValue(string propertyName, bool getBytes = false);
|
||||
|
||||
/// <summary>
|
||||
/// Get property values
|
||||
/// </summary>
|
||||
/// <param name="propertyName">property name</param>
|
||||
/// <returns>list of values</returns>
|
||||
public abstract List<string> GetValues(string propertyName);
|
||||
}
|
@ -1,277 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using Mapping = ASC.ActiveDirectory.Base.Settings.LdapSettings.MappingFields;
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Data;
|
||||
/// <summary>
|
||||
/// LDAP object extensions class
|
||||
/// </summary>
|
||||
[Scope]
|
||||
public class LdapObjectExtension
|
||||
{
|
||||
private readonly TenantUtil _tenantUtil;
|
||||
private readonly SettingsManager _settingsManager;
|
||||
private readonly ILogger<LdapObjectExtension> _logger;
|
||||
|
||||
public LdapObjectExtension(TenantUtil tenantUtil, SettingsManager settingsManager, ILogger<LdapObjectExtension> logger)
|
||||
{
|
||||
_tenantUtil = tenantUtil;
|
||||
_settingsManager = settingsManager;
|
||||
_logger = logger;
|
||||
}
|
||||
public string GetAttribute(LdapObject ldapObject, string attribute)
|
||||
{
|
||||
if (string.IsNullOrEmpty(attribute))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return ldapObject.GetValue(attribute) as string;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorCanNotGetAttribute(attribute, ldapObject.DistinguishedName, e);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> GetAttributes(LdapObject ldapObject, string attribute)
|
||||
{
|
||||
var list = new List<string>();
|
||||
|
||||
if (string.IsNullOrEmpty(attribute))
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return ldapObject.GetValues(attribute);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
_logger.ErrorCanNotGetAttributes(attribute, ldapObject.DistinguishedName, e);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
private const int MAX_NUMBER_OF_SYMBOLS = 64;
|
||||
private const string EXT_MOB_PHONE = "extmobphone";
|
||||
private const string EXT_MAIL = "extmail";
|
||||
private const string EXT_PHONE = "extphone";
|
||||
private const string EXT_SKYPE = "extskype";
|
||||
|
||||
private List<string> GetContacts(LdapObject ldapUser, Mapping key, LdapSettings settings)
|
||||
{
|
||||
if (!settings.LdapMapping.ContainsKey(key))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var bindings = settings.LdapMapping[key].Split(',').Select(x => x.Trim()).ToArray();
|
||||
if (bindings.Length > 1)
|
||||
{
|
||||
var list = new List<string>();
|
||||
foreach (var bind in bindings)
|
||||
{
|
||||
list.AddRange(GetAttributes(ldapUser, bind));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetAttributes(ldapUser, bindings[0]);
|
||||
}
|
||||
}
|
||||
|
||||
private void PopulateContacts(List<string> Contacts, string type, List<string> values)
|
||||
{
|
||||
if (values == null || !values.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var val in values)
|
||||
{
|
||||
Contacts.Add(type);
|
||||
Contacts.Add(val);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<UserInfo> ToUserInfoAsync(LdapObject ldapUser, LdapUserImporter ldapUserImporter)
|
||||
{
|
||||
var settings = ldapUserImporter.Settings;
|
||||
var resource = ldapUserImporter.Resource;
|
||||
|
||||
var userName = GetAttribute(ldapUser, settings.LoginAttribute);
|
||||
|
||||
var firstName = settings.LdapMapping.ContainsKey(Mapping.FirstNameAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.FirstNameAttribute]) : string.Empty;
|
||||
var secondName = settings.LdapMapping.ContainsKey(Mapping.SecondNameAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.SecondNameAttribute]) : string.Empty;
|
||||
var birthDay = settings.LdapMapping.ContainsKey(Mapping.BirthDayAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.BirthDayAttribute]) : string.Empty;
|
||||
var gender = settings.LdapMapping.ContainsKey(Mapping.GenderAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.GenderAttribute]) : string.Empty;
|
||||
var primaryPhone = settings.LdapMapping.ContainsKey(Mapping.MobilePhoneAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.MobilePhoneAttribute]) : string.Empty;
|
||||
var mail = settings.LdapMapping.ContainsKey(Mapping.MailAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.MailAttribute]) : string.Empty;
|
||||
var title = settings.LdapMapping.ContainsKey(Mapping.TitleAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.TitleAttribute]) : string.Empty;
|
||||
var location = settings.LdapMapping.ContainsKey(Mapping.LocationAttribute) ? GetAttribute(ldapUser, settings.LdapMapping[Mapping.LocationAttribute]) : string.Empty;
|
||||
|
||||
var phones = GetContacts(ldapUser, Mapping.AdditionalPhone, settings);
|
||||
var mobilePhones = GetContacts(ldapUser, Mapping.AdditionalMobilePhone, settings);
|
||||
var emails = GetContacts(ldapUser, Mapping.AdditionalMail, settings);
|
||||
var skype = GetContacts(ldapUser, Mapping.Skype, settings);
|
||||
|
||||
var quotaSettings = await _settingsManager.LoadAsync<TenantUserQuotaSettings>();
|
||||
var quota = settings.LdapMapping.ContainsKey(Mapping.UserQuotaLimit) ? ByteConverter.ConvertSizeToBytes(GetAttribute(ldapUser, settings.LdapMapping[Mapping.UserQuotaLimit])) : quotaSettings.DefaultUserQuota;
|
||||
|
||||
if (string.IsNullOrEmpty(userName))
|
||||
{
|
||||
throw new Exception("LDAP LoginAttribute is empty");
|
||||
}
|
||||
|
||||
var contacts = new List<string>();
|
||||
|
||||
PopulateContacts(contacts, EXT_PHONE, phones);
|
||||
PopulateContacts(contacts, EXT_MOB_PHONE, mobilePhones);
|
||||
PopulateContacts(contacts, EXT_MAIL, emails);
|
||||
PopulateContacts(contacts, EXT_SKYPE, skype);
|
||||
|
||||
var user = new UserInfo
|
||||
{
|
||||
Id = Guid.Empty,
|
||||
UserName = userName,
|
||||
Sid = ldapUser.Sid,
|
||||
ActivationStatus = settings.SendWelcomeEmail && !string.IsNullOrEmpty(mail) ? EmployeeActivationStatus.Pending : EmployeeActivationStatus.NotActivated,
|
||||
Status = ldapUser.IsDisabled ? EmployeeStatus.Terminated : EmployeeStatus.Active,
|
||||
Title = !string.IsNullOrEmpty(title) ? title : string.Empty,
|
||||
Location = !string.IsNullOrEmpty(location) ? location : string.Empty,
|
||||
WorkFromDate = _tenantUtil.DateTimeNow(),
|
||||
ContactsList = contacts,
|
||||
LdapQouta = quota
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(firstName))
|
||||
{
|
||||
user.FirstName = firstName.Length > MAX_NUMBER_OF_SYMBOLS
|
||||
? firstName.Substring(0, MAX_NUMBER_OF_SYMBOLS)
|
||||
: firstName;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.FirstName = resource.FirstName;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(secondName))
|
||||
{
|
||||
user.LastName = secondName.Length > MAX_NUMBER_OF_SYMBOLS
|
||||
? secondName.Substring(0, MAX_NUMBER_OF_SYMBOLS)
|
||||
: secondName;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.LastName = resource.LastName;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(birthDay))
|
||||
{
|
||||
DateTime date;
|
||||
if (DateTime.TryParse(birthDay, out date))
|
||||
{
|
||||
user.BirthDate = date;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(gender))
|
||||
{
|
||||
bool b;
|
||||
if (bool.TryParse(gender, out b))
|
||||
{
|
||||
user.Sex = b;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gender.ToLowerInvariant())
|
||||
{
|
||||
case "male":
|
||||
case "m":
|
||||
user.Sex = true;
|
||||
break;
|
||||
case "female":
|
||||
case "f":
|
||||
user.Sex = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(mail))
|
||||
{
|
||||
user.Email = userName.Contains("@") ? userName : string.Format("{0}@{1}", userName, ldapUserImporter.LDAPDomain);
|
||||
user.ActivationStatus = EmployeeActivationStatus.AutoGenerated;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.Email = mail;
|
||||
}
|
||||
|
||||
user.MobilePhone = string.IsNullOrEmpty(primaryPhone)
|
||||
? null : primaryPhone;
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
public GroupInfo ToGroupInfo(LdapObject ldapGroup, LdapSettings settings)
|
||||
{
|
||||
var name = GetAttribute(ldapGroup, settings.GroupNameAttribute);
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new Exception("LDAP GroupNameAttribute is empty");
|
||||
}
|
||||
|
||||
var group = new GroupInfo
|
||||
{
|
||||
Name = name,
|
||||
Sid = ldapGroup.Sid
|
||||
};
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
public string GetDomainFromDn(LdapObject ldapObject)
|
||||
{
|
||||
if (ldapObject == null || string.IsNullOrEmpty(ldapObject.DistinguishedName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return LdapUtils.DistinguishedNameToDomain(ldapObject.DistinguishedName);
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
|
||||
[Scope]
|
||||
public class DbHelper
|
||||
{
|
||||
private readonly IDbContextFactory<WebstudioDbContext> _activeDirectoryDbContextFactory;
|
||||
private readonly LdapSettings _ldapSettings;
|
||||
|
||||
public DbHelper(
|
||||
IDbContextFactory<WebstudioDbContext> activeDirectoryDbContextFactory,
|
||||
LdapSettings ldapSettings)
|
||||
{
|
||||
_activeDirectoryDbContextFactory = activeDirectoryDbContextFactory;
|
||||
_ldapSettings = ldapSettings;
|
||||
}
|
||||
|
||||
public async Task<List<int>> TenantsAsync()
|
||||
{
|
||||
var id = _ldapSettings.ID;
|
||||
var enableLdapAuthentication = _ldapSettings.EnableLdapAuthentication;
|
||||
|
||||
await using var activeDirectoryDbContext = _activeDirectoryDbContextFactory.CreateDbContext();
|
||||
var data = await activeDirectoryDbContext.WebstudioSettings
|
||||
.Where(r => r.Id == id)
|
||||
.Join(activeDirectoryDbContext.Tenants, r => r.TenantId, r => r.Id, (settings, tenant) => new { settings, tenant })
|
||||
.Select(r => DbFunctionsExtension.JsonValue(nameof(r.settings.Data).ToLower(), enableLdapAuthentication.ToString()))
|
||||
.Distinct()
|
||||
.Select(r => r != null ? Convert.ToInt32(r) : 0)
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Expressions;
|
||||
/// <summary>
|
||||
/// Criteria
|
||||
/// </summary>
|
||||
public class Criteria : ICloneable
|
||||
{
|
||||
private readonly CriteriaType _type;
|
||||
private readonly List<Expression> _expressions = new List<Expression>();
|
||||
private readonly List<Criteria> _nestedCriteras = new List<Criteria>();
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="type">Type of critera</param>
|
||||
/// <param name="expressions">Expressions</param>
|
||||
public Criteria(CriteriaType type, params Expression[] expressions)
|
||||
{
|
||||
_expressions.AddRange(expressions);
|
||||
_type = type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add nested expressions as And criteria
|
||||
/// </summary>
|
||||
/// <param name="expressions">Expressions</param>
|
||||
/// <returns>Self</returns>
|
||||
public Criteria And(params Expression[] expressions)
|
||||
{
|
||||
_nestedCriteras.Add(All(expressions));
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add nested expressions as Or criteria
|
||||
/// </summary>
|
||||
/// <param name="expressions">Expressions</param>
|
||||
/// <returns>Self</returns>
|
||||
public Criteria Or(params Expression[] expressions)
|
||||
{
|
||||
_nestedCriteras.Add(Any(expressions));
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add nested Criteria
|
||||
/// </summary>
|
||||
/// <param name="nested"></param>
|
||||
/// <returns>Self</returns>
|
||||
public Criteria Add(Criteria nested)
|
||||
{
|
||||
_nestedCriteras.Add(nested);
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Criteria as a string
|
||||
/// </summary>
|
||||
/// <returns>Criteria string</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var criteria = "({0}{1}{2})";
|
||||
var expressions = _expressions.Aggregate(string.Empty, (current, expr) => current + expr.ToString());
|
||||
var criterias = _nestedCriteras.Aggregate(string.Empty, (current, crit) => current + crit.ToString());
|
||||
return string.Format(criteria, _type == CriteriaType.And ? "&" : "|", expressions, criterias);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Group of Expression union as And
|
||||
/// </summary>
|
||||
/// <param name="expressions">Expressions</param>
|
||||
/// <returns>new Criteria</returns>
|
||||
public static Criteria All(params Expression[] expressions)
|
||||
{
|
||||
return new Criteria(CriteriaType.And, expressions);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Group of Expression union as Or
|
||||
/// </summary>
|
||||
/// <param name="expressions">Expressions</param>
|
||||
/// <returns>new Criteria</returns>
|
||||
public static Criteria Any(params Expression[] expressions)
|
||||
{
|
||||
return new Criteria(CriteriaType.Or, expressions);
|
||||
}
|
||||
|
||||
#region ICloneable Members
|
||||
|
||||
/// <summary>
|
||||
/// ICloneable implemetation
|
||||
/// </summary>
|
||||
/// <returns>Clone object</returns>
|
||||
public object Clone()
|
||||
{
|
||||
var cr = new Criteria(_type);
|
||||
foreach (var ex in _expressions)
|
||||
{
|
||||
cr._expressions.Add(ex.Clone() as Expression);
|
||||
}
|
||||
foreach (var nc in _nestedCriteras)
|
||||
{
|
||||
cr._nestedCriteras.Add(nc.Clone() as Criteria);
|
||||
}
|
||||
return cr;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Expressions;
|
||||
/// <summary>
|
||||
/// Criteria enum
|
||||
/// </summary>
|
||||
public enum CriteriaType
|
||||
{
|
||||
None,
|
||||
And,
|
||||
Or
|
||||
}
|
@ -1,302 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Expressions;
|
||||
public class Expression : ICloneable
|
||||
{
|
||||
private readonly Op _op;
|
||||
private bool _negative;
|
||||
private readonly string _attributeName;
|
||||
private readonly string _attributeValue;
|
||||
|
||||
private const string EQUIAL = "=";
|
||||
private const string APPROXIMATELY_EQUIAL = "~=";
|
||||
private const string GREATER = ">";
|
||||
private const string GREATER_OR_EQUAL = ">=";
|
||||
private const string LESS = "<";
|
||||
private const string LESS_OR_EQUAL = "<=";
|
||||
|
||||
internal Expression()
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _attributeName; }
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return _attributeValue; }
|
||||
}
|
||||
|
||||
public Op Operation
|
||||
{
|
||||
get { return _op; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To specify unary operations
|
||||
/// </summary>
|
||||
/// <param name="op">Operator</param>
|
||||
/// <param name="attrbuteName">Attribute name</param>
|
||||
public Expression(string attrbuteName, Op op)
|
||||
{
|
||||
if (op != Op.Exists && op != Op.NotExists)
|
||||
{
|
||||
throw new ArgumentException("op");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(attrbuteName))
|
||||
{
|
||||
throw new ArgumentException("attrbuteName");
|
||||
}
|
||||
|
||||
_op = op;
|
||||
_attributeName = attrbuteName;
|
||||
_attributeValue = "*";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To specify binary operations
|
||||
/// </summary>
|
||||
/// <param name="op">Operator</param>
|
||||
/// <param name="attrbuteName">Attribute name</param>
|
||||
/// <param name="attrbuteValue">Attribute value</param>
|
||||
public Expression(string attrbuteName, Op op, string attrbuteValue)
|
||||
{
|
||||
if (op == Op.Exists || op == Op.NotExists)
|
||||
{
|
||||
throw new ArgumentException("op");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(attrbuteName))
|
||||
{
|
||||
throw new ArgumentException("attrbuteName");
|
||||
}
|
||||
|
||||
_op = op;
|
||||
_attributeName = attrbuteName;
|
||||
_attributeValue = attrbuteValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Expression as a string
|
||||
/// </summary>
|
||||
/// <returns>Expression string</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string sop;
|
||||
switch (_op)
|
||||
{
|
||||
case Op.NotExists:
|
||||
case Op.Exists:
|
||||
case Op.Equal:
|
||||
case Op.NotEqual:
|
||||
sop = EQUIAL;
|
||||
break;
|
||||
case Op.Greater:
|
||||
sop = GREATER;
|
||||
break;
|
||||
case Op.GreaterOrEqual:
|
||||
sop = GREATER_OR_EQUAL;
|
||||
break;
|
||||
case Op.Less:
|
||||
sop = LESS;
|
||||
break;
|
||||
case Op.LessOrEqual:
|
||||
sop = LESS_OR_EQUAL;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
var expressionString = "({0}{1}{2}{3})";
|
||||
expressionString = string.Format(expressionString,
|
||||
//positive or negative
|
||||
(((int)_op & 0x010000) == 0x010000 || _negative) ? "!" : "", _attributeName, sop,
|
||||
EscapeLdapSearchFilter(_attributeValue));
|
||||
|
||||
return expressionString;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Escapes the LDAP search filter to prevent LDAP injection attacks.
|
||||
/// </summary>
|
||||
/// <param name="searchFilter">The search filter.</param>
|
||||
/// <returns>The escaped search filter.</returns>
|
||||
private static string EscapeLdapSearchFilter(string searchFilter)
|
||||
{
|
||||
var escape = new StringBuilder(); // If using JDK >= 1.5 consider using StringBuilder
|
||||
foreach (var current in searchFilter)
|
||||
{
|
||||
switch (current)
|
||||
{
|
||||
case '\\':
|
||||
escape.Append(@"\5c");
|
||||
break;
|
||||
case '*':
|
||||
escape.Append(@"\2a");
|
||||
break;
|
||||
case '(':
|
||||
escape.Append(@"\28");
|
||||
break;
|
||||
case ')':
|
||||
escape.Append(@"\29");
|
||||
break;
|
||||
case '\u0000':
|
||||
escape.Append(@"\00");
|
||||
break;
|
||||
case '/':
|
||||
escape.Append(@"\2f");
|
||||
break;
|
||||
default:
|
||||
escape.Append(current);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return escape.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Negation
|
||||
/// </summary>
|
||||
/// <returns>Self</returns>
|
||||
public Expression Negative()
|
||||
{
|
||||
_negative = !_negative;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Existence
|
||||
/// </summary>
|
||||
/// <param name="attrbuteName"></param>
|
||||
/// <returns>New Expression</returns>
|
||||
public static Expression Exists(string attrbuteName)
|
||||
{
|
||||
return new Expression(attrbuteName, Op.Exists);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Non-Existence
|
||||
/// </summary>
|
||||
/// <param name="attrbuteName"></param>
|
||||
/// <returns>New Expression</returns>
|
||||
public static Expression NotExists(string attrbuteName)
|
||||
{
|
||||
return new Expression(attrbuteName, Op.NotExists);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equality
|
||||
/// </summary>
|
||||
/// <param name="attrbuteName"></param>
|
||||
/// <param name="attrbuteValue"></param>
|
||||
/// <returns>New Expression</returns>
|
||||
public static Expression Equal(string attrbuteName, string attrbuteValue)
|
||||
{
|
||||
return new Expression(attrbuteName, Op.Equal, attrbuteValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not equality
|
||||
/// </summary>
|
||||
/// <param name="attrbuteName"></param>
|
||||
/// <param name="attrbuteValue"></param>
|
||||
/// <returns></returns>
|
||||
public static Expression NotEqual(string attrbuteName, string attrbuteValue)
|
||||
{
|
||||
return new Expression(attrbuteName, Op.NotEqual, attrbuteValue);
|
||||
}
|
||||
|
||||
public static Expression Parse(string origin)
|
||||
{
|
||||
string spliter = null;
|
||||
var op = Op.Equal;
|
||||
|
||||
var index = origin.IndexOf(EQUIAL, StringComparison.Ordinal);
|
||||
|
||||
if (index > -1)
|
||||
{
|
||||
spliter = EQUIAL;
|
||||
op = Op.Equal;
|
||||
}
|
||||
else if ((index = origin.IndexOf(GREATER, StringComparison.Ordinal)) > -1)
|
||||
{
|
||||
spliter = GREATER;
|
||||
op = Op.Greater;
|
||||
}
|
||||
else if ((index = origin.IndexOf(GREATER_OR_EQUAL, StringComparison.Ordinal)) > -1)
|
||||
{
|
||||
spliter = GREATER_OR_EQUAL;
|
||||
op = Op.GreaterOrEqual;
|
||||
}
|
||||
else if ((index = origin.IndexOf(LESS, StringComparison.Ordinal)) > -1)
|
||||
{
|
||||
spliter = LESS;
|
||||
op = Op.Less;
|
||||
}
|
||||
else if ((index = origin.IndexOf(LESS_OR_EQUAL, StringComparison.Ordinal)) > -1)
|
||||
{
|
||||
spliter = LESS_OR_EQUAL;
|
||||
op = Op.LessOrEqual;
|
||||
}
|
||||
else if ((index = origin.IndexOf(APPROXIMATELY_EQUIAL, StringComparison.Ordinal)) > -1)
|
||||
{
|
||||
spliter = APPROXIMATELY_EQUIAL;
|
||||
op = Op.Exists;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(spliter))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var attributeName = origin.Substring(0, index);
|
||||
var attributeValue = origin.Substring(index + 1);
|
||||
|
||||
if (string.IsNullOrEmpty(attributeName) || string.IsNullOrEmpty(attributeValue))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Expression(attributeName, op, attributeValue);
|
||||
}
|
||||
|
||||
#region ICloneable Members
|
||||
/// <summary>
|
||||
/// ICloneable implemetation
|
||||
/// </summary>
|
||||
/// <returns>Clone object</returns>
|
||||
public object Clone()
|
||||
{
|
||||
return MemberwiseClone();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Expressions;
|
||||
/// <summary>
|
||||
/// Operations
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// [1 - negation][1 - binary][number]
|
||||
/// </remarks>
|
||||
public enum Op
|
||||
{
|
||||
//------------ UNARY -------------
|
||||
/// <summary>Attribute exists</summary>
|
||||
Exists = 0x000001,
|
||||
/// <summary>Attribute does not exist</summary>
|
||||
NotExists = 0x010002,
|
||||
|
||||
//------------ BINARY -------------
|
||||
/// <summary>Equal</summary>
|
||||
Equal = 0x000103,
|
||||
/// <summary>Not equal</summary>
|
||||
NotEqual = 0x010104,
|
||||
/// <summary>Strong less</summary>
|
||||
Less = 0x000105,
|
||||
/// <summary>Less or equal</summary>
|
||||
LessOrEqual = 0x000106,
|
||||
/// <summary>Strong greater</summary>
|
||||
Greater = 0x000107,
|
||||
/// <summary>Greater or equal</summary>
|
||||
GreaterOrEqual = 0x000108
|
||||
}
|
@ -1,415 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
/// <summary>
|
||||
/// Constants of Active Directory
|
||||
/// </summary>
|
||||
public sealed class LdapConstants
|
||||
{
|
||||
public const int STANDART_LDAP_PORT = 389;
|
||||
public const int SSL_LDAP_PORT = 636;
|
||||
public const int LDAP_ERROR_INVALID_CREDENTIALS = 0x31;
|
||||
public const int LDAP_V3 = 3;
|
||||
|
||||
public const string OBJECT_FILTER = "(ObjectClass=*)";
|
||||
|
||||
/// <summary>
|
||||
/// User Account type
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum AccountType : uint
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_DOMAIN_OBJECT = 0x00000000,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_GROUP_OBJECT = 0x10000000,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_NON_SECURITY_GROUP_OBJECT = 0x10000001,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_ALIAS_OBJECT = 0x20000000,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_NON_SECURITY_ALIAS_OBJECT = 0x20000001,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_USER_OBJECT = 0x30000000,
|
||||
|
||||
//SAM_NORMAL_USER_ACCOUNT = 0x30000000,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_MACHINE_ACCOUNT = 0x30000001,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_TRUST_ACCOUNT = 0x30000002,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_APP_BASIC_GROUP = 0x40000000,
|
||||
|
||||
/// <summary></summary>
|
||||
SAM_APP_QUERY_GROUP = 0x40000001
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User Account Control
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum UserAccountControl : uint
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
/// <summary>Zero flag</summary>
|
||||
EMPTY = 0x00000000,
|
||||
|
||||
/// <summary>The logon script is executed.</summary>
|
||||
ADS_UF_SCRIPT = 0x00000001,
|
||||
|
||||
/// <summary>The user account is disabled.</summary>
|
||||
ADS_UF_ACCOUNTDISABLE = 0x00000002,
|
||||
|
||||
/// <summary>The home directory is required.</summary>
|
||||
ADS_UF_HOMEDIR_REQUIRED = 0x00000008,
|
||||
|
||||
/// <summary>The account is currently locked out.</summary>
|
||||
ADS_UF_LOCKOUT = 0x00000010,
|
||||
|
||||
/// <summary>No password is required.</summary>
|
||||
ADS_UF_PASSWD_NOTREQD = 0x00000020,
|
||||
|
||||
/// <summary>The user cannot change the password</summary>
|
||||
ADS_UF_PASSWD_CANT_CHANGE = 0x00000040,
|
||||
|
||||
/// <summary>The user can send an encrypted password.</summary>
|
||||
ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = 0x00000080,
|
||||
|
||||
/// <summary>This is an account for users whose primary account is in another domain.
|
||||
/// This account provides user access to this domain, but not to any domain that trusts
|
||||
/// this domain. Also known as a local user account.</summary>
|
||||
ADS_UF_TEMP_DUPLICATE_ACCOUNT = 0x00000100,
|
||||
|
||||
/// <summary>This is a default account type that represents a typical user.</summary>
|
||||
ADS_UF_NORMAL_ACCOUNT = 0x00000200,
|
||||
|
||||
/// <summary>This is a computer account for a computer that is a member of this domain.</summary>
|
||||
ADS_UF_WORKSTATION_TRUST_ACCOUNT = 0x00001000,
|
||||
|
||||
/// <summary>This is a computer account for a system backup domain controller
|
||||
/// that is a member of this domain.</summary>
|
||||
ADS_UF_SERVER_TRUST_ACCOUNT = 0x00002000,
|
||||
|
||||
/// <summary>The password for this account will never expire.</summary>
|
||||
ADS_UF_DONT_EXPIRE_PASSWD = 0x00010000,
|
||||
|
||||
/// <summary>The user must log on using a smart card.</summary>
|
||||
ADS_UF_SMARTCARD_REQUIRED = 0x00040000,
|
||||
|
||||
/// <summary>The service account (user or computer account), under which a service runs,
|
||||
/// is trusted for Kerberos delegation. Any such service can impersonate a client
|
||||
/// requesting the service.</summary>
|
||||
ADS_UF_TRUSTED_FOR_DELEGATION = 0x00080000,
|
||||
|
||||
/// <summary>The security context of the user will not be delegated to a service even
|
||||
/// if the service account is set as trusted for Kerberos delegation.</summary>
|
||||
ADS_UF_NOT_DELEGATED = 0x00100000,
|
||||
|
||||
/// <summary>Restrict this principal to use only Data Encryption Standard
|
||||
/// (DES) encryption types for keys.</summary>
|
||||
ADS_UF_USE_DES_KEY_ONLY = 0x00200000,
|
||||
|
||||
/// <summary>This account does not require Kerberos pre-authentication for logon.</summary>
|
||||
ADS_UF_DONT_REQUIRE_PREAUTH = 0x00400000,
|
||||
|
||||
/// <summary>The user password has expired. This flag is created by the system
|
||||
/// using data from the Pwd-Last-Set attribute and the domain policy.</summary>
|
||||
ADS_UF_PASSWORD_EXPIRED = 0x00800000,
|
||||
|
||||
/// <summary>The account is enabled for delegation. This is a security-sensitive
|
||||
/// setting; accounts with this option enabled should be strictly controlled.
|
||||
/// This setting enables a service running under the account to assume a client
|
||||
/// identity and authenticate as that user to other remote servers on the network.</summary>
|
||||
ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = 0x01000000
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type of Group
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum GroupType : uint
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
/// <summary>System group</summary>
|
||||
SYSTEM = 0x00000001,
|
||||
|
||||
/// <summary>Global scope group</summary>
|
||||
GLOBAL_SCOPE = 0x00000002,
|
||||
|
||||
/// <summary>Local domain scope group</summary>
|
||||
LOCAL_DOMAIN_SCOPE = 0x00000004,
|
||||
|
||||
/// <summary>Universal scope group</summary>
|
||||
UNIVERSAL_SCOPE = 0x00000008,
|
||||
|
||||
/// <summary>Specifies an APP_BASIC group for Windows Server Authorization Manager.</summary>
|
||||
APP_BASIC = 0x000000010,
|
||||
|
||||
/// <summary>Specifies an APP_QUERY group for Windows Server Authorization Manager.</summary>
|
||||
APP_QUERY = 0x000000020,
|
||||
|
||||
/// <summary>Security group</summary>
|
||||
SECURITY_GROUP = 0x80000000
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Schema attributes of Active Directory
|
||||
/// </summary>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class ADSchemaAttributes
|
||||
{
|
||||
/// <summary>Relative Distinguished Name </summary>
|
||||
public const string NAME = "name";
|
||||
|
||||
/// <summary>Common-Name</summary>
|
||||
public const string COMMON_NAME = "cn";
|
||||
|
||||
/// <summary>Display-Name</summary>
|
||||
public const string DISPLAY_NAME = "displayName";
|
||||
|
||||
/// <summary>The list of classes from which this class is derived.</summary>
|
||||
public const string OBJECT_CLASS = "objectClass";
|
||||
|
||||
/// <summary>DN category</summary>
|
||||
public const string OBJECT_CATEGORY = "objectCategory";
|
||||
|
||||
/// <summary>The unique identifier for an object.</summary>
|
||||
public const string OBJECT_GUID = "objectGUID";
|
||||
|
||||
/// <summary>Show-In-Advanced-View-Only</summary>
|
||||
public const string SHOW_IN_ADVANCED_VIEW_ONLY = "showInAdvancedViewOnly";
|
||||
|
||||
/// <summary>Obj-Dist-Name</summary>
|
||||
public const string DISTINGUISHED_NAME = "distinguishedName";
|
||||
|
||||
/// <summary>Is-Critical-System-Object</summary>
|
||||
public const string IS_CRITICAL_SYSTEM_OBJECT = "isCriticalSystemObject";
|
||||
|
||||
/// <summary>NT-Security-Descriptor in format SDDL</summary>
|
||||
public const string NT_SECURITY_DESCRIPTOR = "nTSecurityDescriptor";
|
||||
|
||||
/// <summary>Is-Member-Of-DL</summary>
|
||||
public const string MEMBER_OF = "memberOf";
|
||||
|
||||
/// <summary>Users which are members of this object</summary>
|
||||
public const string MEMBER = "member";
|
||||
|
||||
/// <summary>Organizational-Unit-Name</summary>
|
||||
public const string ORGANIZATIONAL_UNIT_NAME = "ou";
|
||||
|
||||
/// <summary>Organization-Name</summary>
|
||||
public const string ORGANIZATION_NAME = "o";
|
||||
|
||||
/// <summary>SAM-Account-Name</summary>
|
||||
public const string ACCOUNT_NAME = "sAMAccountName";
|
||||
|
||||
/// <summary>SAM-Account-Type</summary>
|
||||
public const string ACCOUNT_TYPE = "sAMAccountType";
|
||||
|
||||
/// <summary>A binary value that specifies the security identifier (SID) of the user.
|
||||
/// The SID is a unique value used to identify the user as a security principal.</summary>
|
||||
public const string OBJECT_SID = "objectSid"; //Object-Sid
|
||||
|
||||
/// <summary>Flags that control the behavior of the user account.</summary>
|
||||
public const string USER_ACCOUNT_CONTROL = "userAccountControl";
|
||||
|
||||
/// <summary>This attribute contains the UPN that is an Internet-style login name
|
||||
/// for a user based on the Internet standard RFC 822. The UPN is shorter than
|
||||
/// the distinguished name and easier to remember. By convention, this should map
|
||||
/// to the user e-mail name. The value set for this attribute is equal to the length
|
||||
/// of the user's ID and the domain name. For more information about this attribute,
|
||||
/// see the Naming Properties topic in the Active Directory guide.</summary>
|
||||
public const string USER_PRINCIPAL_NAME = "userPrincipalName";
|
||||
|
||||
/// <summary>Contains the given name (first name) of the user.</summary>
|
||||
public const string FIRST_NAME = "givenName";
|
||||
|
||||
/// <summary>This attribute contains the family or last name for a user.</summary>
|
||||
public const string SURNAME = "sn";
|
||||
|
||||
/// <summary>Primary-Group-ID</summary>
|
||||
public const string PRIMARY_GROUP_ID = "primaryGroupID";
|
||||
|
||||
/// <summary>Name of computer as registered in DNS</summary>
|
||||
public const string DNS_HOST_NAME = "dNSHostName";
|
||||
|
||||
/// <summary>The Operating System Version string </summary>
|
||||
public const string OPERATING_SYSTEM_VERSION = "operatingSystemVersion";
|
||||
|
||||
/// <summary>The Operating System Service Pack ID String </summary>
|
||||
public const string OPERATING_SYSTEM_SERVICE_PACK = "operatingSystemServicePack";
|
||||
|
||||
/// <summary>The hotfix level of the operating system.</summary>
|
||||
public const string OPERATING_SYSTEM_HOTFIX = "operatingSystemHotfix";
|
||||
|
||||
/// <summary>The Operating System name .</summary>
|
||||
public const string OPERATING_SYSTEM = "operatingSystem";
|
||||
|
||||
/// <summary>The TCP/IP address for a network segment. Also called the subnet address.</summary>
|
||||
public const string NETWORK_ADDRESS = "networkAddress";
|
||||
|
||||
/// <summary>Mobile phone</summary>
|
||||
public const string MOBILE = "mobile";
|
||||
|
||||
/// <summary>Email address</summary>
|
||||
public const string MAIL = "mail";
|
||||
|
||||
/// <summary>Telephone number</summary>
|
||||
public const string TELEPHONE_NUMBER = "telephoneNumber";
|
||||
|
||||
/// <summary>Title</summary>
|
||||
public const string TITLE = "title";
|
||||
|
||||
/// <summary>Street Address</summary>
|
||||
public const string STREET = "street";
|
||||
|
||||
/// <summary>Postal code</summary>
|
||||
public const string POSTAL_CODE = "postalCode";
|
||||
|
||||
/// <summary>Home phone</summary>
|
||||
public const string HOME_PHONE = "homePhone";
|
||||
|
||||
/// <summary>Initials</summary>
|
||||
public const string INITIALS = "initials";
|
||||
|
||||
/// <summary>Department</summary>
|
||||
public const string DIVISION = "division";
|
||||
|
||||
/// <summary>Company</summary>
|
||||
public const string COMPANY = "company";
|
||||
}
|
||||
|
||||
public static class RfcLDAPAttributes
|
||||
{
|
||||
public const string ENTRY_DN = "entryDN";
|
||||
public const string GUID = "GUID";
|
||||
public const string ENTRY_UUID = "entryUUID";
|
||||
public const string NS_UNIQUE_ID = "nsuniqueid";
|
||||
public const string UID = "uid";
|
||||
public const string MEMBER_UID = "memberUid";
|
||||
public const string DN = "dn";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Standart attributes of ObjectClass
|
||||
/// </summary>
|
||||
public static class ObjectClassKnowedValues
|
||||
{
|
||||
/// <summary>
|
||||
/// top value
|
||||
/// </summary>
|
||||
public const string TOP = "top";
|
||||
|
||||
/// <summary>
|
||||
/// Domain name
|
||||
/// </summary>
|
||||
public const string DOMAIN = "domain";
|
||||
|
||||
/// <summary>
|
||||
/// Domain DNS
|
||||
/// </summary>
|
||||
public const string DOMAIN_DNS = "domainDNS";
|
||||
|
||||
/// <summary>
|
||||
/// Group name
|
||||
/// </summary>
|
||||
public const string GROUP = "group";
|
||||
|
||||
/// <summary>
|
||||
/// posix-group
|
||||
/// </summary>
|
||||
public const string POSIX_GROUP = "posixGroup";
|
||||
|
||||
/// <summary>
|
||||
/// Person
|
||||
/// </summary>
|
||||
public const string PERSON = "person";
|
||||
|
||||
/// <summary>
|
||||
/// Container
|
||||
/// </summary>
|
||||
public const string CONTAINER = "container";
|
||||
|
||||
/// <summary>
|
||||
/// Org unit
|
||||
/// </summary>
|
||||
public const string ORGANIZATIONAL_UNIT = "organizationalUnit";
|
||||
|
||||
/// <summary>
|
||||
/// Org name
|
||||
/// </summary>
|
||||
public const string ORGANIZATION = "organization";
|
||||
|
||||
/// <summary>
|
||||
/// posix-account
|
||||
/// </summary>
|
||||
public const string POSIX_ACCOUNT = "posixAccount";
|
||||
|
||||
/// <summary>
|
||||
/// Org person
|
||||
/// </summary>
|
||||
public const string ORGANIZATIONAL_PERSON = "organizationalPerson";
|
||||
|
||||
/// <summary>
|
||||
/// User
|
||||
/// </summary>
|
||||
public const string USER = "user";
|
||||
|
||||
/// <summary>
|
||||
/// Computer
|
||||
/// </summary>
|
||||
public const string COMPUTER = "computer";
|
||||
|
||||
/// <summary>
|
||||
/// RPC container
|
||||
/// </summary>
|
||||
public const string RPC_CONTAINER = "rpcContainer";
|
||||
|
||||
/// <summary>
|
||||
/// Built in domain flag
|
||||
/// </summary>
|
||||
public const string BUILD_IN_DOMAIN = "builtinDomain";
|
||||
}
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
|
||||
[Scope]
|
||||
public abstract class LdapHelper : IDisposable
|
||||
{
|
||||
public LdapSettings Settings { get; private set; }
|
||||
public abstract bool IsConnected { get; }
|
||||
|
||||
protected readonly ILogger<LdapHelper> _logger;
|
||||
protected readonly InstanceCrypto _instanceCrypto;
|
||||
|
||||
protected LdapHelper(
|
||||
ILogger<LdapHelper> logger,
|
||||
InstanceCrypto instanceCrypto)
|
||||
{
|
||||
_logger = logger;
|
||||
_instanceCrypto = instanceCrypto;
|
||||
}
|
||||
|
||||
public void Init(LdapSettings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
public abstract void Connect();
|
||||
|
||||
public abstract Dictionary<string, string[]> GetCapabilities();
|
||||
|
||||
public abstract string SearchDomain();
|
||||
|
||||
public abstract void CheckCredentials(string login, string password, string server, int portNumber,
|
||||
bool startTls, bool ssl, bool acceptCertificate, string acceptCertificateHash);
|
||||
|
||||
public abstract bool CheckUserDn(string userDn);
|
||||
|
||||
public abstract List<LdapObject> GetUsers(string filter = null, int limit = -1);
|
||||
|
||||
public abstract LdapObject GetUserBySid(string sid);
|
||||
|
||||
public abstract bool CheckGroupDn(string groupDn);
|
||||
|
||||
public abstract List<LdapObject> GetGroups(Criteria criteria = null);
|
||||
|
||||
public bool UserExistsInGroup(LdapObject domainGroup, LdapObject domainUser, LdapSettings settings) // string memberString, string groupAttribute, string primaryGroupId)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (domainGroup == null || domainUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var memberString = domainUser.GetValue(Settings.UserAttribute) as string;
|
||||
if (string.IsNullOrEmpty(memberString))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var groupAttribute = settings.GroupAttribute;
|
||||
if (string.IsNullOrEmpty(groupAttribute))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var userPrimaryGroupId = domainUser.GetValue(LdapConstants.ADSchemaAttributes.PRIMARY_GROUP_ID) as string;
|
||||
|
||||
if (!string.IsNullOrEmpty(userPrimaryGroupId) && domainGroup.Sid.EndsWith("-" + userPrimaryGroupId))
|
||||
{
|
||||
// Domain Users found
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var members = domainGroup.GetValues(groupAttribute);
|
||||
|
||||
if (members.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (members.Any(member => memberString.Equals(member, StringComparison.InvariantCultureIgnoreCase)
|
||||
|| member.Equals(domainUser.DistinguishedName, StringComparison.InvariantCultureIgnoreCase)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorUserExistsInGroupFailed(e);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public string GetPassword(byte[] passwordBytes)
|
||||
{
|
||||
if (passwordBytes == null || passwordBytes.Length == 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
string password;
|
||||
try
|
||||
{
|
||||
password = _instanceCrypto.Decrypt(passwordBytes, new UnicodeEncoding());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
password = string.Empty;
|
||||
}
|
||||
return password;
|
||||
}
|
||||
|
||||
public byte[] GetPasswordBytes(string password)
|
||||
{
|
||||
byte[] passwordBytes;
|
||||
|
||||
try
|
||||
{
|
||||
passwordBytes = _instanceCrypto.Encrypt(new UnicodeEncoding().GetBytes(password));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
passwordBytes = Array.Empty<byte>();
|
||||
}
|
||||
|
||||
return passwordBytes;
|
||||
}
|
||||
|
||||
public abstract void Dispose();
|
||||
}
|
@ -1,127 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
|
||||
[Singletone(Additional = typeof(LdapNotifyHelperExtension))]
|
||||
public class LdapNotifyService : BackgroundService
|
||||
{
|
||||
private readonly ConcurrentDictionary<int, Tuple<INotifyClient, LdapNotifySource>> _clients;
|
||||
private readonly IServiceScopeFactory _serviceScopeFactory;
|
||||
private readonly WorkContext _workContext;
|
||||
private readonly LdapSaveSyncOperation _ldapSaveSyncOperation;
|
||||
|
||||
public LdapNotifyService(
|
||||
IServiceScopeFactory serviceScopeFactory,
|
||||
WorkContext workContext,
|
||||
LdapSaveSyncOperation ldapSaveSyncOperation)
|
||||
{
|
||||
_clients = new ConcurrentDictionary<int, Tuple<INotifyClient, LdapNotifySource>>();
|
||||
_serviceScopeFactory = serviceScopeFactory;
|
||||
_workContext = workContext;
|
||||
_ldapSaveSyncOperation = ldapSaveSyncOperation;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
using var scope = _serviceScopeFactory.CreateScope();
|
||||
var tenantManager = scope.ServiceProvider.GetRequiredService<TenantManager>();
|
||||
var settingsManager = scope.ServiceProvider.GetRequiredService<SettingsManager>();
|
||||
var dbHelper = scope.ServiceProvider.GetRequiredService<DbHelper>();
|
||||
|
||||
var tenants = await tenantManager.GetTenantsAsync(await dbHelper.TenantsAsync());
|
||||
foreach (var t in tenants)
|
||||
{
|
||||
var tId = t.Id;
|
||||
|
||||
var ldapSettings = await settingsManager.LoadAsync<LdapSettings>(tId);
|
||||
if (!ldapSettings.EnableLdapAuthentication)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var cronSettings = await settingsManager.LoadAsync<LdapCronSettings>(tId);
|
||||
if (string.IsNullOrEmpty(cronSettings.Cron))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
RegisterAutoSync(t, cronSettings.Cron);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterAutoSync(Tenant tenant, string cron)
|
||||
{
|
||||
if (!_clients.ContainsKey(tenant.Id))
|
||||
{
|
||||
var scope = _serviceScopeFactory.CreateScope();
|
||||
var source = scope.ServiceProvider.GetRequiredService<LdapNotifySource>();
|
||||
var notifyEngineQueue = scope.ServiceProvider.GetRequiredService<NotifyEngineQueue>();
|
||||
source.Init(tenant);
|
||||
var client = _workContext.NotifyContext.RegisterClient(notifyEngineQueue, source);
|
||||
_workContext.RegisterSendMethod(source.AutoSyncAsync, cron);
|
||||
_clients.TryAdd(tenant.Id, new Tuple<INotifyClient, LdapNotifySource>(client, source));
|
||||
}
|
||||
}
|
||||
|
||||
public void UnregisterAutoSync(Tenant tenant)
|
||||
{
|
||||
if (_clients.ContainsKey(tenant.Id))
|
||||
{
|
||||
var client = _clients[tenant.Id];
|
||||
_workContext.UnregisterSendMethod(client.Item2.AutoSyncAsync);
|
||||
_clients.TryRemove(tenant.Id, out _);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AutoSyncAsync(Tenant tenant)
|
||||
{
|
||||
using var scope = _serviceScopeFactory.CreateScope();
|
||||
var settingsManager = scope.ServiceProvider.GetRequiredService<SettingsManager>();
|
||||
var ldapSettings = await settingsManager.LoadAsync<LdapSettings>(tenant.Id);
|
||||
|
||||
if (!ldapSettings.EnableLdapAuthentication)
|
||||
{
|
||||
var cronSettings = await settingsManager.LoadAsync<LdapCronSettings>(tenant.Id);
|
||||
cronSettings.Cron = "";
|
||||
await settingsManager.SaveAsync(cronSettings, tenant.Id);
|
||||
UnregisterAutoSync(tenant);
|
||||
return;
|
||||
}
|
||||
|
||||
await _ldapSaveSyncOperation.RunJobAsync(ldapSettings, tenant, LdapOperationType.Sync);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LdapNotifyHelperExtension
|
||||
{
|
||||
public static void Register(DIHelper services)
|
||||
{
|
||||
services.TryAdd<DbHelper>();
|
||||
services.TryAdd<LdapNotifySource>();
|
||||
services.TryAdd<NotifyEngineQueue>();
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
|
||||
[Scope]
|
||||
public class LdapNotifySource : INotifySource
|
||||
{
|
||||
private Tenant _tenant;
|
||||
private readonly LdapNotifyService _ldapNotifyHelper;
|
||||
|
||||
public string Id
|
||||
{
|
||||
get { return "asc.activedirectory." + _tenant.Id; }
|
||||
}
|
||||
|
||||
public LdapNotifySource(LdapNotifyService ldapNotifyHelper)
|
||||
{
|
||||
_ldapNotifyHelper = ldapNotifyHelper;
|
||||
}
|
||||
|
||||
public void Init(Tenant tenant)
|
||||
{
|
||||
_tenant = tenant;
|
||||
}
|
||||
|
||||
public async Task AutoSyncAsync(DateTime date)
|
||||
{
|
||||
await _ldapNotifyHelper.AutoSyncAsync(_tenant);
|
||||
}
|
||||
|
||||
public IActionProvider GetActionProvider()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IPatternProvider GetPatternProvider()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IRecipientProvider GetRecipientsProvider()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ISubscriptionProvider GetSubscriptionProvider()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
@ -1,934 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using Constants = ASC.Core.Users.Constants;
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
[Scope]
|
||||
public class LdapUserImporter : IDisposable
|
||||
{
|
||||
public List<LdapObject> AllDomainUsers { get; private set; }
|
||||
public List<LdapObject> AllDomainGroups { get; private set; }
|
||||
|
||||
public Dictionary<LdapObject, LdapSettingsStatus> AllSkipedDomainUsers { get; private set; }
|
||||
public Dictionary<LdapObject, LdapSettingsStatus> AllSkipedDomainGroups { get; private set; }
|
||||
|
||||
private string _ldapDomain;
|
||||
private readonly string _unknownDomain;
|
||||
public string LDAPDomain
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_ldapDomain))
|
||||
{
|
||||
return _ldapDomain;
|
||||
}
|
||||
|
||||
_ldapDomain = LoadLDAPDomain();
|
||||
|
||||
if (string.IsNullOrEmpty(_ldapDomain))
|
||||
{
|
||||
_ldapDomain = _unknownDomain;
|
||||
}
|
||||
|
||||
return _ldapDomain;
|
||||
}
|
||||
}
|
||||
public List<string> PrimaryGroupIds { get; set; }
|
||||
|
||||
public LdapSettings Settings
|
||||
{
|
||||
get { return LdapHelper.Settings; }
|
||||
}
|
||||
|
||||
public LdapHelper LdapHelper { get; private set; }
|
||||
public LdapLocalization Resource { get; private set; }
|
||||
|
||||
private List<string> _watchedNestedGroups;
|
||||
|
||||
private readonly ILogger<LdapUserImporter> _logger;
|
||||
private readonly LdapObjectExtension _ldapObjectExtension;
|
||||
|
||||
private UserManager UserManager { get; set; }
|
||||
|
||||
public LdapUserImporter(
|
||||
ILogger<LdapUserImporter> logger,
|
||||
UserManager userManager,
|
||||
IConfiguration configuration,
|
||||
NovellLdapHelper novellLdapHelper,
|
||||
LdapObjectExtension ldapObjectExtension)
|
||||
{
|
||||
_unknownDomain = configuration["ldap:domain"] ?? "LDAP";
|
||||
AllDomainUsers = new List<LdapObject>();
|
||||
AllDomainGroups = new List<LdapObject>();
|
||||
AllSkipedDomainUsers = new Dictionary<LdapObject, LdapSettingsStatus>();
|
||||
AllSkipedDomainGroups = new Dictionary<LdapObject, LdapSettingsStatus>();
|
||||
|
||||
LdapHelper = novellLdapHelper;
|
||||
_logger = logger;
|
||||
UserManager = userManager;
|
||||
|
||||
_watchedNestedGroups = new List<string>();
|
||||
_ldapObjectExtension = ldapObjectExtension;
|
||||
}
|
||||
|
||||
public void Init(LdapSettings settings, LdapLocalization resource)
|
||||
{
|
||||
((NovellLdapHelper)LdapHelper).Init(settings);
|
||||
Resource = resource;
|
||||
}
|
||||
|
||||
public async Task<List<UserInfo>> GetDiscoveredUsersByAttributesAsync()
|
||||
{
|
||||
var users = new List<UserInfo>();
|
||||
|
||||
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
var usersToAdd = await AllDomainUsers.ToAsyncEnumerable().SelectAwait(async ldapObject => await _ldapObjectExtension.ToUserInfoAsync(ldapObject, this)).ToListAsync();
|
||||
|
||||
users.AddRange(usersToAdd);
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
public List<GroupInfo> GetDiscoveredGroupsByAttributes()
|
||||
{
|
||||
if (!Settings.GroupMembership)
|
||||
{
|
||||
return new List<GroupInfo>();
|
||||
}
|
||||
|
||||
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
|
||||
{
|
||||
return new List<GroupInfo>();
|
||||
}
|
||||
|
||||
var groups = new List<GroupInfo>();
|
||||
|
||||
var groupsToAdd = AllDomainGroups.ConvertAll(g => _ldapObjectExtension.ToGroupInfo(g, Settings));
|
||||
|
||||
groups.AddRange(groupsToAdd);
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
public async Task<List<UserInfo>> GetGroupUsersAsync(GroupInfo groupInfo)
|
||||
{
|
||||
return await GetGroupUsersAsync(groupInfo, true);
|
||||
}
|
||||
|
||||
private async Task<List<UserInfo>> GetGroupUsersAsync(GroupInfo groupInfo, bool clearCache)
|
||||
{
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
_logger.DebugGetGroupUsers(groupInfo.Name);
|
||||
|
||||
var users = new List<UserInfo>();
|
||||
|
||||
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
var domainGroup = AllDomainGroups.FirstOrDefault(lg => lg.Sid.Equals(groupInfo.Sid));
|
||||
|
||||
if (domainGroup == null)
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
var members = _ldapObjectExtension.GetAttributes(domainGroup, Settings.GroupAttribute);
|
||||
|
||||
foreach (var member in members)
|
||||
{
|
||||
var ldapUser = FindUserByMember(member);
|
||||
|
||||
if (ldapUser == null)
|
||||
{
|
||||
var nestedLdapGroup = FindGroupByMember(member);
|
||||
|
||||
if (nestedLdapGroup != null)
|
||||
{
|
||||
_logger.DebugFoundNestedLdapGroup(nestedLdapGroup.DistinguishedName);
|
||||
|
||||
if (clearCache)
|
||||
{
|
||||
_watchedNestedGroups = new List<string>();
|
||||
}
|
||||
|
||||
if (_watchedNestedGroups.Contains(nestedLdapGroup.DistinguishedName))
|
||||
{
|
||||
_logger.DebugSkipAlreadyWatched(nestedLdapGroup.DistinguishedName);
|
||||
continue;
|
||||
}
|
||||
|
||||
_watchedNestedGroups.Add(nestedLdapGroup.DistinguishedName);
|
||||
|
||||
var nestedGroupInfo = _ldapObjectExtension.ToGroupInfo(nestedLdapGroup, Settings);
|
||||
|
||||
var nestedGroupUsers = await GetGroupUsersAsync(nestedGroupInfo, false);
|
||||
|
||||
foreach (var groupUser in nestedGroupUsers)
|
||||
{
|
||||
if (!users.Exists(u => u.Sid == groupUser.Sid))
|
||||
{
|
||||
users.Add(groupUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
var userInfo = await _ldapObjectExtension.ToUserInfoAsync(ldapUser, this);
|
||||
|
||||
if (!users.Exists(u => u.Sid == userInfo.Sid))
|
||||
{
|
||||
users.Add(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (PrimaryGroupIds != null && PrimaryGroupIds.Any(id => domainGroup.Sid.EndsWith("-" + id)))
|
||||
{
|
||||
// Domain Users found
|
||||
var ldapUsers = FindUsersByPrimaryGroup(domainGroup.Sid);
|
||||
|
||||
foreach (var ldapUser in ldapUsers)
|
||||
{
|
||||
var userInfo = await _ldapObjectExtension.ToUserInfoAsync(ldapUser, this);
|
||||
|
||||
if (!users.Exists(u => u.Sid == userInfo.Sid))
|
||||
{
|
||||
users.Add(userInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
const string GROUP_MEMBERSHIP = "groupMembership";
|
||||
|
||||
private IEnumerable<LdapObject> GetLdapUserGroups(LdapObject ldapUser)
|
||||
{
|
||||
var ldapUserGroups = new List<LdapObject>();
|
||||
try
|
||||
{
|
||||
if (!Settings.GroupMembership)
|
||||
{
|
||||
return ldapUserGroups;
|
||||
}
|
||||
|
||||
if (ldapUser == null ||
|
||||
string.IsNullOrEmpty(ldapUser.Sid))
|
||||
{
|
||||
return ldapUserGroups;
|
||||
}
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
var userGroups = _ldapObjectExtension.GetAttributes(ldapUser, LdapConstants.ADSchemaAttributes.MEMBER_OF)
|
||||
.Select(s => LdapUtils.UnescapeLdapString(s))
|
||||
.ToList();
|
||||
|
||||
if (!userGroups.Any())
|
||||
{
|
||||
userGroups = _ldapObjectExtension.GetAttributes(ldapUser, GROUP_MEMBERSHIP);
|
||||
}
|
||||
|
||||
var searchExpressions = new List<Expression>();
|
||||
|
||||
var primaryGroupId = ldapUser.GetValue(LdapConstants.ADSchemaAttributes.PRIMARY_GROUP_ID) as string;
|
||||
|
||||
if (!string.IsNullOrEmpty(primaryGroupId))
|
||||
{
|
||||
var userSid = ldapUser.Sid;
|
||||
var index = userSid.LastIndexOf("-", StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
if (index > -1)
|
||||
{
|
||||
var primaryGroupSid = userSid.Substring(0, index + 1) + primaryGroupId;
|
||||
searchExpressions.Add(Expression.Equal(ldapUser.SidAttribute, primaryGroupSid));
|
||||
}
|
||||
}
|
||||
|
||||
if (userGroups.Any())
|
||||
{
|
||||
var cnRegex = new Regex(",[A-z]{2}=");
|
||||
searchExpressions.AddRange(userGroups
|
||||
.Select(g => g.Substring(0, cnRegex.Match(g).Index))
|
||||
.Where(s => !string.IsNullOrEmpty(s))
|
||||
.Select(Expression.Parse)
|
||||
.Where(e => e != null));
|
||||
|
||||
var criteria = Criteria.Any(searchExpressions.ToArray());
|
||||
|
||||
var foundList = LdapHelper.GetGroups(criteria);
|
||||
|
||||
if (foundList.Any())
|
||||
{
|
||||
ldapUserGroups.AddRange(foundList);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var ldapGroups = LdapHelper.GetGroups();
|
||||
|
||||
ldapUserGroups.AddRange(
|
||||
ldapGroups.Where(
|
||||
ldapGroup =>
|
||||
LdapHelper.UserExistsInGroup(ldapGroup, ldapUser, Settings)));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ldapUser != null)
|
||||
{
|
||||
_logger.ErrorIsUserExistInGroups(ldapUser.DistinguishedName, ldapUser.Sid, ex);
|
||||
}
|
||||
}
|
||||
|
||||
return ldapUserGroups;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<GroupInfo>> GetAndCheckCurrentGroupsAsync(LdapObject ldapUser, IEnumerable<GroupInfo> portalGroups)
|
||||
{
|
||||
var result = new List<GroupInfo>();
|
||||
try
|
||||
{
|
||||
var searchExpressions = new List<Expression>();
|
||||
if (portalGroups != null && portalGroups.Any())
|
||||
{
|
||||
searchExpressions.AddRange(portalGroups.Select(g => Expression.Equal(LdapConstants.ADSchemaAttributes.OBJECT_SID, g.Sid)));
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var criteria = Criteria.Any(searchExpressions.ToArray());
|
||||
var foundList = LdapHelper.GetGroups(criteria);
|
||||
|
||||
if (foundList.Any())
|
||||
{
|
||||
var stillExistingGroups = portalGroups.Where(g => foundList.Any(fg => fg.Sid == g.Sid));
|
||||
|
||||
foreach (var group in stillExistingGroups)
|
||||
{
|
||||
if ((await GetGroupUsersAsync(group)).Any(u => u.Sid == ldapUser.Sid))
|
||||
{
|
||||
result.Add(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ldapUser != null)
|
||||
{
|
||||
_logger.ErrorGetAndCheckCurrentGroups(ldapUser.DistinguishedName, ldapUser.Sid, ex);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<bool> TrySyncUserGroupMembership(Tuple<UserInfo, LdapObject> ldapUserInfo)
|
||||
{
|
||||
if (ldapUserInfo == null ||
|
||||
!Settings.GroupMembership)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var userInfo = ldapUserInfo.Item1;
|
||||
var ldapUser = ldapUserInfo.Item2;
|
||||
|
||||
var portalUserLdapGroups =
|
||||
(await UserManager.GetUserGroupsAsync(userInfo.Id, IncludeType.All))
|
||||
.Where(g => !string.IsNullOrEmpty(g.Sid))
|
||||
.ToList();
|
||||
|
||||
var ldapUserGroupList = new List<LdapObject>();
|
||||
|
||||
ldapUserGroupList.AddRange(GetLdapUserGroups(ldapUser));
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
var actualPortalLdapGroups = (await GetAndCheckCurrentGroupsAsync(ldapUser, portalUserLdapGroups)).ToList();
|
||||
|
||||
foreach (var ldapUserGroup in ldapUserGroupList)
|
||||
{
|
||||
var groupInfo = await UserManager.GetGroupInfoBySidAsync(ldapUserGroup.Sid);
|
||||
|
||||
if (Equals(groupInfo, Constants.LostGroupInfo))
|
||||
{
|
||||
_logger.DebugTrySyncUserGroupMembershipCreatingPortalGroup(ldapUserGroup.DistinguishedName, ldapUserGroup.Sid);
|
||||
groupInfo = await UserManager.SaveGroupInfoAsync(_ldapObjectExtension.ToGroupInfo(ldapUserGroup, Settings));
|
||||
|
||||
_logger.DebugTrySyncUserGroupMembershipAddingUserToGroup(userInfo.UserName, ldapUser.Sid, groupInfo.Name, groupInfo.Sid);
|
||||
await UserManager.AddUserIntoGroupAsync(userInfo.Id, groupInfo.ID);
|
||||
}
|
||||
else if (!portalUserLdapGroups.Contains(groupInfo))
|
||||
{
|
||||
_logger.DebugTrySyncUserGroupMembershipAddingUserToGroup(userInfo.UserName, ldapUser.Sid, groupInfo.Name, groupInfo.Sid);
|
||||
await UserManager.AddUserIntoGroupAsync(userInfo.Id, groupInfo.ID);
|
||||
}
|
||||
|
||||
actualPortalLdapGroups.Add(groupInfo);
|
||||
}
|
||||
|
||||
foreach (var portalUserLdapGroup in portalUserLdapGroups)
|
||||
{
|
||||
if (!actualPortalLdapGroups.Contains(portalUserLdapGroup))
|
||||
{
|
||||
_logger.DebugTrySyncUserGroupMembershipRemovingUserFromGroup(userInfo.UserName, ldapUser.Sid, portalUserLdapGroup.Name, portalUserLdapGroup.Sid);
|
||||
await UserManager.RemoveUserFromGroupAsync(userInfo.Id, portalUserLdapGroup.ID);
|
||||
}
|
||||
}
|
||||
|
||||
return actualPortalLdapGroups.Count != 0;
|
||||
}
|
||||
|
||||
public bool TryLoadLDAPUsers()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Settings.EnableLdapAuthentication)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
var users = LdapHelper.GetUsers();
|
||||
|
||||
foreach (var user in users)
|
||||
{
|
||||
if (string.IsNullOrEmpty(user.Sid))
|
||||
{
|
||||
AllSkipedDomainUsers.Add(user, LdapSettingsStatus.WrongSidAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!CheckLoginAttribute(user, Settings.LoginAttribute))
|
||||
{
|
||||
AllSkipedDomainUsers.Add(user, LdapSettingsStatus.WrongLoginAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Settings.GroupMembership)
|
||||
{
|
||||
AllDomainUsers.Add(user);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Settings.UserAttribute.Equals(LdapConstants.RfcLDAPAttributes.DN,
|
||||
StringComparison.InvariantCultureIgnoreCase) && !CheckUserAttribute(user, Settings.UserAttribute))
|
||||
{
|
||||
AllSkipedDomainUsers.Add(user, LdapSettingsStatus.WrongUserAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
AllDomainUsers.Add(user);
|
||||
}
|
||||
|
||||
if (AllDomainUsers.Any())
|
||||
{
|
||||
PrimaryGroupIds = AllDomainUsers.Select(u => u.GetValue(LdapConstants.ADSchemaAttributes.PRIMARY_GROUP_ID)).Cast<string>()
|
||||
.Distinct().ToList();
|
||||
}
|
||||
|
||||
return AllDomainUsers.Any() || !users.Any();
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
_logger.ErrorTryLoadLDAPUsersIncorrectUserFilter(Settings.UserFilter);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryLoadLDAPGroups()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Settings.EnableLdapAuthentication || !Settings.GroupMembership)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
var groups = LdapHelper.GetGroups();
|
||||
|
||||
foreach (var group in groups)
|
||||
{
|
||||
if (string.IsNullOrEmpty(group.Sid))
|
||||
{
|
||||
AllSkipedDomainGroups.Add(group, LdapSettingsStatus.WrongSidAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!CheckGroupAttribute(group, Settings.GroupAttribute))
|
||||
{
|
||||
AllSkipedDomainGroups.Add(group, LdapSettingsStatus.WrongGroupAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!CheckGroupNameAttribute(group, Settings.GroupNameAttribute))
|
||||
{
|
||||
AllSkipedDomainGroups.Add(group, LdapSettingsStatus.WrongGroupNameAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
AllDomainGroups.Add(group);
|
||||
}
|
||||
|
||||
return AllDomainGroups.Any() || !groups.Any();
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
_logger.ErrorTryLoadLDAPUsersIncorrectGroupFilter(Settings.GroupFilter);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private string LoadLDAPDomain()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Settings.EnableLdapAuthentication)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
string ldapDomain;
|
||||
|
||||
if (AllDomainUsers.Any())
|
||||
{
|
||||
ldapDomain = _ldapObjectExtension.GetDomainFromDn(AllDomainUsers.First());
|
||||
|
||||
if (!string.IsNullOrEmpty(ldapDomain))
|
||||
{
|
||||
return ldapDomain;
|
||||
}
|
||||
}
|
||||
|
||||
ldapDomain = LdapHelper.SearchDomain();
|
||||
|
||||
if (!string.IsNullOrEmpty(ldapDomain))
|
||||
{
|
||||
return ldapDomain;
|
||||
}
|
||||
|
||||
ldapDomain = LdapUtils.DistinguishedNameToDomain(Settings.UserDN);
|
||||
|
||||
if (!string.IsNullOrEmpty(ldapDomain))
|
||||
{
|
||||
return ldapDomain;
|
||||
}
|
||||
|
||||
ldapDomain = LdapUtils.DistinguishedNameToDomain(Settings.GroupDN);
|
||||
|
||||
if (!string.IsNullOrEmpty(ldapDomain))
|
||||
{
|
||||
return ldapDomain;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorLoadLDAPDomain(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected bool CheckLoginAttribute(LdapObject user, string loginAttribute)
|
||||
{
|
||||
try
|
||||
{
|
||||
var member = user.GetValue(loginAttribute);
|
||||
if (member == null || string.IsNullOrWhiteSpace(member.ToString()))
|
||||
{
|
||||
_logger.DebugLoginAttributeParameterNotFound(Settings.LoginAttribute, user.DistinguishedName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorLoginAttributeParameterNotFound(Settings.LoginAttribute, loginAttribute, e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CheckUserAttribute(LdapObject user, string userAttr)
|
||||
{
|
||||
try
|
||||
{
|
||||
var userAttribute = user.GetValue(userAttr);
|
||||
if (userAttribute == null || string.IsNullOrWhiteSpace(userAttribute.ToString()))
|
||||
{
|
||||
_logger.DebugUserAttributeParameterNotFound(Settings.UserAttribute,
|
||||
user.DistinguishedName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorUserAttributeParameterNotFound(Settings.UserAttribute, userAttr, e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CheckGroupAttribute(LdapObject group, string groupAttr)
|
||||
{
|
||||
try
|
||||
{
|
||||
group.GetValue(groupAttr); // Group attribute can be empty - example => Domain users
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorGroupAttributeParameterNotFound(Settings.GroupAttribute, groupAttr, e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool CheckGroupNameAttribute(LdapObject group, string groupAttr)
|
||||
{
|
||||
try
|
||||
{
|
||||
var groupNameAttribute = group.GetValues(groupAttr);
|
||||
if (!groupNameAttribute.Any())
|
||||
{
|
||||
_logger.DebugGroupNameAttributeParameterNotFound(Settings.GroupNameAttribute,
|
||||
groupAttr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorGroupAttributeParameterNotFound(Settings.GroupNameAttribute,
|
||||
groupAttr, e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private List<LdapObject> FindUsersByPrimaryGroup(string sid)
|
||||
{
|
||||
_logger.DebugFindUsersByPrimaryGroup();
|
||||
|
||||
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return
|
||||
AllDomainUsers.Where(
|
||||
lu =>
|
||||
{
|
||||
var primaryGroupId = lu.GetValue(LdapConstants.ADSchemaAttributes.PRIMARY_GROUP_ID) as string;
|
||||
|
||||
return !string.IsNullOrEmpty(primaryGroupId) &&
|
||||
sid.EndsWith(primaryGroupId);
|
||||
})
|
||||
.ToList();
|
||||
|
||||
}
|
||||
|
||||
private LdapObject FindUserByMember(string userAttributeValue)
|
||||
{
|
||||
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
_logger.DebugFindUserByMember(userAttributeValue);
|
||||
|
||||
return AllDomainUsers.FirstOrDefault(u =>
|
||||
u.DistinguishedName.Equals(userAttributeValue, StringComparison.InvariantCultureIgnoreCase)
|
||||
|| Convert.ToString(u.GetValue(Settings.UserAttribute)).Equals(userAttributeValue,
|
||||
StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
private LdapObject FindGroupByMember(string member)
|
||||
{
|
||||
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
_logger.DebugFindGroupByMember(member);
|
||||
|
||||
return AllDomainGroups.FirstOrDefault(g =>
|
||||
g.DistinguishedName.Equals(member, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public async Task<List<Tuple<UserInfo, LdapObject>>> FindLdapUsersAsync(string login)
|
||||
{
|
||||
var listResults = new List<Tuple<UserInfo, LdapObject>>();
|
||||
|
||||
var ldapLogin = LdapLogin.ParseLogin(login);
|
||||
|
||||
if (ldapLogin == null)
|
||||
{
|
||||
return listResults;
|
||||
}
|
||||
|
||||
if (!LdapHelper.IsConnected)
|
||||
{
|
||||
LdapHelper.Connect();
|
||||
}
|
||||
|
||||
var exps = new List<Expression> { Expression.Equal(Settings.LoginAttribute, ldapLogin.Username) };
|
||||
|
||||
if (!ldapLogin.Username.Equals(login) && ldapLogin.ToString().Equals(login))
|
||||
{
|
||||
exps.Add(Expression.Equal(Settings.LoginAttribute, login));
|
||||
}
|
||||
|
||||
string email = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(Settings.MailAttribute) && !string.IsNullOrEmpty(ldapLogin.Domain) && login.Contains("@"))
|
||||
{
|
||||
email = ldapLogin.ToString();
|
||||
exps.Add(Expression.Equal(Settings.MailAttribute, email));
|
||||
}
|
||||
|
||||
var searchTerm = exps.Count > 1 ? Criteria.Any(exps.ToArray()).ToString() : exps.First().ToString();
|
||||
|
||||
var users = await LdapHelper.GetUsers(searchTerm, !string.IsNullOrEmpty(email) ? -1 : 1).ToAsyncEnumerable()
|
||||
.Where(user => user != null)
|
||||
.ToLookupAwaitAsync(async lu =>
|
||||
{
|
||||
var ui = Constants.LostUser;
|
||||
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(_ldapDomain))
|
||||
{
|
||||
_ldapDomain = LdapUtils.DistinguishedNameToDomain(lu.DistinguishedName);
|
||||
}
|
||||
|
||||
ui = await _ldapObjectExtension.ToUserInfoAsync(lu, this);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorToUserInfo(ex);
|
||||
}
|
||||
|
||||
return Tuple.Create(ui, lu);
|
||||
|
||||
});
|
||||
|
||||
if (!users.Any())
|
||||
{
|
||||
return listResults;
|
||||
}
|
||||
|
||||
foreach (var user in users)
|
||||
{
|
||||
var ui = user.Key.Item1;
|
||||
|
||||
if (ui.Equals(Constants.LostUser))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var ul = user.Key.Item2;
|
||||
|
||||
var ldapLoginAttribute = ul.GetValue(Settings.LoginAttribute) as string;
|
||||
|
||||
if (string.IsNullOrEmpty(ldapLoginAttribute))
|
||||
{
|
||||
_logger.WarnLoginAttributeIsEmpty(ul.DistinguishedName, Settings.LoginAttribute);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ldapLoginAttribute.Equals(login))
|
||||
{
|
||||
listResults.Add(user.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(email))
|
||||
{
|
||||
if (ui.Email.Equals(email, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
listResults.Add(user.Key);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (LdapUtils.IsLoginAccepted(ldapLogin, ui, LDAPDomain))
|
||||
{
|
||||
listResults.Add(user.Key);
|
||||
}
|
||||
}
|
||||
|
||||
return listResults;
|
||||
}
|
||||
|
||||
public List<LdapObject> FindUsersByAttribute(string key, string value, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
|
||||
{
|
||||
var users = new List<LdapObject>();
|
||||
|
||||
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
return users.Where(us => !us.IsDisabled && string.Equals((string)us.GetValue(key), value, comparison)).ToList();
|
||||
}
|
||||
|
||||
public List<LdapObject> FindUsersByAttribute(string key, IEnumerable<string> value, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
|
||||
{
|
||||
var users = new List<LdapObject>();
|
||||
|
||||
if (!AllDomainUsers.Any() && !TryLoadLDAPUsers())
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
return AllDomainUsers.Where(us => !us.IsDisabled && value.Any(val => string.Equals(val, (string)us.GetValue(key), comparison))).ToList();
|
||||
}
|
||||
|
||||
public List<LdapObject> FindGroupsByAttribute(string key, string value, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
|
||||
{
|
||||
var gr = new List<LdapObject>();
|
||||
|
||||
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
|
||||
{
|
||||
return gr;
|
||||
}
|
||||
|
||||
return gr.Where(g => !g.IsDisabled && string.Equals((string)g.GetValue(key), value, comparison)).ToList();
|
||||
}
|
||||
|
||||
public List<LdapObject> FindGroupsByAttribute(string key, IEnumerable<string> value, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
|
||||
{
|
||||
var gr = new List<LdapObject>();
|
||||
|
||||
if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
|
||||
{
|
||||
return gr;
|
||||
}
|
||||
|
||||
return AllDomainGroups.Where(g => !g.IsDisabled && value.Any(val => string.Equals(val, (string)g.GetValue(key), comparison))).ToList();
|
||||
}
|
||||
|
||||
public async Task<Tuple<UserInfo, LdapObject>> LoginAsync(string login, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var ldapUsers = await FindLdapUsersAsync(login);
|
||||
|
||||
_logger.DebugFindLdapUsers(login, ldapUsers.Count);
|
||||
|
||||
foreach (var ldapUser in ldapUsers)
|
||||
{
|
||||
string currentLogin = null;
|
||||
try
|
||||
{
|
||||
var ldapUserInfo = ldapUser.Item1;
|
||||
var ldapUserObject = ldapUser.Item2;
|
||||
|
||||
if (ldapUserInfo.Equals(Constants.LostUser)
|
||||
|| ldapUserObject == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (string.IsNullOrEmpty(ldapUserObject.DistinguishedName)
|
||||
|| string.IsNullOrEmpty(ldapUserObject.Sid))
|
||||
{
|
||||
_logger.DebugLdapUserImporterFailed(login, ldapUserObject.Sid);
|
||||
continue;
|
||||
}
|
||||
|
||||
currentLogin = ldapUserObject.DistinguishedName;
|
||||
|
||||
_logger.DebugLdapUserImporterLogin(currentLogin);
|
||||
|
||||
LdapHelper.CheckCredentials(currentLogin, password, Settings.Server,
|
||||
Settings.PortNumber, Settings.StartTls, Settings.Ssl, Settings.AcceptCertificate,
|
||||
Settings.AcceptCertificateHash);
|
||||
|
||||
return new Tuple<UserInfo, LdapObject>(ldapUserInfo, ldapUserObject);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorLdapUserImporterLoginFailed(currentLogin ?? login, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorLdapUserImporterLoginFailed(login, ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (LdapHelper != null)
|
||||
{
|
||||
LdapHelper.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base;
|
||||
|
||||
public static class NotifyConstants
|
||||
{
|
||||
public static string TagUserName = "UserName";
|
||||
public static string TagUserEmail = "UserEmail";
|
||||
public static string TagMyStaffLink = "MyStaffLink";
|
||||
|
||||
public static INotifyAction ActionLdapActivation = new NotifyAction("user_ldap_activation");
|
||||
|
||||
public static ITagValue TagGreenButton(string btnText, string btnUrl)
|
||||
{
|
||||
Func<string> action = () =>
|
||||
{
|
||||
return
|
||||
string.Format(@"<table style=""height: 48px; width: 540px; border-collapse: collapse; empty-cells: show; vertical-align: middle; text-align: center; margin: 30px auto; padding: 0;""><tbody><tr cellpadding=""0"" cellspacing=""0"" border=""0"">{2}<td style=""height: 48px; width: 380px; margin:0; padding:0; background-color: #66b76d; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px;""><a style=""{3}"" target=""_blank"" href=""{0}"">{1}</a></td>{2}</tr></tbody></table>",
|
||||
btnUrl,
|
||||
btnText,
|
||||
"<td style=\"height: 48px; width: 80px; margin:0; padding:0;\"> </td>",
|
||||
"color: #fff; font-family: Helvetica, Arial, Tahoma; font-size: 18px; font-weight: 600; vertical-align: middle; display: block; padding: 12px 0; text-align: center; text-decoration: none; background-color: #66b76d;");
|
||||
};
|
||||
return new TagActionValue("GreenButton", action);
|
||||
}
|
||||
|
||||
private class TagActionValue : ITagValue
|
||||
{
|
||||
private readonly Func<string> action;
|
||||
|
||||
public string Tag
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public object Value
|
||||
{
|
||||
get { return action(); }
|
||||
}
|
||||
|
||||
public TagActionValue(string name, Func<string> action)
|
||||
{
|
||||
Tag = name;
|
||||
this.action = action;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class NotifyCommonTags
|
||||
{
|
||||
public static string Footer = "Footer";
|
||||
|
||||
public static string MasterTemplate = "MasterTemplate";
|
||||
|
||||
public static string WithoutUnsubscribe = "WithoutUnsubscribe";
|
||||
}
|
@ -1,526 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
[Scope]
|
||||
[Serializable]
|
||||
public class LdapSettings : ISettings<LdapSettings>, ICloneable
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{197149b3-fbc9-44c2-b42a-232f7e729c16}"); }
|
||||
}
|
||||
|
||||
public LdapSettings()
|
||||
{
|
||||
LdapMapping = new Dictionary<MappingFields, string>();
|
||||
AccessRights = new Dictionary<AccessRight, string>();
|
||||
}
|
||||
|
||||
/// <summary>LDAP settings mapping</summary>
|
||||
public enum MappingFields
|
||||
{
|
||||
FirstNameAttribute,
|
||||
SecondNameAttribute,
|
||||
BirthDayAttribute,
|
||||
GenderAttribute,
|
||||
MobilePhoneAttribute,
|
||||
MailAttribute,
|
||||
TitleAttribute,
|
||||
LocationAttribute,
|
||||
AvatarAttribute,
|
||||
|
||||
AdditionalPhone,
|
||||
AdditionalMobilePhone,
|
||||
AdditionalMail,
|
||||
Skype,
|
||||
|
||||
UserQuotaLimit
|
||||
}
|
||||
|
||||
/// <summary>Accecss rights</summary>
|
||||
public enum AccessRight
|
||||
{
|
||||
FullAccess,
|
||||
Documents,
|
||||
Projects,
|
||||
CRM,
|
||||
Community,
|
||||
People,
|
||||
Mail
|
||||
}
|
||||
|
||||
public static readonly Dictionary<AccessRight, Guid> AccessRightsGuids = new Dictionary<AccessRight, Guid>()
|
||||
{
|
||||
{ AccessRight.FullAccess, Guid.Empty },
|
||||
{ AccessRight.Documents, WebItemManager.DocumentsProductID },
|
||||
{ AccessRight.Projects, WebItemManager.ProjectsProductID },
|
||||
{ AccessRight.CRM, WebItemManager.CRMProductID },
|
||||
{ AccessRight.Community, WebItemManager.CommunityProductID },
|
||||
{ AccessRight.People, WebItemManager.PeopleProductID },
|
||||
{ AccessRight.Mail, WebItemManager.MailProductID }
|
||||
};
|
||||
|
||||
public LdapSettings GetDefault()
|
||||
{
|
||||
var isNotWindows = !RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
|
||||
var settings = new LdapSettings()
|
||||
{
|
||||
Server = "",
|
||||
UserDN = "",
|
||||
PortNumber = LdapConstants.STANDART_LDAP_PORT,
|
||||
UserFilter = string.Format("({0}=*)",
|
||||
isNotWindows
|
||||
? LdapConstants.RfcLDAPAttributes.UID
|
||||
: LdapConstants.ADSchemaAttributes.USER_PRINCIPAL_NAME),
|
||||
LoginAttribute = isNotWindows
|
||||
? LdapConstants.RfcLDAPAttributes.UID
|
||||
: LdapConstants.ADSchemaAttributes.ACCOUNT_NAME,
|
||||
FirstNameAttribute = LdapConstants.ADSchemaAttributes.FIRST_NAME,
|
||||
SecondNameAttribute = LdapConstants.ADSchemaAttributes.SURNAME,
|
||||
MailAttribute = LdapConstants.ADSchemaAttributes.MAIL,
|
||||
TitleAttribute = LdapConstants.ADSchemaAttributes.TITLE,
|
||||
MobilePhoneAttribute = LdapConstants.ADSchemaAttributes.MOBILE,
|
||||
LocationAttribute = LdapConstants.ADSchemaAttributes.STREET,
|
||||
GroupDN = "",
|
||||
GroupFilter = string.Format("({0}={1})", LdapConstants.ADSchemaAttributes.OBJECT_CLASS,
|
||||
isNotWindows
|
||||
? LdapConstants.ObjectClassKnowedValues.POSIX_GROUP
|
||||
: LdapConstants.ObjectClassKnowedValues.GROUP),
|
||||
UserAttribute =
|
||||
isNotWindows
|
||||
? LdapConstants.RfcLDAPAttributes.UID
|
||||
: LdapConstants.ADSchemaAttributes.DISTINGUISHED_NAME,
|
||||
GroupAttribute = isNotWindows ? LdapConstants.RfcLDAPAttributes.MEMBER_UID : LdapConstants.ADSchemaAttributes.MEMBER,
|
||||
GroupNameAttribute = LdapConstants.ADSchemaAttributes.COMMON_NAME,
|
||||
Authentication = true,
|
||||
AcceptCertificate = false,
|
||||
AcceptCertificateHash = null,
|
||||
StartTls = false,
|
||||
Ssl = false,
|
||||
SendWelcomeEmail = false
|
||||
};
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var settings = obj as LdapSettings;
|
||||
|
||||
return settings != null
|
||||
&& EnableLdapAuthentication == settings.EnableLdapAuthentication
|
||||
&& StartTls == settings.StartTls
|
||||
&& Ssl == settings.Ssl
|
||||
&& SendWelcomeEmail == settings.SendWelcomeEmail
|
||||
&& (string.IsNullOrEmpty(Server)
|
||||
&& string.IsNullOrEmpty(settings.Server)
|
||||
|| Server == settings.Server)
|
||||
&& (string.IsNullOrEmpty(UserDN)
|
||||
&& string.IsNullOrEmpty(settings.UserDN)
|
||||
|| UserDN == settings.UserDN)
|
||||
&& PortNumber == settings.PortNumber
|
||||
&& UserFilter == settings.UserFilter
|
||||
&& LoginAttribute == settings.LoginAttribute
|
||||
&& LdapMapping.Count == settings.LdapMapping.Count
|
||||
&& LdapMapping.All(pair => settings.LdapMapping.ContainsKey(pair.Key)
|
||||
&& pair.Value == settings.LdapMapping[pair.Key])
|
||||
&& AccessRights.Count == settings.AccessRights.Count
|
||||
&& AccessRights.All(pair => settings.AccessRights.ContainsKey(pair.Key)
|
||||
&& pair.Value == settings.AccessRights[pair.Key])
|
||||
&& GroupMembership == settings.GroupMembership
|
||||
&& (string.IsNullOrEmpty(GroupDN)
|
||||
&& string.IsNullOrEmpty(settings.GroupDN)
|
||||
|| GroupDN == settings.GroupDN)
|
||||
&& GroupFilter == settings.GroupFilter
|
||||
&& UserAttribute == settings.UserAttribute
|
||||
&& GroupAttribute == settings.GroupAttribute
|
||||
&& (string.IsNullOrEmpty(Login)
|
||||
&& string.IsNullOrEmpty(settings.Login)
|
||||
|| Login == settings.Login)
|
||||
&& Authentication == settings.Authentication;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hash = 3;
|
||||
hash = (hash * 2) + EnableLdapAuthentication.GetHashCode();
|
||||
hash = (hash * 2) + StartTls.GetHashCode();
|
||||
hash = (hash * 2) + Ssl.GetHashCode();
|
||||
hash = (hash * 2) + SendWelcomeEmail.GetHashCode();
|
||||
hash = (hash * 2) + Server.GetHashCode();
|
||||
hash = (hash * 2) + UserDN.GetHashCode();
|
||||
hash = (hash * 2) + PortNumber.GetHashCode();
|
||||
hash = (hash * 2) + UserFilter.GetHashCode();
|
||||
hash = (hash * 2) + LoginAttribute.GetHashCode();
|
||||
hash = (hash * 2) + GroupMembership.GetHashCode();
|
||||
hash = (hash * 2) + GroupDN.GetHashCode();
|
||||
hash = (hash * 2) + GroupNameAttribute.GetHashCode();
|
||||
hash = (hash * 2) + GroupFilter.GetHashCode();
|
||||
hash = (hash * 2) + UserAttribute.GetHashCode();
|
||||
hash = (hash * 2) + GroupAttribute.GetHashCode();
|
||||
hash = (hash * 2) + Authentication.GetHashCode();
|
||||
hash = (hash * 2) + Login.GetHashCode();
|
||||
|
||||
foreach (var pair in LdapMapping)
|
||||
{
|
||||
hash = (hash * 2) + pair.Value.GetHashCode();
|
||||
}
|
||||
|
||||
foreach (var pair in AccessRights)
|
||||
{
|
||||
hash = (hash * 2) + pair.Value.GetHashCode();
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return MemberwiseClone();
|
||||
}
|
||||
|
||||
/// <summary>Specifies if the LDAP authentication is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool EnableLdapAuthentication { get; set; }
|
||||
|
||||
/// <summary>Specifies if the StartTLS is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool StartTls { get; set; }
|
||||
|
||||
/// <summary>Specifies if the SSL is enabled or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Ssl { get; set; }
|
||||
|
||||
/// <summary>Specifies if the welcome email is sent or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool SendWelcomeEmail { get; set; }
|
||||
|
||||
/// <summary>LDAP server URL address</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Server { get; set; }
|
||||
|
||||
/// <summary>Absolute path to the top level directory containing users for the import</summary>
|
||||
/// <type>System.String, System</type>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public string UserDN { get; set; }
|
||||
|
||||
/// <summary>Port number</summary>
|
||||
/// <type>System.Int32, System</type>
|
||||
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
|
||||
public int PortNumber { get; set; }
|
||||
|
||||
/// <summary>User filter value to import the users who correspond to the specified search criteria. The default filter value (uid=*) allows importing all users</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserFilter { get; set; }
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the login that LDAP server users will use to log in to ONLYOFFICE</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LoginAttribute { get; set; }
|
||||
|
||||
/// <summary>Correspondence between the user data fields on the portal and the attributes in the LDAP server user record</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.MappingFields, System.String}, System.Collections.Generic</type>
|
||||
public Dictionary<MappingFields, string> LdapMapping { get; set; }
|
||||
|
||||
/// <summary>Group access rights</summary>
|
||||
/// <type>System.Collections.Generic.Dictionary{ASC.ActiveDirectory.Base.Settings.AccessRight, System.String}, System.Collections.Generic</type>
|
||||
//ToDo: use SId instead of group name
|
||||
public Dictionary<AccessRight, string> AccessRights { get; set; }
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's first name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string FirstNameAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.FirstNameAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.FirstNameAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's second name</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string SecondNameAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.SecondNameAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.SecondNameAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's email address</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MailAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.MailAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.MailAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's title</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string TitleAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.TitleAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.TitleAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's mobile phone number</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string MobilePhoneAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.MobilePhoneAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.MobilePhoneAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Attribute in a user record that corresponds to the user's location</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string LocationAttribute
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetOldSetting(MappingFields.LocationAttribute);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetOldSetting(MappingFields.LocationAttribute, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies if the groups from the LDAP server are added to the portal or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool GroupMembership { get; set; }
|
||||
|
||||
/// <summary>The absolute path to the top level directory containing groups for the import</summary>
|
||||
/// <type>System.String, System</type>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public string GroupDN { get; set; }
|
||||
|
||||
/// <summary>Attribute that corresponds to a name of the group where the user is included</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupNameAttribute { get; set; }
|
||||
|
||||
/// <summary>Group filter value to import the groups who correspond to the specified search criteria. The default filter value (objectClass=posixGroup) allows importing all users</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupFilter { get; set; }
|
||||
|
||||
/// <summary>Attribute that determines whether this user is a member of the groups</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string UserAttribute { get; set; }
|
||||
|
||||
/// <summary>Attribute that specifies the users that the group includes</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string GroupAttribute { get; set; }
|
||||
|
||||
/// <summary>Specifies if the user has rights to read data from LDAP server or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool Authentication { get; set; }
|
||||
|
||||
/// <summary>Login</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Login { get; set; }
|
||||
|
||||
/// <summary>Password</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>Password bytes</summary>
|
||||
/// <type>System.Byte[], System</type>
|
||||
public byte[] PasswordBytes { get; set; }
|
||||
|
||||
/// <summary>Specifies if the default LDAP settings are used or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
/// <summary>Specifies if the certificate is accepted or not</summary>
|
||||
/// <type>System.Boolean, System</type>
|
||||
public bool AcceptCertificate { get; set; }
|
||||
|
||||
/// <summary>Hash that is used to accept a certificate</summary>
|
||||
/// <type>System.String, System</type>
|
||||
public string AcceptCertificateHash { get; set; }
|
||||
|
||||
private string GetOldSetting(MappingFields field)
|
||||
{
|
||||
if (LdapMapping == null)
|
||||
{
|
||||
LdapMapping = new Dictionary<MappingFields, string>();
|
||||
}
|
||||
|
||||
if (LdapMapping.ContainsKey(field))
|
||||
{
|
||||
return LdapMapping[field];
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
private void SetOldSetting(MappingFields field, string value)
|
||||
{
|
||||
if (LdapMapping == null)
|
||||
{
|
||||
LdapMapping = new Dictionary<MappingFields, string>();
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
if (LdapMapping.ContainsKey(field))
|
||||
{
|
||||
LdapMapping.Remove(field);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (LdapMapping.ContainsKey(field))
|
||||
{
|
||||
LdapMapping[field] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
LdapMapping.Add(field, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Scope]
|
||||
[Serializable]
|
||||
public class LdapCronSettings : ISettings<LdapCronSettings>
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{58C42C54-56CD-4BEF-A3ED-C60ACCF6E975}"); }
|
||||
}
|
||||
|
||||
public LdapCronSettings GetDefault()
|
||||
{
|
||||
return new LdapCronSettings()
|
||||
{
|
||||
Cron = null
|
||||
};
|
||||
}
|
||||
|
||||
public string Cron { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class LdapCurrentAcccessSettings : ISettings<LdapCurrentAcccessSettings>
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{134B5EAA-F612-4834-AEAB-34C90515EA4E}"); }
|
||||
}
|
||||
|
||||
public LdapCurrentAcccessSettings GetDefault()
|
||||
{
|
||||
return new LdapCurrentAcccessSettings() { CurrentAccessRights = null };
|
||||
}
|
||||
|
||||
public LdapCurrentAcccessSettings()
|
||||
{
|
||||
CurrentAccessRights = new Dictionary<LdapSettings.AccessRight, List<string>>();
|
||||
}
|
||||
|
||||
public Dictionary<LdapSettings.AccessRight, List<string>> CurrentAccessRights { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class LdapCurrentUserPhotos : ISettings<LdapCurrentUserPhotos>
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{50AE3C2B-0783-480F-AF30-679D0F0A2D3E}"); }
|
||||
}
|
||||
|
||||
public LdapCurrentUserPhotos GetDefault()
|
||||
{
|
||||
return new LdapCurrentUserPhotos() { CurrentPhotos = null };
|
||||
}
|
||||
|
||||
public LdapCurrentUserPhotos()
|
||||
{
|
||||
CurrentPhotos = new Dictionary<Guid, string>();
|
||||
}
|
||||
|
||||
public Dictionary<Guid, string> CurrentPhotos { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class LdapCurrentDomain : ISettings<LdapCurrentDomain>
|
||||
{
|
||||
[JsonIgnore]
|
||||
public Guid ID
|
||||
{
|
||||
get { return new Guid("{75A5F745-F697-4418-B38D-0FE0D277E258}"); }
|
||||
}
|
||||
|
||||
public LdapCurrentDomain GetDefault()
|
||||
{
|
||||
return new LdapCurrentDomain() { CurrentDomain = null };
|
||||
}
|
||||
|
||||
public string CurrentDomain { get; set; }
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Settings;
|
||||
public abstract class LdapSettingsChecker
|
||||
{
|
||||
protected readonly ILogger<LdapSettingsChecker> _logger;
|
||||
|
||||
public LdapUserImporter LdapImporter { get; private set; }
|
||||
|
||||
public LdapSettings Settings
|
||||
{
|
||||
get { return LdapImporter.Settings; }
|
||||
}
|
||||
|
||||
protected LdapSettingsChecker(ILogger<LdapSettingsChecker> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void Init(LdapUserImporter importer)
|
||||
{
|
||||
LdapImporter = importer;
|
||||
}
|
||||
|
||||
public abstract LdapSettingsStatus CheckSettings();
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.Base.Settings;
|
||||
public enum LdapSettingsStatus
|
||||
{
|
||||
Ok = 0,
|
||||
WrongServerOrPort = 1,
|
||||
WrongUserDn = 2,
|
||||
IncorrectLDAPFilter = 3,
|
||||
UsersNotFound = 4,
|
||||
WrongLoginAttribute = 5,
|
||||
WrongGroupDn = 6,
|
||||
IncorrectGroupLDAPFilter = 7,
|
||||
GroupsNotFound = 8,
|
||||
WrongGroupAttribute = 9,
|
||||
WrongUserAttribute = 10,
|
||||
WrongGroupNameAttribute = 11,
|
||||
CredentialsNotValid = 12,
|
||||
ConnectError = 13,
|
||||
StrongAuthRequired = 14,
|
||||
WrongSidAttribute = 15,
|
||||
CertificateRequest = 16,
|
||||
TlsNotSupported = 17,
|
||||
DomainNotFound = 18
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.ComplexOperations.Data;
|
||||
public class LdapChange
|
||||
{
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public LdapChangeAction Action { get; private set; }
|
||||
|
||||
public string Sid { get; private set; }
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string Email { get; private set; }
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public LdapChangeType Type { get; private set; }
|
||||
|
||||
public List<LdapItemChange> Changes { get; private set; }
|
||||
|
||||
public LdapChange(string sid, string name, LdapChangeType type, LdapChangeAction action,
|
||||
List<LdapItemChange> changes = null) : this(sid, name, null, type, action, changes)
|
||||
{
|
||||
}
|
||||
|
||||
public LdapChange(string sid, string name, string email, LdapChangeType type, LdapChangeAction action, List<LdapItemChange> changes = null)
|
||||
{
|
||||
Sid = sid;
|
||||
Name = name;
|
||||
Type = type;
|
||||
Action = action;
|
||||
Changes = changes ?? new List<LdapItemChange>();
|
||||
Email = email;
|
||||
}
|
||||
}
|
@ -1,219 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.ComplexOperations.Data;
|
||||
|
||||
[Scope]
|
||||
public class LdapChangeCollection : List<LdapChange>
|
||||
{
|
||||
private readonly UserFormatter _userFormatter;
|
||||
public LdapChangeCollection(UserFormatter userFormatter)
|
||||
{
|
||||
_userFormatter = userFormatter;
|
||||
}
|
||||
|
||||
#region User
|
||||
|
||||
public void SetSkipUserChange(UserInfo user)
|
||||
{
|
||||
var change = new LdapChange(user.Sid,
|
||||
_userFormatter.GetUserName(user, DisplayUserNameFormat.Default),
|
||||
user.Email,
|
||||
LdapChangeType.User, LdapChangeAction.Skip);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetSaveAsPortalUserChange(UserInfo user)
|
||||
{
|
||||
var fieldChanges = new List<LdapItemChange>
|
||||
{
|
||||
new LdapItemChange(LdapItemChangeKey.Sid, user.Sid, null)
|
||||
};
|
||||
|
||||
var change = new LdapChange(user.Sid,
|
||||
_userFormatter.GetUserName(user, DisplayUserNameFormat.Default),
|
||||
user.Email, LdapChangeType.User, LdapChangeAction.SaveAsPortal, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetNoneUserChange(UserInfo user)
|
||||
{
|
||||
var change = new LdapChange(user.Sid,
|
||||
_userFormatter.GetUserName(user, DisplayUserNameFormat.Default), user.Email,
|
||||
LdapChangeType.User, LdapChangeAction.None);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetUpdateUserChange(UserInfo beforeUserInfo, UserInfo afterUserInfo, ILogger log = null)
|
||||
{
|
||||
var fieldChanges =
|
||||
LdapUserMapping.Fields.Select(field => GetPropChange(field, beforeUserInfo, afterUserInfo, log))
|
||||
.Where(pch => pch != null)
|
||||
.ToList();
|
||||
|
||||
var change = new LdapChange(beforeUserInfo.Sid,
|
||||
_userFormatter.GetUserName(afterUserInfo, DisplayUserNameFormat.Default), afterUserInfo.Email,
|
||||
LdapChangeType.User, LdapChangeAction.Update, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetAddUserChange(UserInfo user, ILogger log = null)
|
||||
{
|
||||
var fieldChanges =
|
||||
LdapUserMapping.Fields.Select(field => GetPropChange(field, after: user, log: log))
|
||||
.Where(pch => pch != null)
|
||||
.ToList();
|
||||
|
||||
var change = new LdapChange(user.Sid,
|
||||
_userFormatter.GetUserName(user, DisplayUserNameFormat.Default), user.Email,
|
||||
LdapChangeType.User, LdapChangeAction.Add, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetRemoveUserChange(UserInfo user)
|
||||
{
|
||||
var change = new LdapChange(user.Sid,
|
||||
_userFormatter.GetUserName(user, DisplayUserNameFormat.Default), user.Email,
|
||||
LdapChangeType.User, LdapChangeAction.Remove);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Group
|
||||
|
||||
public void SetAddGroupChange(GroupInfo group, ILogger log = null)
|
||||
{
|
||||
var fieldChanges = new List<LdapItemChange>
|
||||
{
|
||||
new LdapItemChange(LdapItemChangeKey.Name, null, group.Name),
|
||||
new LdapItemChange(LdapItemChangeKey.Sid, null, group.Sid)
|
||||
};
|
||||
|
||||
var change = new LdapChange(group.Sid, group.Name,
|
||||
LdapChangeType.Group, LdapChangeAction.Add, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetAddGroupMembersChange(GroupInfo group,
|
||||
List<UserInfo> members)
|
||||
{
|
||||
var fieldChanges =
|
||||
members.Select(
|
||||
member =>
|
||||
new LdapItemChange(LdapItemChangeKey.Member, null,
|
||||
_userFormatter.GetUserName(member, DisplayUserNameFormat.Default))).ToList();
|
||||
|
||||
var change = new LdapChange(group.Sid, group.Name,
|
||||
LdapChangeType.Group, LdapChangeAction.AddMember, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetSkipGroupChange(GroupInfo group)
|
||||
{
|
||||
var change = new LdapChange(group.Sid, group.Name, LdapChangeType.Group,
|
||||
LdapChangeAction.Skip);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetUpdateGroupChange(GroupInfo group)
|
||||
{
|
||||
var fieldChanges = new List<LdapItemChange>
|
||||
{
|
||||
new LdapItemChange(LdapItemChangeKey.Name, group.Name, group.Name)
|
||||
};
|
||||
|
||||
var change = new LdapChange(group.Sid, group.Name,
|
||||
LdapChangeType.Group, LdapChangeAction.Update, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetRemoveGroupChange(GroupInfo group, ILogger log = null)
|
||||
{
|
||||
var change = new LdapChange(group.Sid, group.Name,
|
||||
LdapChangeType.Group, LdapChangeAction.Remove);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
public void SetRemoveGroupMembersChange(GroupInfo group,
|
||||
List<UserInfo> members)
|
||||
{
|
||||
var fieldChanges =
|
||||
members.Select(
|
||||
member =>
|
||||
new LdapItemChange(LdapItemChangeKey.Member, null,
|
||||
_userFormatter.GetUserName(member, DisplayUserNameFormat.Default))).ToList();
|
||||
|
||||
var change = new LdapChange(group.Sid, group.Name,
|
||||
LdapChangeType.Group, LdapChangeAction.RemoveMember, fieldChanges);
|
||||
|
||||
Add(change);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private static LdapItemChange GetPropChange(string propName, UserInfo before = null, UserInfo after = null, ILogger log = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var valueSrc = before != null
|
||||
? before.GetType().GetProperty(propName).GetValue(before, null) as string
|
||||
: "";
|
||||
var valueDst = after != null
|
||||
? after.GetType().GetProperty(propName).GetValue(before, null) as string
|
||||
: "";
|
||||
|
||||
LdapItemChangeKey key;
|
||||
if (!Enum.TryParse(propName, out key))
|
||||
{
|
||||
throw new InvalidEnumArgumentException(propName);
|
||||
}
|
||||
|
||||
var change = new LdapItemChange(key, valueSrc, valueDst);
|
||||
|
||||
return change;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (log != null)
|
||||
{
|
||||
log.ErrorCanNotGetSidProperty(propName, ex);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.ComplexOperations.Data;
|
||||
|
||||
public enum LdapChangeType
|
||||
{
|
||||
User,
|
||||
Group
|
||||
}
|
||||
|
||||
public enum LdapItemChangeKey
|
||||
{
|
||||
Sid,
|
||||
Name,
|
||||
FirstName,
|
||||
LastName,
|
||||
Mail,
|
||||
Phone,
|
||||
Title,
|
||||
Location,
|
||||
Member
|
||||
}
|
||||
|
||||
public enum LdapChangeAction
|
||||
{
|
||||
None,
|
||||
Skip,
|
||||
Add,
|
||||
AddMember,
|
||||
Merge,
|
||||
Update,
|
||||
Remove,
|
||||
RemoveMember,
|
||||
SaveAsPortal
|
||||
}
|
||||
|
||||
public static class LdapUserMapping
|
||||
{
|
||||
public static readonly List<string> Fields = new List<string>
|
||||
{
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.FirstName),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.LastName),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Mail),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Phone),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Title),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Location),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Sid),
|
||||
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Member)
|
||||
};
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
// (c) Copyright Ascensio System SIA 2010-2022
|
||||
//
|
||||
// This program is a free software product.
|
||||
// You can redistribute it and/or modify it under the terms
|
||||
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
|
||||
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
|
||||
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
|
||||
// any third-party rights.
|
||||
//
|
||||
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
|
||||
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
//
|
||||
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
|
||||
//
|
||||
// The interactive user interfaces in modified source and object code versions of the Program must
|
||||
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
|
||||
//
|
||||
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
|
||||
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
|
||||
// trademark law for use of our trademarks.
|
||||
//
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
namespace ASC.ActiveDirectory.ComplexOperations.Data;
|
||||
|
||||
public class LdapItemChange
|
||||
{
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public LdapItemChangeKey Key { get; private set; }
|
||||
|
||||
public string Before { get; private set; }
|
||||
public string After { get; private set; }
|
||||
|
||||
public bool IsChanged { get; private set; }
|
||||
|
||||
public LdapItemChange(LdapItemChangeKey key, string before, string after)
|
||||
{
|
||||
Key = key;
|
||||
Before = before;
|
||||
After = after;
|
||||
|
||||
IsChanged = Before != null && !Before.Equals(After) || After != null && !After.Equals(Before);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user