Merge branch 'develop' into feature/mobile-main-button
This commit is contained in:
commit
6c72436a03
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ Logs/
|
||||
.eslintcache
|
||||
build/deploy/
|
||||
/public/debuginfo.md
|
||||
TestsResults/
|
||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -2,3 +2,6 @@
|
||||
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
|
||||
|
@ -1,23 +1,33 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0..
|
||||
dotnet build ASC.Web.slnf /fl1 /flp1:LogFile=build/ASC.Web.log;Verbosity=Normal
|
||||
echo.
|
||||
echo Install nodejs projects dependencies...
|
||||
echo Start build backend...
|
||||
echo.
|
||||
|
||||
cd /D "%~dp0"
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
for /R "build\scripts\" %%f in (*.bat) do (
|
||||
echo Run script %%~nxf...
|
||||
echo.
|
||||
call build\scripts\%%~nxf
|
||||
)
|
||||
call start\stop.bat nopause
|
||||
dotnet build ..\asc.web.slnf /fl1 /flp1:logfile=asc.web.log;verbosity=normal
|
||||
echo.
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo install nodejs projects dependencies...
|
||||
echo.
|
||||
|
||||
|
||||
for /R "scripts\" %%f in (*.bat) do (
|
||||
echo Run script %%~nxf...
|
||||
echo.
|
||||
call scripts\%%~nxf
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
POPD
|
||||
|
||||
if "%1"=="nopause" goto start
|
||||
if "%1"=="nopause" goto end
|
||||
pause
|
||||
:start
|
||||
|
||||
)
|
||||
|
||||
:end
|
@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
PUSHD %~dp0
|
||||
cd /D "%~dp0"
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
|
@ -6,14 +6,11 @@ echo "##########################################################"
|
||||
|
||||
echo.
|
||||
|
||||
PUSHD %~dp0
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
cd /D "%~dp0"
|
||||
call runasadmin.bat "%~dpnx0"
|
||||
|
||||
if %errorlevel% == 0 (
|
||||
|
||||
call start\stop.bat nopause
|
||||
|
||||
echo "FRONT-END static"
|
||||
call build.static.bat nopause
|
||||
@ -21,9 +18,8 @@ call build.static.bat nopause
|
||||
echo "BACK-END"
|
||||
call build.backend.bat nopause
|
||||
|
||||
call start\start.bat nopause
|
||||
|
||||
echo.
|
||||
|
||||
pause
|
||||
)
|
||||
|
||||
)
|
||||
|
@ -37,6 +37,13 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-skiphc | --skiphardwarecheck )
|
||||
if [ "$2" != "" ]; then
|
||||
SKIP_HARDWARE_CHECK=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
@ -60,6 +67,10 @@ if [ -z "${LOCAL_SCRIPTS}" ]; then
|
||||
LOCAL_SCRIPTS="false";
|
||||
fi
|
||||
|
||||
if [ -z "${SKIP_HARDWARE_CHECK}" ]; then
|
||||
SKIP_HARDWARE_CHECK="false";
|
||||
fi
|
||||
|
||||
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
apt-get update;
|
||||
apt-get install -yq curl;
|
||||
|
@ -61,7 +61,7 @@ if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
|
||||
adduser --quiet --home ${PRODUCT_DIR}/services/kafka --system kafka
|
||||
fi
|
||||
cd ${PRODUCT_DIR}/services/kafka
|
||||
curl https://downloads.apache.org/kafka/2.7.1/kafka_2.13-2.7.1.tgz -O
|
||||
curl https://downloads.apache.org/kafka/2.7.2/kafka_2.13-2.7.2.tgz -O
|
||||
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
|
||||
chown -R kafka ${PRODUCT_DIR}/services/kafka
|
||||
cd -
|
||||
|
@ -6,6 +6,37 @@ command_exists () {
|
||||
type "$1" &> /dev/null;
|
||||
}
|
||||
|
||||
check_hardware () {
|
||||
DISK_REQUIREMENTS=40960;
|
||||
MEMORY_REQUIREMENTS=5500;
|
||||
CORE_REQUIREMENTS=2;
|
||||
|
||||
AVAILABLE_DISK_SPACE=$(df -m / | tail -1 | awk '{ print $4 }');
|
||||
|
||||
if [ ${AVAILABLE_DISK_SPACE} -lt ${DISK_REQUIREMENTS} ]; then
|
||||
echo "Minimal requirements are not met: need at least $DISK_REQUIREMENTS MB of free HDD space"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
TOTAL_MEMORY=$(free -m | grep -oP '\d+' | head -n 1);
|
||||
|
||||
if [ ${TOTAL_MEMORY} -lt ${MEMORY_REQUIREMENTS} ]; then
|
||||
echo "Minimal requirements are not met: need at least $MEMORY_REQUIREMENTS MB of RAM"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
CPU_CORES_NUMBER=$(cat /proc/cpuinfo | grep processor | wc -l);
|
||||
|
||||
if [ ${CPU_CORES_NUMBER} -lt ${CORE_REQUIREMENTS} ]; then
|
||||
echo "The system does not meet the minimal hardware requirements. CPU with at least $CORE_REQUIREMENTS cores is required"
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$SKIP_HARDWARE_CHECK" != "true" ]; then
|
||||
check_hardware
|
||||
fi
|
||||
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
if [ "$ARCH" != "amd64" ]; then
|
||||
echo "ONLYOFFICE ${product^^} doesn't support architecture '$ARCH'"
|
||||
|
@ -47,6 +47,13 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-skiphc | --skiphardwarecheck )
|
||||
if [ "$2" != "" ]; then
|
||||
SKIP_HARDWARE_CHECK=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
@ -69,6 +76,10 @@ if [ -z "${LOCAL_SCRIPTS}" ]; then
|
||||
LOCAL_SCRIPTS="false";
|
||||
fi
|
||||
|
||||
if [ -z "${SKIP_HARDWARE_CHECK}" ]; then
|
||||
SKIP_HARDWARE_CHECK="false";
|
||||
fi
|
||||
|
||||
cat > /etc/yum.repos.d/onlyoffice.repo <<END
|
||||
[onlyoffice]
|
||||
name=onlyoffice repo
|
||||
@ -91,11 +102,13 @@ END
|
||||
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-RedHat"
|
||||
|
||||
if [ "$LOCAL_SCRIPTS" = "true" ]; then
|
||||
source install-RedHat/tools.sh
|
||||
source install-RedHat/bootstrap.sh
|
||||
source install-RedHat/check-ports.sh
|
||||
source install-RedHat/install-preq.sh
|
||||
source install-RedHat/install-app.sh
|
||||
else
|
||||
source <(curl ${DOWNLOAD_URL_PREFIX}/tools.sh)
|
||||
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
|
||||
source <(curl ${DOWNLOAD_URL_PREFIX}/check-ports.sh)
|
||||
source <(curl ${DOWNLOAD_URL_PREFIX}/install-preq.sh)
|
||||
|
@ -104,7 +104,7 @@ if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
|
||||
mkdir -p ${PRODUCT_DIR}/services/
|
||||
getent passwd kafka >/dev/null || useradd -m -d ${PRODUCT_DIR}/services/kafka -s /sbin/nologin -p kafka kafka
|
||||
cd ${PRODUCT_DIR}/services/kafka
|
||||
curl https://downloads.apache.org/kafka/2.7.1/kafka_2.13-2.7.1.tgz -O
|
||||
curl https://downloads.apache.org/kafka/2.7.2/kafka_2.13-2.7.2.tgz -O
|
||||
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
|
||||
chown -R kafka ${PRODUCT_DIR}/services/kafka
|
||||
cd -
|
||||
|
34
build/install/OneClickInstall/install-RedHat/tools.sh
Normal file
34
build/install/OneClickInstall/install-RedHat/tools.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
check_hardware () {
|
||||
DISK_REQUIREMENTS=40960;
|
||||
MEMORY_REQUIREMENTS=5500;
|
||||
CORE_REQUIREMENTS=2;
|
||||
|
||||
AVAILABLE_DISK_SPACE=$(df -m / | tail -1 | awk '{ print $4 }');
|
||||
|
||||
if [ ${AVAILABLE_DISK_SPACE} -lt ${DISK_REQUIREMENTS} ]; then
|
||||
echo "Minimal requirements are not met: need at least $DISK_REQUIREMENTS MB of free HDD space"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
TOTAL_MEMORY=$(free -m | grep -oP '\d+' | head -n 1);
|
||||
|
||||
if [ ${TOTAL_MEMORY} -lt ${MEMORY_REQUIREMENTS} ]; then
|
||||
echo "Minimal requirements are not met: need at least $MEMORY_REQUIREMENTS MB of RAM"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
CPU_CORES_NUMBER=$(cat /proc/cpuinfo | grep processor | wc -l);
|
||||
|
||||
if [ ${CPU_CORES_NUMBER} -lt ${CORE_REQUIREMENTS} ]; then
|
||||
echo "The system does not meet the minimal hardware requirements. CPU with at least $CORE_REQUIREMENTS cores is required"
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$SKIP_HARDWARE_CHECK" != "true" ]; then
|
||||
check_hardware
|
||||
fi
|
71
build/run.e2e.test.bat
Normal file
71
build/run.e2e.test.bat
Normal file
@ -0,0 +1,71 @@
|
||||
@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-calendar.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Calendar\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-calendar.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-crm.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.CRM\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-crm.conf"
|
||||
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-files.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-files.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-mail.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Mail\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-mail.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-people.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.People\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-people.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-projects.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Projects\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-projects.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-studio.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-studio.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
|
71
build/run.e2e.translations.tests.bat
Normal file
71
build/run.e2e.translations.tests.bat
Normal file
@ -0,0 +1,71 @@
|
||||
@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-calendar.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Calendar\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-calendar.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-crm.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.CRM\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-crm.conf"
|
||||
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-files.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Files\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-files.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-login.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\login' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-login.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-mail.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Mail\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-mail.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-people.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.People\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-people.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-projects.conf) -replace 'ROOTPATH', '%~dp0deploy\products\ASC.Projects\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-projects.conf"
|
||||
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-studio.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-studio.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
|
2
build/run.translations.spellcheck.test.bat
Normal file
2
build/run.translations.spellcheck.test.bat
Normal file
@ -0,0 +1,2 @@
|
||||
PUSHD %~dp0..
|
||||
dotnet test common\Tests\Frontend.Translations.Tests\Frontend.Translations.Tests.csproj --filter Name~SpellCheckTest -l:html -r TestsResults
|
2
build/run.translations.tests.bat
Normal file
2
build/run.translations.tests.bat
Normal file
@ -0,0 +1,2 @@
|
||||
PUSHD %~dp0..
|
||||
dotnet test common\Tests\Frontend.Translations.Tests\Frontend.Translations.Tests.csproj --filter "TestCategory=FastRunning" -l:html -r TestsResults
|
@ -1 +1 @@
|
||||
yarn install --cwd common/ASC.UrlShortener/ --frozen-lockfile
|
||||
yarn install --cwd %~dp0../../common/ASC.UrlShortener/ --frozen-lockfile
|
@ -23,6 +23,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Authorization;
|
||||
@ -34,6 +35,8 @@ using Microsoft.Extensions.Hosting;
|
||||
using NLog;
|
||||
using NLog.Extensions.Logging;
|
||||
|
||||
using StackExchange.Redis.Extensions.Core.Configuration;
|
||||
|
||||
namespace ASC.Api.Core
|
||||
{
|
||||
public abstract class BaseStartup
|
||||
@ -56,7 +59,7 @@ namespace ASC.Api.Core
|
||||
if (bool.TryParse(Configuration["core:products"], out var loadProducts))
|
||||
{
|
||||
LoadProducts = loadProducts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ConfigureServices(IServiceCollection services)
|
||||
@ -82,8 +85,8 @@ namespace ASC.Api.Core
|
||||
{
|
||||
options.JsonSerializerOptions.Converters.Add(c);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
services.AddControllers()
|
||||
.AddXmlSerializerFormatters()
|
||||
@ -101,7 +104,18 @@ namespace ASC.Api.Core
|
||||
DIHelper.TryAdd<CookieAuthHandler>();
|
||||
DIHelper.TryAdd<WebhooksGlobalFilterAttribute>();
|
||||
|
||||
DIHelper.TryAdd(typeof(ICacheNotify<>), typeof(KafkaCache<>));
|
||||
var redisConfiguration = Configuration.GetSection("Redis").Get<RedisConfiguration>();
|
||||
|
||||
if (redisConfiguration != null)
|
||||
{
|
||||
DIHelper.TryAdd(typeof(ICacheNotify<>), typeof(RedisCache<>));
|
||||
}
|
||||
else
|
||||
{
|
||||
DIHelper.TryAdd(typeof(ICacheNotify<>), typeof(MemoryCacheNotify<>));
|
||||
}
|
||||
|
||||
|
||||
DIHelper.TryAdd(typeof(IWebhookPublisher), typeof(WebhookPublisher));
|
||||
|
||||
if (LoadProducts)
|
||||
|
@ -32,8 +32,8 @@
|
||||
<PackageReference Include="Autofac.Configuration" Version="6.0.0" />
|
||||
<PackageReference Include="AutoMapper" Version="10.1.1" />
|
||||
<PackageReference Include="Confluent.Kafka" Version="1.4.3" />
|
||||
<PackageReference Include="Google.Protobuf" Version="3.14.0" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Google.Protobuf" Version="3.19.1" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -55,12 +55,14 @@
|
||||
</PackageReference> -->
|
||||
<PackageReference Include="NLog" Version="4.7.10" />
|
||||
<PackageReference Include="NVelocity" Version="1.2.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="7.2.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\AscCacheItem.proto" />
|
||||
<Protobuf Include="protos\NotifyItem.proto" />
|
||||
<Protobuf Include="protos\DistributedTaskCache.proto" />
|
||||
<Protobuf Include="protos\DistributedTaskCancelation.proto" />
|
||||
<Protobuf Include="protos\asc_cache_item.proto" />
|
||||
<Protobuf Include="protos\notify_item.proto" />
|
||||
<Protobuf Include="protos\distributed_task_cache.proto" />
|
||||
<Protobuf Include="protos\distributed_task_cancelation.proto" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Notify\" />
|
||||
|
@ -50,7 +50,7 @@ namespace ASC.Common.Caching
|
||||
|
||||
public void ClearCache()
|
||||
{
|
||||
CacheNotify.Publish(new AscCacheItem { Id = ByteString.CopyFrom(Guid.NewGuid().ToByteArray()) }, CacheNotifyAction.Any);
|
||||
CacheNotify.Publish(new AscCacheItem { Id = Guid.NewGuid().ToString() }, CacheNotifyAction.Any);
|
||||
}
|
||||
|
||||
public static void OnClearCache()
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -24,8 +23,6 @@ namespace ASC.Common.Caching
|
||||
private ILog Log { get; set; }
|
||||
private ConcurrentDictionary<string, CancellationTokenSource> Cts { get; set; }
|
||||
private ConcurrentDictionary<string, Action<T>> Actions { get; set; }
|
||||
private MemoryCacheNotify<T> MemoryCacheNotify { get; set; }
|
||||
private string ChannelName { get; } = $"ascchannel{typeof(T).Name}";
|
||||
private ProtobufSerializer<T> ValueSerializer { get; } = new ProtobufSerializer<T>();
|
||||
private ProtobufDeserializer<T> ValueDeserializer { get; } = new ProtobufDeserializer<T>();
|
||||
private ProtobufSerializer<AscCacheItem> KeySerializer { get; } = new ProtobufSerializer<AscCacheItem>();
|
||||
@ -41,26 +38,13 @@ namespace ASC.Common.Caching
|
||||
Key = Guid.NewGuid();
|
||||
|
||||
var settings = configuration.GetSetting<KafkaSettings>("kafka");
|
||||
if (settings != null && !string.IsNullOrEmpty(settings.BootstrapServers))
|
||||
{
|
||||
ClientConfig = new ClientConfig { BootstrapServers = settings.BootstrapServers };
|
||||
AdminClientConfig = new AdminClientConfig { BootstrapServers = settings.BootstrapServers };
|
||||
}
|
||||
else
|
||||
{
|
||||
MemoryCacheNotify = new MemoryCacheNotify<T>();
|
||||
}
|
||||
|
||||
ClientConfig = new ClientConfig { BootstrapServers = settings.BootstrapServers };
|
||||
AdminClientConfig = new AdminClientConfig { BootstrapServers = settings.BootstrapServers };
|
||||
}
|
||||
|
||||
public void Publish(T obj, CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
if (ClientConfig == null)
|
||||
{
|
||||
MemoryCacheNotify.Publish(obj, cacheNotifyAction);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (Producer == null)
|
||||
@ -84,7 +68,7 @@ namespace ASC.Common.Caching
|
||||
Value = obj,
|
||||
Key = new AscCacheItem
|
||||
{
|
||||
Id = ByteString.CopyFrom(Key.ToByteArray())
|
||||
Id = Key.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
@ -102,12 +86,8 @@ namespace ASC.Common.Caching
|
||||
|
||||
public void Subscribe(Action<T> onchange, CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
if (ClientConfig == null)
|
||||
{
|
||||
MemoryCacheNotify.Subscribe(onchange, cacheNotifyAction);
|
||||
return;
|
||||
}
|
||||
var channelName = GetChannelName(cacheNotifyAction);
|
||||
|
||||
Cts[channelName] = new CancellationTokenSource();
|
||||
Actions[channelName] = onchange;
|
||||
|
||||
@ -137,7 +117,7 @@ namespace ASC.Common.Caching
|
||||
}
|
||||
}).Wait();
|
||||
}
|
||||
catch(AggregateException)
|
||||
catch (AggregateException)
|
||||
{
|
||||
|
||||
}
|
||||
@ -159,7 +139,7 @@ namespace ASC.Common.Caching
|
||||
try
|
||||
{
|
||||
var cr = c.Consume(Cts[channelName].Token);
|
||||
if (cr != null && cr.Message != null && cr.Message.Value != null && !(new Guid(cr.Message.Key.Id.ToByteArray())).Equals(Key) && Actions.TryGetValue(channelName, out var act))
|
||||
if (cr != null && cr.Message != null && cr.Message.Value != null && !(new Guid(cr.Message.Key.Id)).Equals(Key) && Actions.TryGetValue(channelName, out var act))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -189,7 +169,7 @@ namespace ASC.Common.Caching
|
||||
|
||||
private string GetChannelName(CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
return $"{ChannelName}{cacheNotifyAction}";
|
||||
return $"asc:channel:{cacheNotifyAction}:{typeof(T).FullName}".ToLower();
|
||||
}
|
||||
|
||||
public void Unsubscribe(CacheNotifyAction action)
|
||||
@ -231,40 +211,4 @@ namespace ASC.Common.Caching
|
||||
{
|
||||
public string BootstrapServers { get; set; }
|
||||
}
|
||||
|
||||
public class MemoryCacheNotify<T> : ICacheNotify<T> where T : IMessage<T>, new()
|
||||
{
|
||||
private readonly Dictionary<string, List<Action<T>>> actions = new Dictionary<string, List<Action<T>>>();
|
||||
|
||||
public void Publish(T obj, CacheNotifyAction action)
|
||||
{
|
||||
if (actions.TryGetValue(GetKey(action), out var onchange) && onchange != null)
|
||||
{
|
||||
foreach (var a in onchange)
|
||||
{
|
||||
a(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Subscribe(Action<T> onchange, CacheNotifyAction notifyAction)
|
||||
{
|
||||
if (onchange != null)
|
||||
{
|
||||
var key = GetKey(notifyAction);
|
||||
actions.TryAdd(key, new List<Action<T>>());
|
||||
actions[key].Add(onchange);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unsubscribe(CacheNotifyAction action)
|
||||
{
|
||||
actions.Remove(GetKey(action));
|
||||
}
|
||||
|
||||
private string GetKey(CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
return $"{typeof(T).Name}{cacheNotifyAction}";
|
||||
}
|
||||
}
|
||||
}
|
48
common/ASC.Common/Caching/MemoryCacheNotify.cs
Normal file
48
common/ASC.Common/Caching/MemoryCacheNotify.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
namespace ASC.Common.Caching
|
||||
{
|
||||
[Singletone]
|
||||
public class MemoryCacheNotify<T> : ICacheNotify<T> where T : IMessage<T>, new()
|
||||
{
|
||||
private readonly ConcurrentDictionary<string, List<Action<T>>> _actions;
|
||||
|
||||
public MemoryCacheNotify()
|
||||
{
|
||||
_actions = new ConcurrentDictionary<string, List<Action<T>>>();
|
||||
}
|
||||
|
||||
public void Publish(T obj, CacheNotifyAction action)
|
||||
{
|
||||
if (_actions.TryGetValue(GetKey(action), out var onchange) && onchange != null)
|
||||
{
|
||||
Parallel.ForEach(onchange, a => a(obj));
|
||||
}
|
||||
}
|
||||
|
||||
public void Subscribe(Action<T> onchange, CacheNotifyAction notifyAction)
|
||||
{
|
||||
if (onchange != null)
|
||||
{
|
||||
var key = GetKey(notifyAction);
|
||||
_actions.TryAdd(key, new List<Action<T>>());
|
||||
_actions[key].Add(onchange);
|
||||
}
|
||||
}
|
||||
|
||||
public void Unsubscribe(CacheNotifyAction action)
|
||||
{
|
||||
_actions.TryRemove(GetKey(action), out _);
|
||||
}
|
||||
|
||||
private string GetKey(CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
return $"asc:channel:{cacheNotifyAction}:{typeof(T).FullName}".ToLower();
|
||||
}
|
||||
}
|
||||
}
|
78
common/ASC.Common/Caching/RedisCache.cs
Normal file
78
common/ASC.Common/Caching/RedisCache.cs
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2021
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
using StackExchange.Redis.Extensions.Core.Abstractions;
|
||||
|
||||
namespace ASC.Common.Caching;
|
||||
|
||||
[Singletone]
|
||||
public class RedisCache<T> : ICacheNotify<T> where T : IMessage<T>, new()
|
||||
{
|
||||
private readonly IRedisDatabase _redis;
|
||||
|
||||
public RedisCache(IRedisCacheClient redisCacheClient)
|
||||
{
|
||||
_redis = redisCacheClient.GetDbFromConfiguration();
|
||||
}
|
||||
|
||||
public void Publish(T obj, CacheNotifyAction action)
|
||||
{
|
||||
Task.Run(() => _redis.PublishAsync(GetChannelName(action), new RedisCachePubSubItem<T>() { Object = obj, Action = action }))
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
public void Subscribe(Action<T> onchange, CacheNotifyAction action)
|
||||
{
|
||||
Task.Run(() => _redis.SubscribeAsync<RedisCachePubSubItem<T>>(GetChannelName(action), (i) =>
|
||||
{
|
||||
onchange(i.Object);
|
||||
|
||||
return Task.FromResult(true);
|
||||
})).GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
public void Unsubscribe(CacheNotifyAction action)
|
||||
{
|
||||
Task.Run(() => _redis.UnsubscribeAsync<RedisCachePubSubItem<T>>(GetChannelName(action), (i) =>
|
||||
{
|
||||
return Task.FromResult(true);
|
||||
})).GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
private string GetChannelName(CacheNotifyAction cacheNotifyAction)
|
||||
{
|
||||
return $"asc:channel:{cacheNotifyAction}:{typeof(T).FullName}".ToLower();
|
||||
}
|
||||
|
||||
class RedisCachePubSubItem<T0>
|
||||
{
|
||||
public T0 Object { get; set; }
|
||||
|
||||
public CacheNotifyAction Action { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +158,9 @@ namespace ASC.Common.Web
|
||||
AddMimeMapping(".doc", "application/msword");
|
||||
AddMimeMapping(".docm", "application/vnd.ms-word.document.macroEnabled.12");
|
||||
AddMimeMapping(".doct", "application/doct");
|
||||
AddMimeMapping(".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
AddMimeMapping(".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
AddMimeMapping(".docxf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
AddMimeMapping(".docxf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf");
|
||||
AddMimeMapping(".dot", "application/msword");
|
||||
AddMimeMapping(".dotm", "application/vnd.ms-word.template.macroEnabled.12");
|
||||
AddMimeMapping(".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template");
|
||||
@ -429,7 +431,9 @@ namespace ASC.Common.Web
|
||||
AddMimeMapping(".oda", "application/oda");
|
||||
AddMimeMapping(".odp", "application/vnd.oasis.opendocument.presentation");
|
||||
AddMimeMapping(".ods", "application/vnd.oasis.opendocument.spreadsheet");
|
||||
AddMimeMapping(".odt", "application/vnd.oasis.opendocument.text");
|
||||
AddMimeMapping(".odt", "application/vnd.oasis.opendocument.text");
|
||||
AddMimeMapping(".oform", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
AddMimeMapping(".oform", "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform");
|
||||
AddMimeMapping(".oga", "audio/ogg");
|
||||
AddMimeMapping(".ogg", "video/ogg");
|
||||
AddMimeMapping(".ogg", "audio/ogg");
|
||||
@ -710,7 +714,8 @@ namespace ASC.Common.Web
|
||||
AddMimeMapping(".wml", "text/vnd.wap.wml");
|
||||
AddMimeMapping(".wmlc", "application/vnd.wap.wmlc");
|
||||
AddMimeMapping(".wmls", "text/vnd.wap.wmlscript");
|
||||
AddMimeMapping(".wmlsc", "application/vnd.wap.wmlscriptc");
|
||||
AddMimeMapping(".wmlsc", "application/vnd.wap.wmlscriptc");
|
||||
AddMimeMapping(".woff2", "application/font-woff2");
|
||||
AddMimeMapping(".word", "application/msword");
|
||||
AddMimeMapping(".wp", "application/wordperfect");
|
||||
AddMimeMapping(".wp5", "application/wordperfect");
|
||||
|
@ -1,21 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common.Threading;
|
||||
|
||||
message DistributedTaskCache {
|
||||
string Id = 1;
|
||||
int32 InstanceId = 2;
|
||||
string Status = 3;
|
||||
string Exception = 4;
|
||||
repeated DistributedTaskCacheProp Props = 5;
|
||||
string Key = 6;
|
||||
double Percentage = 7;
|
||||
bool IsCompleted = 8;
|
||||
int32 StepCount = 9;
|
||||
|
||||
message DistributedTaskCacheProp
|
||||
{
|
||||
string Key = 1;
|
||||
string Value = 2;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
package ASC.Notify.Model;
|
||||
|
||||
message NotifyItem {
|
||||
NotifyActionItem Action = 1;
|
||||
string ObjectID = 2;
|
||||
repeated Recipient Recipients = 3;
|
||||
repeated string SenderNames = 4;
|
||||
repeated Tag Tags = 5;
|
||||
bool CheckSubsciption = 6;
|
||||
int32 TenantId = 7;
|
||||
string UserId = 8;
|
||||
string BaseUrl = 9;
|
||||
}
|
||||
|
||||
message NotifyActionItem {
|
||||
string ID = 1;
|
||||
}
|
||||
|
||||
message Recipient {
|
||||
string ID = 1;
|
||||
google.protobuf.StringValue Name = 2;
|
||||
bool CheckActivation = 3;
|
||||
repeated string Addresses = 4;
|
||||
bool IsGroup = 5;
|
||||
}
|
||||
|
||||
message Tag {
|
||||
string Tag = 1;
|
||||
string Value = 2;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common;
|
||||
|
||||
message AscCacheItem {
|
||||
bytes Id = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common;
|
||||
|
||||
message AscCacheItem {
|
||||
string id = 1;
|
||||
}
|
21
common/ASC.Common/protos/distributed_task_cache.proto
Normal file
21
common/ASC.Common/protos/distributed_task_cache.proto
Normal file
@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common.Threading;
|
||||
|
||||
message DistributedTaskCache {
|
||||
string id = 1;
|
||||
int32 instance_id = 2;
|
||||
string status = 3;
|
||||
string exception = 4;
|
||||
repeated DistributedTaskCacheProp props = 5;
|
||||
string key = 6;
|
||||
double percentage = 7;
|
||||
bool is_completed = 8;
|
||||
int32 step_count = 9;
|
||||
|
||||
message DistributedTaskCacheProp
|
||||
{
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common.Threading;
|
||||
|
||||
message DistributedTaskCancelation {
|
||||
string Id = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Common.Threading;
|
||||
|
||||
message DistributedTaskCancelation {
|
||||
string id = 1;
|
||||
}
|
32
common/ASC.Common/protos/notify_item.proto
Normal file
32
common/ASC.Common/protos/notify_item.proto
Normal file
@ -0,0 +1,32 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
package ASC.Notify.Model;
|
||||
|
||||
message NotifyItem {
|
||||
NotifyActionItem action = 1;
|
||||
string object_id = 2;
|
||||
repeated Recipient recipients = 3;
|
||||
repeated string sender_names = 4;
|
||||
repeated Tag tags = 5;
|
||||
bool check_subsciption = 6;
|
||||
int32 tenant_id = 7;
|
||||
string user_id = 8;
|
||||
string base_url = 9;
|
||||
}
|
||||
|
||||
message NotifyActionItem {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message Recipient {
|
||||
string id = 1;
|
||||
google.protobuf.StringValue name = 2;
|
||||
bool check_activation = 3;
|
||||
repeated string addresses = 4;
|
||||
bool is_group = 5;
|
||||
}
|
||||
|
||||
message Tag {
|
||||
string tag = 1;
|
||||
string value = 2;
|
||||
}
|
@ -29,29 +29,29 @@
|
||||
<Compile Remove="Notify\Jabber\IReverseJabberService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="protos\AzRecordCache.proto" />
|
||||
<None Remove="protos\ConsumerCacheItem.proto" />
|
||||
<None Remove="protos\CreateClientProto.proto" />
|
||||
<None Remove="protos\DisableClientProto.proto" />
|
||||
<None Remove="protos\EncryptionSettingsProto.proto" />
|
||||
<None Remove="protos\GroupCacheItem.proto" />
|
||||
<None Remove="protos\NotifyInvoke.proto" />
|
||||
<None Remove="protos\NotifyMessage.proto" />
|
||||
<None Remove="protos\QuotaCacheItem.proto" />
|
||||
<None Remove="protos\RegisterUserProto.proto" />
|
||||
<None Remove="protos\SettingsCacheItem.proto" />
|
||||
<None Remove="protos\SubscriptionMethodCache.proto" />
|
||||
<None Remove="protos\SubscriptionRecord.proto" />
|
||||
<None Remove="protos\TenantCacheItem.proto" />
|
||||
<None Remove="protos\TenantSetting.proto" />
|
||||
<None Remove="protos\UserGroupRefCacheItem.proto" />
|
||||
<None Remove="protos\UserInfoCacheItem.proto" />
|
||||
<None Remove="protos\UserPhotoCacheItem.proto" />
|
||||
<None Remove="protos\az_record_cache.proto" />
|
||||
<None Remove="protos\consumer_cache_item.proto" />
|
||||
<None Remove="protos\create_client_proto.proto" />
|
||||
<None Remove="protos\disable_client_proto.proto" />
|
||||
<None Remove="protos\encryption_settings_proto.proto" />
|
||||
<None Remove="protos\group_cache_item.proto" />
|
||||
<None Remove="protos\notify_invoke.proto" />
|
||||
<None Remove="protos\notify_message.proto" />
|
||||
<None Remove="protos\quota_cache_item.proto" />
|
||||
<None Remove="protos\register_user_proto.proto" />
|
||||
<None Remove="protos\settings_cache_item.proto" />
|
||||
<None Remove="protos\subscription_method_cache.proto" />
|
||||
<None Remove="protos\subscription_record.proto" />
|
||||
<None Remove="protos\tenant_cache_item.proto" />
|
||||
<None Remove="protos\tenant_setting.proto" />
|
||||
<None Remove="protos\user_group_ref_cache_item.proto" />
|
||||
<None Remove="protos\user_info_cache_item.proto" />
|
||||
<None Remove="protos\user_photo_cache_item.proto" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.5.1.25" />
|
||||
<PackageReference Include="AWSSDK.SimpleEmail" Version="3.5.0.27" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -61,25 +61,25 @@
|
||||
<PackageReference Include="Telegram.Bot" Version="15.7.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\CreateClientProto.proto" />
|
||||
<Protobuf Include="protos\EncryptionSettingsProto.proto" />
|
||||
<Protobuf Include="protos\NotifyInvoke.proto" />
|
||||
<Protobuf Include="protos\NotifyMessage.proto" />
|
||||
<Protobuf Include="protos\DisableClientProto.proto" />
|
||||
<Protobuf Include="protos\RegisterUserProto.proto" />
|
||||
<Protobuf Include="protos\SettingsCacheItem.proto" />
|
||||
<Protobuf Include="protos\ConsumerCacheItem.proto" />
|
||||
<Protobuf Include="protos\TenantCacheItem.proto" />
|
||||
<Protobuf Include="protos\GroupCacheItem.proto" />
|
||||
<Protobuf Include="protos\UserGroupRefCacheItem.proto" />
|
||||
<Protobuf Include="protos\UserInfoCacheItem.proto" />
|
||||
<Protobuf Include="protos\UserPhotoCacheItem.proto" />
|
||||
<Protobuf Include="protos\TenantSetting.proto" />
|
||||
<Protobuf Include="protos\SubscriptionMethodCache.proto" />
|
||||
<Protobuf Include="protos\SubscriptionRecord.proto" />
|
||||
<Protobuf Include="protos\TariffCacheItem.proto" />
|
||||
<Protobuf Include="protos\AzRecordCache.proto" />
|
||||
<Protobuf Include="protos\QuotaCacheItem.proto" />
|
||||
<Protobuf Include="protos\create_client_proto.proto" />
|
||||
<Protobuf Include="protos\encryption_settings_proto.proto" />
|
||||
<Protobuf Include="protos\notify_invoke.proto" />
|
||||
<Protobuf Include="protos\notify_message.proto" />
|
||||
<Protobuf Include="protos\disable_client_proto.proto" />
|
||||
<Protobuf Include="protos\register_user_proto.proto" />
|
||||
<Protobuf Include="protos\settings_cache_item.proto" />
|
||||
<Protobuf Include="protos\consumer_cache_item.proto" />
|
||||
<Protobuf Include="protos\tenant_cache_item.proto" />
|
||||
<Protobuf Include="protos\group_cache_item.proto" />
|
||||
<Protobuf Include="protos\user_group_ref_cache_item.proto" />
|
||||
<Protobuf Include="protos\user_info_cache_item.proto" />
|
||||
<Protobuf Include="protos\user_photo_cache_item.proto" />
|
||||
<Protobuf Include="protos\tenant_setting.proto" />
|
||||
<Protobuf Include="protos\subscription_method_cache.proto" />
|
||||
<Protobuf Include="protos\subscription_record.proto" />
|
||||
<Protobuf Include="protos\tariff_cache_item.proto" />
|
||||
<Protobuf Include="protos\az_record_cache.proto" />
|
||||
<Protobuf Include="protos\quota_cache_item.proto" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\MySql\DbContextMySql\" />
|
||||
|
@ -65,7 +65,16 @@ namespace ASC.Core.Billing
|
||||
|
||||
public string Signature { get; set; }
|
||||
|
||||
public bool? DiscEncryption { get; set; }
|
||||
public bool? DiscEncryption { get; set; }
|
||||
|
||||
[JsonPropertyName("users_count")]
|
||||
public int DSUsersCount { get; set; }
|
||||
|
||||
[JsonPropertyName("users_expire")]
|
||||
public int DSUsersExpire { get; set; }
|
||||
|
||||
[JsonPropertyName("connections")]
|
||||
public int DSConnections { get; set; }
|
||||
|
||||
public static License Parse(string licenseString)
|
||||
{
|
||||
|
@ -223,7 +223,11 @@ namespace ASC.Core.Caching
|
||||
public IEnumerable<Tenant> GetTenants(DateTime from, bool active = true)
|
||||
{
|
||||
return Service.GetTenants(from, active);
|
||||
}
|
||||
}
|
||||
public IEnumerable<Tenant> GetTenants(List<int> ids)
|
||||
{
|
||||
return Service.GetTenants(ids);
|
||||
}
|
||||
|
||||
public Tenant GetTenant(int id)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ namespace ASC.Core.Caching
|
||||
{
|
||||
if (userInfo != null)
|
||||
{
|
||||
var key = GetUserCacheKey(userInfo.Tenant, userInfo.ID.FromByteString());
|
||||
var key = GetUserCacheKey(userInfo.Tenant, new Guid(userInfo.Id));
|
||||
Cache.Remove(key);
|
||||
}
|
||||
}
|
||||
@ -267,18 +267,22 @@ namespace ASC.Core.Caching
|
||||
{
|
||||
return Service.GetUserByPasswordHash(tenant, login, passwordHash);
|
||||
}
|
||||
public IEnumerable<UserInfo> GetUsersAllTenants(IEnumerable<Guid> userIds)
|
||||
{
|
||||
return Service.GetUsersAllTenants(userIds);
|
||||
}
|
||||
|
||||
public UserInfo SaveUser(int tenant, UserInfo user)
|
||||
{
|
||||
user = Service.SaveUser(tenant, user);
|
||||
CacheUserInfoItem.Publish(new UserInfoCacheItem { ID = user.ID.ToByteString(), Tenant = tenant }, CacheNotifyAction.Any);
|
||||
CacheUserInfoItem.Publish(new UserInfoCacheItem { Id = user.ID.ToString(), Tenant = tenant }, CacheNotifyAction.Any);
|
||||
return user;
|
||||
}
|
||||
|
||||
public void RemoveUser(int tenant, Guid id)
|
||||
{
|
||||
Service.RemoveUser(tenant, id);
|
||||
CacheUserInfoItem.Publish(new UserInfoCacheItem { Tenant = tenant, ID = id.ToByteString() }, CacheNotifyAction.Any);
|
||||
CacheUserInfoItem.Publish(new UserInfoCacheItem { Tenant = tenant, Id = id.ToString() }, CacheNotifyAction.Any);
|
||||
}
|
||||
|
||||
public byte[] GetUserPhoto(int tenant, Guid id)
|
||||
@ -326,14 +330,14 @@ namespace ASC.Core.Caching
|
||||
public Group SaveGroup(int tenant, Group group)
|
||||
{
|
||||
group = Service.SaveGroup(tenant, group);
|
||||
CacheGroupCacheItem.Publish(new GroupCacheItem { ID = group.Id.ToString() }, CacheNotifyAction.Any);
|
||||
CacheGroupCacheItem.Publish(new GroupCacheItem { Id = group.Id.ToString() }, CacheNotifyAction.Any);
|
||||
return group;
|
||||
}
|
||||
|
||||
public void RemoveGroup(int tenant, Guid id)
|
||||
{
|
||||
Service.RemoveGroup(tenant, id);
|
||||
CacheGroupCacheItem.Publish(new GroupCacheItem { ID = id.ToString() }, CacheNotifyAction.Any);
|
||||
CacheGroupCacheItem.Publish(new GroupCacheItem { Id = id.ToString() }, CacheNotifyAction.Any);
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,7 +155,11 @@ namespace ASC.Core
|
||||
public List<Tenant> GetTenants(bool active = true)
|
||||
{
|
||||
return TenantService.GetTenants(default, active).ToList();
|
||||
}
|
||||
}
|
||||
public List<Tenant> GetTenants(List<int> ids)
|
||||
{
|
||||
return TenantService.GetTenants(ids).ToList();
|
||||
}
|
||||
|
||||
public Tenant GetTenant(int tenantId)
|
||||
{
|
||||
|
@ -39,7 +39,9 @@ namespace ASC.Core
|
||||
{
|
||||
void ValidateDomain(string domain);
|
||||
|
||||
IEnumerable<Tenant> GetTenants(DateTime from, bool active = true);
|
||||
IEnumerable<Tenant> GetTenants(DateTime from, bool active = true);
|
||||
|
||||
IEnumerable<Tenant> GetTenants(List<int> ids);
|
||||
|
||||
IEnumerable<Tenant> GetTenants(string login, string passwordHash);
|
||||
|
||||
|
@ -91,6 +91,8 @@ namespace ASC.Core
|
||||
|
||||
UserGroupRef SaveUserGroupRef(int tenant, UserGroupRef r);
|
||||
|
||||
void RemoveUserGroupRef(int tenant, Guid userId, Guid groupId, UserGroupRefType refType);
|
||||
void RemoveUserGroupRef(int tenant, Guid userId, Guid groupId, UserGroupRefType refType);
|
||||
|
||||
IEnumerable<UserInfo> GetUsersAllTenants(IEnumerable<Guid> userIds);
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ namespace ASC.Core
|
||||
{
|
||||
var result = new UserGroupRef
|
||||
{
|
||||
UserId = cache.UserId.FromByteString(),
|
||||
GroupId = cache.GroupId.FromByteString()
|
||||
UserId = new Guid(cache.UserId),
|
||||
GroupId = new Guid(cache.GroupId)
|
||||
};
|
||||
|
||||
if (Enum.TryParse<UserGroupRefType>(cache.RefType, out var refType))
|
||||
@ -103,8 +103,8 @@ namespace ASC.Core
|
||||
{
|
||||
return new UserGroupRefCacheItem
|
||||
{
|
||||
GroupId = cache.GroupId.ToByteString(),
|
||||
UserId = cache.UserId.ToByteString(),
|
||||
GroupId = cache.GroupId.ToString(),
|
||||
UserId = cache.UserId.ToString(),
|
||||
RefType = cache.RefType.ToString(),
|
||||
LastModified = cache.LastModified.Ticks,
|
||||
Removed = cache.Removed,
|
||||
|
@ -154,7 +154,14 @@ namespace ASC.Core.Data
|
||||
}
|
||||
|
||||
return q.Select(FromDbTenantToTenant).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Tenant> GetTenants(List<int> ids)
|
||||
{
|
||||
var q = TenantsQuery();
|
||||
|
||||
return q.Where(r => ids.Contains(r.Id) && r.Status == TenantStatus.Active).Select(FromDbTenantToTenant).ToList();
|
||||
}
|
||||
|
||||
public IEnumerable<Tenant> GetTenants(string login, string passwordHash)
|
||||
{
|
||||
@ -248,7 +255,7 @@ namespace ASC.Core.Data
|
||||
public Tenant GetTenant(string domain)
|
||||
{
|
||||
if (string.IsNullOrEmpty(domain)) throw new ArgumentNullException("domain");
|
||||
|
||||
|
||||
domain = domain.ToLowerInvariant();
|
||||
|
||||
return TenantsQuery()
|
||||
|
@ -299,6 +299,14 @@ namespace ASC.Core.Data
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<UserInfo> GetUsersAllTenants(IEnumerable<Guid> userIds)
|
||||
{
|
||||
var q = UserDbContext.Users
|
||||
.Where(r => userIds.Contains(r.Id))
|
||||
.Where(r => !r.Removed);
|
||||
return q.Select(FromUserToUserInfo).ToList();
|
||||
}
|
||||
|
||||
//todo: remove
|
||||
private void RegeneratePassword(int tenant, Guid userId)
|
||||
{
|
||||
|
@ -34,6 +34,20 @@ namespace ASC.Core.Common.EF.Model
|
||||
new FilesConverts { Input = ".docx", Output = ".pdf" },
|
||||
new FilesConverts { Input = ".docx", Output = ".rtf" },
|
||||
new FilesConverts { Input = ".docx", Output = ".txt" },
|
||||
|
||||
new FilesConverts { Input = ".docx", Output = ".docxf" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".docx" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".dotx" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".epub" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".fb2" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".html" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".odt" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".oform" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".ott" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".pdf" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".rtf" },
|
||||
new FilesConverts { Input = ".docxf", Output = ".txt" },
|
||||
|
||||
new FilesConverts { Input = ".dot", Output = ".docx" },
|
||||
new FilesConverts { Input = ".dot", Output = ".odt" },
|
||||
new FilesConverts { Input = ".dot", Output = ".pdf" },
|
||||
|
@ -273,9 +273,12 @@ namespace ASC.Core
|
||||
public void SaveButton(int tariffId, string partnerId, string buttonUrl)
|
||||
{
|
||||
TariffService.SaveButton(tariffId, partnerId, buttonUrl);
|
||||
}
|
||||
public IEnumerable<UserInfo> FindUsers(IEnumerable<Guid> userIds)
|
||||
{
|
||||
return UserService.GetUsersAllTenants(userIds);
|
||||
}
|
||||
|
||||
|
||||
private Tenant AddRegion(Tenant tenant)
|
||||
{
|
||||
if (tenant != null)
|
||||
|
@ -127,7 +127,19 @@ namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
|
||||
{
|
||||
Input = ".docx",
|
||||
Output = ".txt"
|
||||
},
|
||||
},
|
||||
new { Input = ".docx", Output = ".docxf" },
|
||||
new { Input = ".docxf", Output = ".docx" },
|
||||
new { Input = ".docxf", Output = ".dotx" },
|
||||
new { Input = ".docxf", Output = ".epub" },
|
||||
new { Input = ".docxf", Output = ".fb2" },
|
||||
new { Input = ".docxf", Output = ".html" },
|
||||
new { Input = ".docxf", Output = ".odt" },
|
||||
new { Input = ".docxf", Output = ".oform" },
|
||||
new { Input = ".docxf", Output = ".ott" },
|
||||
new { Input = ".docxf", Output = ".pdf" },
|
||||
new { Input = ".docxf", Output = ".rtf" },
|
||||
new { Input = ".docxf", Output = ".txt" },
|
||||
new
|
||||
{
|
||||
Input = ".dot",
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
|
||||
{
|
||||
@ -122,6 +122,18 @@ namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
|
||||
{ ".dot", ".docx" },
|
||||
{ ".docx", ".txt" },
|
||||
{ ".docx", ".rtf" },
|
||||
{ ".docx", ".docxf" },
|
||||
{ ".docxf",".docx" },
|
||||
{ ".docxf",".dotx" },
|
||||
{ ".docxf",".epub" },
|
||||
{ ".docxf",".fb2" },
|
||||
{ ".docxf",".html" },
|
||||
{ ".docxf",".odt" },
|
||||
{ ".docxf",".oform" },
|
||||
{ ".docxf",".ott" },
|
||||
{ ".docxf",".pdf" },
|
||||
{ ".docxf",".rtf" },
|
||||
{ ".docxf",".txt" },
|
||||
{ ".csv", ".pdf" },
|
||||
{ ".csv", ".xlsx" },
|
||||
{ ".doc", ".docx" },
|
||||
|
@ -125,7 +125,19 @@ namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
|
||||
{
|
||||
Input = ".docx",
|
||||
Output = ".txt"
|
||||
},
|
||||
},
|
||||
new { Input = ".docx", Output = ".docxf" },
|
||||
new { Input = ".docxf", Output = ".docx" },
|
||||
new { Input = ".docxf", Output = ".dotx" },
|
||||
new { Input = ".docxf", Output = ".epub" },
|
||||
new { Input = ".docxf", Output = ".fb2" },
|
||||
new { Input = ".docxf", Output = ".html" },
|
||||
new { Input = ".docxf", Output = ".odt" },
|
||||
new { Input = ".docxf", Output = ".oform" },
|
||||
new { Input = ".docxf", Output = ".ott" },
|
||||
new { Input = ".docxf", Output = ".pdf" },
|
||||
new { Input = ".docxf", Output = ".rtf" },
|
||||
new { Input = ".docxf", Output = ".txt" },
|
||||
new
|
||||
{
|
||||
Input = ".dot",
|
||||
|
@ -1,4 +1,4 @@
|
||||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using ASC.Core.Common.EF.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
@ -193,6 +193,18 @@ namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql
|
||||
Input = ".dotx",
|
||||
Output = ".pdf"
|
||||
},
|
||||
new { Input = ".docx", Output = ".docxf" },
|
||||
new { Input = ".docxf", Output = ".docx" },
|
||||
new { Input = ".docxf", Output = ".dotx" },
|
||||
new { Input = ".docxf", Output = ".epub" },
|
||||
new { Input = ".docxf", Output = ".fb2" },
|
||||
new { Input = ".docxf", Output = ".html" },
|
||||
new { Input = ".docxf", Output = ".odt" },
|
||||
new { Input = ".docxf", Output = ".oform" },
|
||||
new { Input = ".docxf", Output = ".ott" },
|
||||
new { Input = ".docxf", Output = ".pdf" },
|
||||
new { Input = ".docxf", Output = ".rtf" },
|
||||
new { Input = ".docxf", Output = ".txt" },
|
||||
new
|
||||
{
|
||||
Input = ".dotx",
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql
|
||||
{
|
||||
@ -122,6 +122,18 @@ namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql
|
||||
{ ".dot", ".docx" },
|
||||
{ ".docx", ".txt" },
|
||||
{ ".docx", ".rtf" },
|
||||
{ ".docx", ".docxf" },
|
||||
{ ".docxf",".docx" },
|
||||
{ ".docxf",".dotx" },
|
||||
{ ".docxf",".epub" },
|
||||
{ ".docxf",".fb2" },
|
||||
{ ".docxf",".html" },
|
||||
{ ".docxf",".odt" },
|
||||
{ ".docxf",".oform" },
|
||||
{ ".docxf",".ott" },
|
||||
{ ".docxf",".pdf" },
|
||||
{ ".docxf",".rtf" },
|
||||
{ ".docxf",".txt" },
|
||||
{ ".csv", ".pdf" },
|
||||
{ ".csv", ".xlsx" },
|
||||
{ ".doc", ".docx" },
|
||||
|
@ -1,4 +1,4 @@
|
||||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using ASC.Core.Common.EF.Context;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
@ -126,6 +126,18 @@ namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql
|
||||
Input = ".docx",
|
||||
Output = ".txt"
|
||||
},
|
||||
new { Input = ".docx", Output = ".docxf" },
|
||||
new { Input = ".docxf", Output = ".docx" },
|
||||
new { Input = ".docxf", Output = ".dotx" },
|
||||
new { Input = ".docxf", Output = ".epub" },
|
||||
new { Input = ".docxf", Output = ".fb2" },
|
||||
new { Input = ".docxf", Output = ".html" },
|
||||
new { Input = ".docxf", Output = ".odt" },
|
||||
new { Input = ".docxf", Output = ".oform" },
|
||||
new { Input = ".docxf", Output = ".ott" },
|
||||
new { Input = ".docxf", Output = ".pdf" },
|
||||
new { Input = ".docxf", Output = ".rtf" },
|
||||
new { Input = ".docxf", Output = ".txt" },
|
||||
new
|
||||
{
|
||||
Input = ".dot",
|
||||
|
@ -49,12 +49,12 @@ namespace ASC.Notify.Model
|
||||
|
||||
public static implicit operator NotifyActionItem(NotifyAction cache)
|
||||
{
|
||||
return new NotifyActionItem() { ID = cache.ID };
|
||||
return new NotifyActionItem() { Id = cache.ID };
|
||||
}
|
||||
|
||||
public static explicit operator NotifyAction(NotifyActionItem cache)
|
||||
{
|
||||
return new NotifyAction(cache.ID);
|
||||
return new NotifyAction(cache.Id);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
|
@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
package ASC.Core;
|
||||
|
||||
message AzRecordCache {
|
||||
google.protobuf.StringValue SubjectId = 1;
|
||||
|
||||
google.protobuf.StringValue ActionId = 2;
|
||||
|
||||
google.protobuf.StringValue ObjectId = 3;
|
||||
|
||||
google.protobuf.StringValue Reaction = 4;
|
||||
|
||||
int32 Tenant = 5;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Common.Notify;
|
||||
|
||||
message CreateClientProto {
|
||||
int32 TenantId = 1;
|
||||
string Token = 2;
|
||||
int32 TokenLifespan = 3;
|
||||
string Proxy = 4;
|
||||
string Time = 5;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Encryption;
|
||||
|
||||
message EncryptionSettingsProto {
|
||||
string password = 1;
|
||||
EncryprtionStatus Status = 2;
|
||||
bool NotifyUsers = 3;
|
||||
string ServerRootPath = 4;
|
||||
}
|
||||
|
||||
enum EncryprtionStatus {
|
||||
Decrypted = 0;
|
||||
EncryptionStarted = 1;
|
||||
Encrypted = 2;
|
||||
DecryptionStarted = 3;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Notify.Messages;
|
||||
|
||||
message NotifyInvoke {
|
||||
string Service = 1;
|
||||
string Method = 2;
|
||||
int32 Tenant = 3;
|
||||
repeated string Parameters = 4;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Notify.Messages;
|
||||
|
||||
message NotifyMessage {
|
||||
int32 Tenant = 1;
|
||||
string Sender = 2;
|
||||
string From = 3;
|
||||
string To = 4;
|
||||
string ReplyTo = 5;
|
||||
string Subject = 6;
|
||||
string ContentType = 7;
|
||||
string Content = 8;
|
||||
int64 CreationDate = 9;
|
||||
int32 Priority = 10;
|
||||
repeated NotifyMessageAttachment EmbeddedAttachments = 11;
|
||||
string AutoSubmitted = 12;
|
||||
}
|
||||
message NotifyMessageAttachment {
|
||||
string FileName = 1;
|
||||
string ContentId = 2;
|
||||
bytes Content = 3;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core;
|
||||
|
||||
message SubscriptionMethodCache {
|
||||
string RecipientId = 1;
|
||||
|
||||
string ActionId = 2;
|
||||
|
||||
string SourceId = 3;
|
||||
|
||||
repeated string Methods = 4;
|
||||
|
||||
int32 Tenant = 5;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core;
|
||||
|
||||
message SubscriptionRecord {
|
||||
string RecipientId = 1;
|
||||
|
||||
string ActionId = 2;
|
||||
|
||||
string ObjectId = 3;
|
||||
|
||||
string SourceId = 4;
|
||||
|
||||
bool Subscribed = 5;
|
||||
|
||||
int32 Tenant = 6;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserGroupRefCacheItem {
|
||||
bytes UserId = 1;
|
||||
bytes GroupId = 2;
|
||||
bool Removed = 3;
|
||||
string RefType = 4;
|
||||
int64 LastModified = 5;
|
||||
int32 Tenant = 6;
|
||||
}
|
15
common/ASC.Core.Common/protos/az_record_cache.proto
Normal file
15
common/ASC.Core.Common/protos/az_record_cache.proto
Normal file
@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
package ASC.Core;
|
||||
|
||||
message AzRecordCache {
|
||||
google.protobuf.StringValue subject_id = 1;
|
||||
|
||||
google.protobuf.StringValue action_id = 2;
|
||||
|
||||
google.protobuf.StringValue object_id = 3;
|
||||
|
||||
google.protobuf.StringValue reaction = 4;
|
||||
|
||||
int32 tenant = 5;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Common.Configuration;
|
||||
|
||||
message ConsumerCacheItem {
|
||||
string Name = 1;
|
||||
int32 TenantId = 2;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Common.Configuration;
|
||||
|
||||
message ConsumerCacheItem {
|
||||
string name = 1;
|
||||
int32 tenant_id = 2;
|
||||
}
|
11
common/ASC.Core.Common/protos/create_client_proto.proto
Normal file
11
common/ASC.Core.Common/protos/create_client_proto.proto
Normal file
@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Common.Notify;
|
||||
|
||||
message CreateClientProto {
|
||||
int32 tenant_id = 1;
|
||||
string token = 2;
|
||||
int32 token_lifespan = 3;
|
||||
string proxy = 4;
|
||||
string time = 5;
|
||||
}
|
@ -3,5 +3,5 @@
|
||||
package ASC.Core.Common.Notify;
|
||||
|
||||
message DisableClientProto {
|
||||
int32 TenantId= 1;
|
||||
int32 tenant_id= 1;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Encryption;
|
||||
|
||||
message EncryptionSettingsProto {
|
||||
string password = 1;
|
||||
EncryprtionStatus status = 2;
|
||||
bool notify_users = 3;
|
||||
string server_root_path = 4;
|
||||
}
|
||||
|
||||
enum EncryprtionStatus {
|
||||
DECRYPTED = 0;
|
||||
ENCRYPTION_STARTED = 1;
|
||||
ENCRYPTED = 2;
|
||||
DECRYPTION_STARTED = 3;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message GroupCacheItem {
|
||||
string ID = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message GroupCacheItem {
|
||||
string id = 1;
|
||||
}
|
10
common/ASC.Core.Common/protos/notify_invoke.proto
Normal file
10
common/ASC.Core.Common/protos/notify_invoke.proto
Normal file
@ -0,0 +1,10 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Notify.Messages;
|
||||
|
||||
message NotifyInvoke {
|
||||
string service = 1;
|
||||
string method = 2;
|
||||
int32 tenant = 3;
|
||||
repeated string parameters = 4;
|
||||
}
|
23
common/ASC.Core.Common/protos/notify_message.proto
Normal file
23
common/ASC.Core.Common/protos/notify_message.proto
Normal file
@ -0,0 +1,23 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Notify.Messages;
|
||||
|
||||
message NotifyMessage {
|
||||
int32 tenant = 1;
|
||||
string sender = 2;
|
||||
string from = 3;
|
||||
string to = 4;
|
||||
string reply_to = 5;
|
||||
string subject = 6;
|
||||
string content_type = 7;
|
||||
string content = 8;
|
||||
int64 creation_date = 9;
|
||||
int32 priority = 10;
|
||||
repeated NotifyMessageAttachment embedded_attachments = 11;
|
||||
string auto_submitted = 12;
|
||||
}
|
||||
message NotifyMessageAttachment {
|
||||
string FileName = 1;
|
||||
string ContentId = 2;
|
||||
bytes Content = 3;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message QuotaCacheItem {
|
||||
string Key = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message QuotaCacheItem {
|
||||
string key = 1;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
package ASC.Core.Common.Notify;
|
||||
|
||||
message RegisterUserProto {
|
||||
string UserId= 1;
|
||||
int32 TenantId= 2;
|
||||
string Token= 3;
|
||||
string user_id= 1;
|
||||
int32 tenant_id= 2;
|
||||
string token= 3;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Data;
|
||||
|
||||
message SettingsCacheItem {
|
||||
string Key = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Data;
|
||||
|
||||
message SettingsCacheItem {
|
||||
string key = 1;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core;
|
||||
|
||||
message SubscriptionMethodCache {
|
||||
string recipient_id = 1;
|
||||
|
||||
string action_id = 2;
|
||||
|
||||
string source_id = 3;
|
||||
|
||||
repeated string methods = 4;
|
||||
|
||||
int32 tenant = 5;
|
||||
}
|
17
common/ASC.Core.Common/protos/subscription_record.proto
Normal file
17
common/ASC.Core.Common/protos/subscription_record.proto
Normal file
@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core;
|
||||
|
||||
message SubscriptionRecord {
|
||||
string recipient_id = 1;
|
||||
|
||||
string action_id = 2;
|
||||
|
||||
string object_id = 3;
|
||||
|
||||
string source_id = 4;
|
||||
|
||||
bool subscribed = 5;
|
||||
|
||||
int32 tenant = 6;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Billing;
|
||||
|
||||
message TariffCacheItem {
|
||||
int32 TenantId = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Billing;
|
||||
|
||||
message TariffCacheItem {
|
||||
int32 tenant_id = 1;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message TenantCacheItem {
|
||||
int32 TenantId = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message TenantCacheItem {
|
||||
int32 tenant_id = 1;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message TenantSetting {
|
||||
string Key = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message TenantSetting {
|
||||
string key = 1;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserGroupRefCacheItem {
|
||||
string user_id = 1;
|
||||
string group_id = 2;
|
||||
bool removed = 3;
|
||||
string ref_type = 4;
|
||||
int64 last_modified = 5;
|
||||
int32 tenant = 6;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserInfoCacheItem {
|
||||
bytes ID = 1;
|
||||
int32 Tenant = 2;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserInfoCacheItem {
|
||||
string id = 1;
|
||||
int32 tenant = 2;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserPhotoCacheItem {
|
||||
string Key = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core.Caching;
|
||||
|
||||
message UserPhotoCacheItem {
|
||||
string key = 1;
|
||||
}
|
@ -8,15 +8,15 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="protos\BackupProgress.proto" />
|
||||
<None Remove="protos\DeleteSchedule.proto" />
|
||||
<None Remove="protos\backup_progress.proto" />
|
||||
<None Remove="protos\delete_schedule.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Grpc" Version="2.32.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -29,8 +29,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\BackupProgress.proto" />
|
||||
<Protobuf Include="protos\DeleteSchedule.proto" />
|
||||
<Protobuf Include="protos\backup_progress.proto" />
|
||||
<Protobuf Include="protos\delete_schedule.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -9,7 +9,7 @@ using ASC.Core.Billing;
|
||||
using ASC.Core.Common.Configuration;
|
||||
using ASC.Core.Users;
|
||||
using ASC.Data.Backup.Contracts;
|
||||
using ASC.Data.Backup.Service;
|
||||
using ASC.Data.Backup.Services;
|
||||
using ASC.MessagingSystem;
|
||||
using ASC.Notify.Cron;
|
||||
using ASC.Web.Core.PublicResources;
|
||||
|
@ -1,42 +0,0 @@
|
||||
|
||||
using System;
|
||||
|
||||
using ASC.Common;
|
||||
using ASC.Common.Caching;
|
||||
using ASC.Data.Backup.Contracts;
|
||||
using ASC.Data.Backup.Service;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace ASC.Data.Backup.Listerners
|
||||
{
|
||||
[Singletone]
|
||||
public class BackupListener
|
||||
{
|
||||
private ICacheNotify<DeleteSchedule> CacheDeleteSchedule { get; }
|
||||
private IServiceProvider ServiceProvider { get; }
|
||||
|
||||
public BackupListener(ICacheNotify<DeleteSchedule> cacheDeleteSchedule, IServiceProvider serviceProvider)
|
||||
{
|
||||
CacheDeleteSchedule = cacheDeleteSchedule;
|
||||
ServiceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
CacheDeleteSchedule.Subscribe((n) => DeleteScheldure(n), CacheNotifyAction.Insert);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
CacheDeleteSchedule.Unsubscribe(CacheNotifyAction.Insert);
|
||||
}
|
||||
|
||||
public void DeleteScheldure(DeleteSchedule deleteSchedule)
|
||||
{
|
||||
using var scope = ServiceProvider.CreateScope();
|
||||
var backupService = scope.ServiceProvider.GetService<BackupService>();
|
||||
backupService.DeleteSchedule(deleteSchedule.TenantId);
|
||||
}
|
||||
}
|
||||
}
|
@ -42,7 +42,7 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ASC.Data.Backup.Service
|
||||
namespace ASC.Data.Backup.Services
|
||||
{
|
||||
[Scope]
|
||||
public class BackupService : IBackupService
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
|
||||
using ASC.Common.Utils;
|
||||
|
||||
namespace ASC.Data.Backup.Service
|
||||
namespace ASC.Data.Backup.Services
|
||||
{
|
||||
public class BackupSettings
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ASC.Data.Backup.Service
|
||||
namespace ASC.Data.Backup.Services
|
||||
{
|
||||
[Singletone(Additional = typeof(BackupWorkerExtension))]
|
||||
public class BackupWorker
|
||||
|
@ -33,7 +33,7 @@ using ASC.Common.Utils;
|
||||
using ASC.Core;
|
||||
using ASC.Data.Backup.Contracts;
|
||||
using ASC.Data.Backup.EF.Model;
|
||||
using ASC.Data.Backup.Service;
|
||||
using ASC.Data.Backup.Services;
|
||||
using ASC.Data.Backup.Utils;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
|
@ -1,18 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Data.Backup.Contracts;
|
||||
|
||||
message BackupProgress {
|
||||
bool IsCompleted = 1;
|
||||
int32 Progress = 2;
|
||||
string Error = 3;
|
||||
string Link = 4;
|
||||
int32 TenantId = 5;
|
||||
BackupProgressEnum BackupProgressEnum = 6;
|
||||
}
|
||||
|
||||
enum BackupProgressEnum {
|
||||
Backup = 0;
|
||||
Restore = 1;
|
||||
Transfer = 2;
|
||||
}
|
18
common/ASC.Data.Backup.Core/protos/backup_progress.proto
Normal file
18
common/ASC.Data.Backup.Core/protos/backup_progress.proto
Normal file
@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Data.Backup.Contracts;
|
||||
|
||||
message BackupProgress {
|
||||
bool is_completed = 1;
|
||||
int32 progress = 2;
|
||||
string error = 3;
|
||||
string link = 4;
|
||||
int32 tenant_id = 5;
|
||||
BackupProgressEnum backup_progress_enum = 6;
|
||||
}
|
||||
|
||||
enum BackupProgressEnum {
|
||||
BACKUP = 0;
|
||||
RESTORE = 1;
|
||||
TRANSFER = 2;
|
||||
}
|
@ -3,5 +3,5 @@
|
||||
package ASC.Data.Backup.Contracts;
|
||||
|
||||
message DeleteSchedule {
|
||||
int32 TenantId = 1;
|
||||
int32 tenant_id = 1;
|
||||
}
|
@ -22,11 +22,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="protos\EncryptionStop.proto" />
|
||||
<None Remove="protos\MigrationCache.proto" />
|
||||
<None Remove="protos\MigrationProgress.proto" />
|
||||
<None Remove="protos\MigrationUploadCdn.proto" />
|
||||
<None Remove="protos\ProgressEncryption.proto" />
|
||||
<None Remove="protos\encryption_stop.proto" />
|
||||
<None Remove="protos\migration_cache.proto" />
|
||||
<None Remove="protos\migration_progress.proto" />
|
||||
<None Remove="protos\migration_upload_cdn.proto" />
|
||||
<None Remove="protos\progress_encryption.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -38,7 +38,7 @@
|
||||
<PackageReference Include="Google.Apis.Core" Version="1.49.0" />
|
||||
<PackageReference Include="Google.Apis.Storage.v1" Version="1.49.0.2102" />
|
||||
<PackageReference Include="Google.Cloud.Storage.V1" Version="3.3.0" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -50,12 +50,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\DataStoreCacheItem.proto" />
|
||||
<Protobuf Include="protos\EncryptionStop.proto" />
|
||||
<Protobuf Include="protos\MigrationCache.proto" />
|
||||
<Protobuf Include="protos\MigrationProgress.proto" />
|
||||
<Protobuf Include="protos\MigrationUploadCdn.proto" />
|
||||
<Protobuf Include="protos\ProgressEncryption.proto" />
|
||||
<Protobuf Include="protos\data_store_cache_item.proto" />
|
||||
<Protobuf Include="protos\encryption_stop.proto" />
|
||||
<Protobuf Include="protos\migration_cache.proto" />
|
||||
<Protobuf Include="protos\migration_progress.proto" />
|
||||
<Protobuf Include="protos\migration_upload_cdn.proto" />
|
||||
<Protobuf Include="protos\progress_encryption.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -102,7 +102,7 @@ namespace ASC.Data.Storage.Migration
|
||||
|
||||
public void Migrate(int tenant, StorageSettings storageSettings)
|
||||
{
|
||||
var storSettings = new StorSettings { ID = storageSettings.ID.ToString(), Module = storageSettings.Module };
|
||||
var storSettings = new StorSettings { Id = storageSettings.ID.ToString(), Module = storageSettings.Module };
|
||||
|
||||
CacheMigrationNotify.Publish(new MigrationCache
|
||||
{
|
||||
@ -114,7 +114,7 @@ namespace ASC.Data.Storage.Migration
|
||||
|
||||
public void UploadCdn(int tenantId, string relativePath, string mappedPath, CdnStorageSettings settings = null)
|
||||
{
|
||||
var cdnStorSettings = new CdnStorSettings { ID = settings.ID.ToString(), Module = settings.Module };
|
||||
var cdnStorSettings = new CdnStorSettings { Id = settings.ID.ToString(), Module = settings.Module };
|
||||
|
||||
UploadCdnMigrationNotify.Publish(new MigrationUploadCdn
|
||||
{
|
||||
|
@ -1,11 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Protos.Migration;
|
||||
|
||||
message MigrationProgress{
|
||||
bool IsCompleted = 1;
|
||||
double Progress = 2;
|
||||
string Error = 3;
|
||||
string Link = 4;
|
||||
int32 TenantId = 5;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Protos.Migration;
|
||||
|
||||
message MigrationUploadCdn {
|
||||
int32 Tenant = 1;
|
||||
string RelativePath = 2;
|
||||
string MappedPath = 3;
|
||||
CdnStorSettings CdnStorSettings = 4;
|
||||
}
|
||||
|
||||
message CdnStorSettings {
|
||||
string ID = 1;
|
||||
string Module = 2;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Core;
|
||||
|
||||
message DataStoreCacheItem {
|
||||
string Module = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
string TenantId = 2;
|
||||
package ASC.Core;
|
||||
|
||||
message DataStoreCacheItem {
|
||||
string module = 1;
|
||||
|
||||
string tenant_id = 2;
|
||||
}
|
@ -3,12 +3,12 @@ syntax = "proto3";
|
||||
package ASC.Protos.Migration;
|
||||
|
||||
message MigrationCache {
|
||||
int32 TenantId = 1;
|
||||
StorSettings StorSettings = 2;
|
||||
int32 tenant_id = 1;
|
||||
StorSettings stor_settings = 2;
|
||||
}
|
||||
|
||||
message StorSettings {
|
||||
string ID = 1;
|
||||
string Module = 2;
|
||||
string id = 1;
|
||||
string module = 2;
|
||||
}
|
||||
|
11
common/ASC.Data.Storage/protos/migration_progress.proto
Normal file
11
common/ASC.Data.Storage/protos/migration_progress.proto
Normal file
@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Protos.Migration;
|
||||
|
||||
message MigrationProgress{
|
||||
bool is_completed = 1;
|
||||
double progress = 2;
|
||||
string error = 3;
|
||||
string link = 4;
|
||||
int32 tenant_id = 5;
|
||||
}
|
16
common/ASC.Data.Storage/protos/migration_upload_cdn.proto
Normal file
16
common/ASC.Data.Storage/protos/migration_upload_cdn.proto
Normal file
@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.Protos.Migration;
|
||||
|
||||
message MigrationUploadCdn {
|
||||
int32 tenant = 1;
|
||||
string relative_path = 2;
|
||||
string mapped_path = 3;
|
||||
CdnStorSettings cdn_stor_settings = 4;
|
||||
}
|
||||
|
||||
message CdnStorSettings {
|
||||
string id = 1;
|
||||
string module = 2;
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
package ASC.Data.Storage.Encryption;
|
||||
|
||||
message ProgressEncryption {
|
||||
double Progress = 1;
|
||||
int32 TenantId = 2;
|
||||
double progress = 1;
|
||||
int32 tenant_id = 2;
|
||||
}
|
@ -26,7 +26,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetOpenAuth.Ultimate" Version="4.3.4.13329" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -37,7 +37,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\LinkerCacheItem.proto" />
|
||||
<Protobuf Include="protos\linker_cache_item.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.FederatedLogin;
|
||||
|
||||
message LinkerCacheItem {
|
||||
string Obj = 1;
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.FederatedLogin;
|
||||
|
||||
message LinkerCacheItem {
|
||||
string obj = 1;
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -24,6 +24,6 @@
|
||||
<ProjectReference Include="..\ASC.Core.Common\ASC.Core.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\IPRestrictionItem.proto" />
|
||||
<Protobuf Include="protos\ip_restriction_item.proto" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.IPSecurity;
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package ASC.IPSecurity;
|
||||
|
||||
message IPRestrictionItem {
|
||||
int32 TenantId = 1;
|
||||
int32 tenant_id = 1;
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Grpc.Tools" Version="2.32.0">
|
||||
<PackageReference Include="Grpc.Tools" Version="2.40.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@ -34,6 +34,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="protos\CachedVoipItem.proto" />
|
||||
<Protobuf Include="protos\cached_voip_item.proto" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user