Merge branch 'feature/files' into feature/payments-enterprise

# Conflicts:
#	web/ASC.Web.Client/src/App.js
#	web/ASC.Web.Client/src/components/pages/Settings/categories/security/sub-components/admins.js
#	web/ASC.Web.Components/src/components/icons/svg/index.js
This commit is contained in:
TatianaLopaeva 2020-08-28 10:57:59 +03:00
commit 2022bd4ac1
648 changed files with 50765 additions and 8968 deletions

17
.nuget/NuGet.Config Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<config>
<add key="repositorypath" value="$\..\..\packages" />
</config>
<packageSources>
<add key="Custom NuGet Server" value="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>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -26,8 +26,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.Core", "web\ASC.Web
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.VoipService", "common\ASC.VoipService\ASC.VoipService.csproj", "{988536C1-4B89-4649-8F77-5C16F55D95D1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Resource.Manager", "common\ASC.Resource.Manager\ASC.Resource.Manager.csproj", "{5A4A13CC-8EDD-4FDB-8C75-29E2B14A47F2}"
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}"
@ -48,8 +46,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ElasticSearch", "common
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}") = "AppLimit.CloudComputing.SharpBox", "thirdparty\AppLimit.CloudComputing.SharpBox\AppLimit.CloudComputing.SharpBox.csproj", "{5B53855C-4347-4402-B750-76C6295A35D3}"
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.ApiSystem", "common\services\ASC.ApiSystem\ASC.ApiSystem.csproj", "{C2BB03A0-C35B-433F-96D4-3A06CBC06AD7}"
@ -62,12 +58,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Thumbnails.Svc", "commo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup", "common\services\ASC.Data.Backup\ASC.Data.Backup.csproj", "{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Graph.Core", "thirdparty\Microsoft.Graph.Core\Microsoft.Graph.Core.csproj", "{D4C1A5C9-2327-4181-B7FD-005ED240B09F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OneDrive.Sdk", "thirdparty\onedrive-sdk-csharp-master\src\OneDriveSdk\Microsoft.OneDrive.Sdk.csproj", "{D78506D2-CC97-4063-A800-B16F5A063DE9}"
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.Socket.IO.Svc", "common\services\ASC.Socket.IO.Svc\ASC.Socket.IO.Svc.csproj", "{2DADEAD3-0FE9-4199-9817-41A32E6BF450}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -114,10 +108,6 @@ Global
{988536C1-4B89-4649-8F77-5C16F55D95D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{988536C1-4B89-4649-8F77-5C16F55D95D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{988536C1-4B89-4649-8F77-5C16F55D95D1}.Release|Any CPU.Build.0 = Release|Any CPU
{5A4A13CC-8EDD-4FDB-8C75-29E2B14A47F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A4A13CC-8EDD-4FDB-8C75-29E2B14A47F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A4A13CC-8EDD-4FDB-8C75-29E2B14A47F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A4A13CC-8EDD-4FDB-8C75-29E2B14A47F2}.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
@ -158,10 +148,6 @@ Global
{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
{5B53855C-4347-4402-B750-76C6295A35D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B53855C-4347-4402-B750-76C6295A35D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B53855C-4347-4402-B750-76C6295A35D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B53855C-4347-4402-B750-76C6295A35D3}.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
@ -186,18 +172,14 @@ Global
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Release|Any CPU.Build.0 = Release|Any CPU
{D4C1A5C9-2327-4181-B7FD-005ED240B09F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4C1A5C9-2327-4181-B7FD-005ED240B09F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4C1A5C9-2327-4181-B7FD-005ED240B09F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4C1A5C9-2327-4181-B7FD-005ED240B09F}.Release|Any CPU.Build.0 = Release|Any CPU
{D78506D2-CC97-4063-A800-B16F5A063DE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D78506D2-CC97-4063-A800-B16F5A063DE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D78506D2-CC97-4063-A800-B16F5A063DE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D78506D2-CC97-4063-A800-B16F5A063DE9}.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
{2DADEAD3-0FE9-4199-9817-41A32E6BF450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DADEAD3-0FE9-4199-9817-41A32E6BF450}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DADEAD3-0FE9-4199-9817-41A32E6BF450}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DADEAD3-0FE9-4199-9817-41A32E6BF450}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -27,6 +27,9 @@ call build\scripts\urlshortener.sh
echo "ASC.Thumbnails"
call build\scripts\thumbnails.sh
echo "ASC.Socket.IO"
call build\scripts\socket.sh
echo "ASC.Web.sln"
call dotnet build ASC.Web.sln /fl1 /flp1:LogFile=build/ASC.Web.log;Verbosity=Normal

View File

@ -140,43 +140,45 @@ RUN cd /app/onlyoffice/src/ && \
cp -f config/nginx/onlyoffice*.conf /etc/nginx/conf.d/ && \
mkdir -p /etc/nginx/includes/ && cp -f config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && \
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
dotnet restore ASC.Web.sln --configfile .nuget/NuGet.Config && \
dotnet build -r linux-x64 ASC.Web.sln && \
cd products/ASC.People/Server && \
dotnet -d publish -o /var/www/products/ASC.People/server && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/products/ASC.People/server && \
cd ../../../ && \
cd products/ASC.Files/Server && \
dotnet -d publish -o /var/www/products/ASC.Files/server && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/products/ASC.Files/server && \
cp -avrf DocStore /var/www/products/ASC.Files/server/ && \
cd ../../../ && \
cd products/ASC.Files/Service && \
dotnet -d publish -o /var/www/products/ASC.Files/service && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/products/ASC.Files/service && \
cd ../../../ && \
cd web/ASC.Web.Api && \
dotnet -d publish -o /var/www/studio/api && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/studio/api && \
cd ../../ && \
cd web/ASC.Web.Studio && \
dotnet -d publish -o /var/www/studio/server && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/studio/server && \
cd ../../ && \
cd common/services/ASC.Data.Backup && \
dotnet -d publish -o /var/www/services/backup && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/services/backup && \
cd ../../../ && \
cd common/services/ASC.Notify && \
dotnet -d publish -o /var/www/services/notify && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/services/notify && \
cd ../../../ && \
cd common/services/ASC.ApiSystem && \
dotnet -d publish -o /var/www/services/apisystem && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/services/apisystem && \
cd ../../../ && \
cd common/services/ASC.Thumbnails.Svc && \
dotnet -d publish -o /services/thumb/service && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /services/thumb/service && \
cd ../../../ && \
yarn install --cwd common/ASC.Thumbnails --frozen-lockfile && \
mkdir -p /var/www/services/thumb/client && cp -Rf common/ASC.Thumbnails/* /var/www/services/thumb/client && \
cd common/services/ASC.UrlShortener.Svc && \
dotnet -d publish -o /services/urlshortener/service && \
dotnet -d publish --no-build --self-contained -r linux-x64 -o /services/urlshortener/service && \
cd ../../../ && \
yarn install --cwd common/ASC.UrlShortener --frozen-lockfile && \
mkdir -p /var/www/services/urlshortener/client && cp -Rf common/ASC.UrlShortener/* /var/www/services/urlshortener/client && \
cd common/services/ASC.Studio.Notify && \
dotnet -d publish -o /var/www/services/studio.notify
dotnet -d publish --no-build --self-contained -r linux-x64 -o /var/www/services/studio.notify
COPY config/mysql/conf.d/mysql.cnf /etc/mysql/conf.d/mysql.cnf
COPY config/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

2
build/run/Socket.IO.bat Normal file
View File

@ -0,0 +1,2 @@
echo "RUN ASC.Socket.IO.Svc"
call dotnet run --project ..\..\common\services\ASC.Socket.IO.Svc\ASC.Socket.IO.Svc.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=socket

View File

@ -1,2 +1,2 @@
echo "RUN ASC.Web.Studio"
echo "RUN ASC.Thumbnails.Svc"
call dotnet run --project ..\..\common\services\ASC.Thumbnails.Svc\ASC.Thumbnails.Svc.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=thumbnails

1
build/scripts/socket.sh Normal file
View File

@ -0,0 +1 @@
yarn install --cwd common/ASC.Socket.IO --frozen-lockfile

View File

@ -12,10 +12,6 @@
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\web\ASC.Web.Core\ASC.Web.Core.csproj" />
<ProjectReference Include="..\ASC.Common\ASC.Common.csproj" />

View File

@ -48,13 +48,13 @@ namespace ASC.Api.Core.Auth
ServiceProvider = serviceProvider;
}
public SecurityContext SecurityContext { get; }
public EmailValidationKeyProvider EmailValidationKeyProvider { get; }
public SetupInfo SetupInfo { get; }
public TenantManager TenantManager { get; }
public UserManager UserManager { get; }
public AuthManager AuthManager { get; }
public AuthContext AuthContext { get; }
private SecurityContext SecurityContext { get; }
private EmailValidationKeyProvider EmailValidationKeyProvider { get; }
private SetupInfo SetupInfo { get; }
private TenantManager TenantManager { get; }
private UserManager UserManager { get; }
private AuthManager AuthManager { get; }
private AuthContext AuthContext { get; }
public IServiceProvider ServiceProvider { get; }
protected override Task<AuthenticateResult> HandleAuthenticateAsync()

View File

@ -24,7 +24,7 @@ namespace ASC.Api.Core.Auth
SecurityContext = securityContext;
}
public SecurityContext SecurityContext { get; }
private SecurityContext SecurityContext { get; }
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{

View File

@ -39,7 +39,7 @@ namespace ASC.Api.Core
public class ApiContext : ICloneable
{
public IHttpContextAccessor HttpContextAccessor { get; set; }
private Tenant tenant;
public Tenant tenant;
public Tenant Tenant { get { return tenant ?? (tenant = TenantManager.GetCurrentTenant(HttpContextAccessor.HttpContext)); } }
public ApiContext(IHttpContextAccessor httpContextAccessor, SecurityContext securityContext, TenantManager tenantManager)
@ -199,8 +199,8 @@ namespace ASC.Api.Core
}
}
public SecurityContext SecurityContext { get; }
public TenantManager TenantManager { get; }
private SecurityContext SecurityContext { get; }
private TenantManager TenantManager { get; }
public ApiContext SetCount(int count)
{

View File

@ -289,8 +289,8 @@ namespace ASC.Api.Core
public DateTime UtcTime { get; private set; }
public TimeSpan TimeZoneOffset { get; private set; }
public TenantManager TenantManager { get; }
public TimeZoneConverter TimeZoneConverter { get; }
private TenantManager TenantManager { get; }
private TimeZoneConverter TimeZoneConverter { get; }
public static ApiDateTime GetSample()
{
@ -350,8 +350,8 @@ namespace ASC.Api.Core
public class ApiDateTimeHelper
{
public TenantManager TenantManager { get; }
public TimeZoneConverter TimeZoneConverter { get; }
private TenantManager TenantManager { get; }
private TimeZoneConverter TimeZoneConverter { get; }
public ApiDateTimeHelper(TenantManager tenantManager, TimeZoneConverter timeZoneConverter)
{

View File

@ -26,9 +26,9 @@ namespace ASC.Api.Core.Middleware
this.IPSecurity = IPSecurity;
}
public AuthContext AuthContext { get; }
private AuthContext AuthContext { get; }
public IPRestrictionsSettings IPRestrictionsSettings { get; }
public IPSecurity.IPSecurity IPSecurity { get; }
private IPSecurity.IPSecurity IPSecurity { get; }
public void OnResourceExecuted(ResourceExecutedContext context)
{

View File

@ -24,7 +24,7 @@ namespace ASC.Api.Core.Middleware
TenantExtra = tenantExtra;
}
public TenantExtra TenantExtra { get; }
private TenantExtra TenantExtra { get; }
public void OnResourceExecuted(ResourceExecutedContext context)
{

View File

@ -22,10 +22,10 @@ namespace ASC.Api.Core.Middleware
private static readonly IDictionary<string, Guid> products;
private readonly ILog log;
public UserManager UserManager { get; }
public TenantManager TenantManager { get; }
public WebItemSecurity WebItemSecurity { get; }
public AuthContext AuthContext { get; }
private UserManager UserManager { get; }
private TenantManager TenantManager { get; }
private WebItemSecurity WebItemSecurity { get; }
private AuthContext AuthContext { get; }
static ProductSecurityFilter()
{

View File

@ -21,7 +21,7 @@ namespace ASC.Api.Core.Middleware
TenantManager = tenantManager;
}
public TenantManager TenantManager { get; }
private TenantManager TenantManager { get; }
public void OnResourceExecuted(ResourceExecutedContext context)
{

View File

@ -35,7 +35,7 @@ namespace ASC.Common.Caching
{
public class AscCacheNotify
{
public ICacheNotify<AscCacheItem> CacheNotify { get; }
private ICacheNotify<AscCacheItem> CacheNotify { get; }
public AscCacheNotify(ICacheNotify<AscCacheItem> cacheNotify)
{

View File

@ -32,7 +32,7 @@ namespace ASC.Common.Logging
public class EFLoggerProvider : ILoggerProvider
{
public IOptionsMonitor<ILog> Option { get; }
private IOptionsMonitor<ILog> Option { get; }
public EFLoggerProvider(IOptionsMonitor<ILog> option)
{

View File

@ -379,7 +379,7 @@ namespace ASC.Common.Logging
Configuration = configuration;
}
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
public void Configure(LogNLog options)
{

View File

@ -35,7 +35,7 @@ namespace ASC.Security.Cryptography
{
public class InstanceCrypto
{
public MachinePseudoKeys MachinePseudoKeys { get; }
private MachinePseudoKeys MachinePseudoKeys { get; }
public InstanceCrypto(MachinePseudoKeys machinePseudoKeys)
{

View File

@ -97,7 +97,7 @@ namespace ASC.Common.Threading
private readonly TaskScheduler scheduler;
private readonly ConcurrentDictionary<string, CancellationTokenSource> cancelations;
public DistributedTaskCacheNotify DistributedTaskCacheNotify { get; }
private DistributedTaskCacheNotify DistributedTaskCacheNotify { get; }
static DistributedTaskQueue()
{

View File

@ -48,7 +48,7 @@ namespace ASC.Common.Threading.Progress
Log = log;
}
public IOptionsMonitor<ILog> Log { get; }
private IOptionsMonitor<ILog> Log { get; }
public void PostConfigure(string name, ProgressQueue<T> queue)
{

View File

@ -47,7 +47,7 @@ namespace ASC.Common.Threading.Workers
Log = log;
}
public IOptionsMonitor<ILog> Log { get; }
private IOptionsMonitor<ILog> Log { get; }
public void Configure(Workers.WorkerQueue<T> queue)
{

View File

@ -41,7 +41,7 @@ namespace ASC.Common.Utils
MachinePseudoKeys = machinePseudoKeys;
}
public MachinePseudoKeys MachinePseudoKeys { get; }
private MachinePseudoKeys MachinePseudoKeys { get; }
public string Create<T>(T obj)
{

View File

@ -51,7 +51,7 @@ namespace ASC.Core.Common
private UriBuilder _serverRoot;
private string _vpath;
public IHttpContextAccessor HttpContextAccessor { get; set; }
protected IHttpContextAccessor HttpContextAccessor { get; set; }
public BaseCommonLinkUtility(
CoreBaseSettings coreBaseSettings,
@ -108,9 +108,9 @@ namespace ASC.Core.Common
get { return ToAbsolute("~"); }
}
public CoreBaseSettings CoreBaseSettings { get; }
public CoreSettings CoreSettings { get; }
public TenantManager TenantManager { get; }
protected CoreBaseSettings CoreBaseSettings { get; }
private CoreSettings CoreSettings { get; }
private TenantManager TenantManager { get; }
private string serverRootPath;
public string ServerRootPath

View File

@ -324,11 +324,11 @@ namespace ASC.Core.Billing
}
}
public UserManager UserManager { get; }
public TenantManager TenantManager { get; }
public PaymentManager PaymentManager { get; }
public CoreSettings CoreSettings { get; }
public IConfiguration Configuration { get; }
private UserManager UserManager { get; }
private TenantManager TenantManager { get; }
private PaymentManager PaymentManager { get; }
private CoreSettings CoreSettings { get; }
private IConfiguration Configuration { get; }
}
public static class LicenseReaderExtension

View File

@ -46,7 +46,7 @@ namespace ASC.Core.Billing
public class TariffServiceStorage
{
public ICache Cache { get; }
public ICacheNotify<TariffCacheItem> Notify { get; }
internal ICacheNotify<TariffCacheItem> Notify { get; }
public TariffServiceStorage(ICacheNotify<TariffCacheItem> notify)
{
@ -98,14 +98,14 @@ namespace ASC.Core.Billing
ILog = iLog;
}
public IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
public IOptionsSnapshot<CachedTenantService> TenantService { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public CoreSettings CoreSettings { get; }
public IConfiguration Configuration { get; }
public DbContextManager<CoreDbContext> CoreDbContextManager { get; }
public TariffServiceStorage TariffServiceStorage { get; }
public IOptionsMonitor<ILog> ILog { get; }
private IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
private IOptionsSnapshot<CachedTenantService> TenantService { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private CoreSettings CoreSettings { get; }
private IConfiguration Configuration { get; }
private DbContextManager<CoreDbContext> CoreDbContextManager { get; }
private TariffServiceStorage TariffServiceStorage { get; }
private IOptionsMonitor<ILog> ILog { get; }
public void Configure(string name, TariffService options)
{
@ -152,12 +152,12 @@ namespace ASC.Core.Billing
internal int PaymentDelay { get; set; }
public TimeSpan CacheExpiration { get; set; }
public CoreBaseSettings CoreBaseSettings { get; set; }
public CoreSettings CoreSettings { get; set; }
public IConfiguration Configuration { get; set; }
public CoreDbContext CoreDbContext { get; set; }
public TariffServiceStorage TariffServiceStorage { get; set; }
public IOptionsMonitor<ILog> Options { get; set; }
internal CoreBaseSettings CoreBaseSettings { get; set; }
internal CoreSettings CoreSettings { get; set; }
internal IConfiguration Configuration { get; set; }
internal CoreDbContext CoreDbContext { get; set; }
internal TariffServiceStorage TariffServiceStorage { get; set; }
internal IOptionsMonitor<ILog> Options { get; set; }
public TariffService()
{

View File

@ -85,9 +85,9 @@ namespace ASC.Core.Billing
get { return "Tariffs synchronizer"; }
}
public IServiceProvider ServiceProvider { get; }
public IConfiguration Configuration { get; }
public DbQuotaService DbQuotaService { get; }
private IServiceProvider ServiceProvider { get; }
private IConfiguration Configuration { get; }
private DbQuotaService DbQuotaService { get; }
public void Start()
{
@ -132,9 +132,9 @@ namespace ASC.Core.Billing
DbQuotaService = dbQuotaService;
}
public TenantManager TenantManager { get; }
public CoreSettings CoreSettings { get; }
public DbQuotaService DbQuotaService { get; }
private TenantManager TenantManager { get; }
private CoreSettings CoreSettings { get; }
private DbQuotaService DbQuotaService { get; }
public void Sync()
{

View File

@ -81,8 +81,8 @@ namespace ASC.Core.Caching
class ConfigureCachedQuotaService : IConfigureNamedOptions<CachedQuotaService>
{
public IOptionsSnapshot<DbQuotaService> Service { get; }
public QuotaServiceCache QuotaServiceCache { get; }
private IOptionsSnapshot<DbQuotaService> Service { get; }
private QuotaServiceCache QuotaServiceCache { get; }
public ConfigureCachedQuotaService(
IOptionsSnapshot<DbQuotaService> service,

View File

@ -154,8 +154,8 @@ namespace ASC.Core.Caching
class ConfigureCachedTenantService : IConfigureNamedOptions<CachedTenantService>
{
public IOptionsSnapshot<DbTenantService> Service { get; }
public TenantServiceCache TenantServiceCache { get; }
private IOptionsSnapshot<DbTenantService> Service { get; }
private TenantServiceCache TenantServiceCache { get; }
public ConfigureCachedTenantService(
IOptionsSnapshot<DbTenantService> service,

View File

@ -50,11 +50,11 @@ namespace ASC.Core.Caching
public TrustInterval TrustInterval { get; set; }
public ICache Cache { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public ICacheNotify<UserInfoCacheItem> CacheUserInfoItem { get; }
public ICacheNotify<UserPhotoCacheItem> CacheUserPhotoItem { get; }
public ICacheNotify<GroupCacheItem> CacheGroupCacheItem { get; }
public ICacheNotify<UserGroupRefCacheItem> CacheUserGroupRefItem { get; }
internal CoreBaseSettings CoreBaseSettings { get; }
internal ICacheNotify<UserInfoCacheItem> CacheUserInfoItem { get; }
internal ICacheNotify<UserPhotoCacheItem> CacheUserPhotoItem { get; }
internal ICacheNotify<GroupCacheItem> CacheGroupCacheItem { get; }
internal ICacheNotify<UserGroupRefCacheItem> CacheUserGroupRefItem { get; }
public UserServiceCache(
CoreBaseSettings coreBaseSettings,
@ -139,9 +139,9 @@ namespace ASC.Core.Caching
class ConfigureCachedUserService : IConfigureNamedOptions<CachedUserService>
{
public IOptionsSnapshot<EFUserService> Service { get; }
public UserServiceCache UserServiceCache { get; }
public CoreBaseSettings CoreBaseSettings { get; }
internal IOptionsSnapshot<EFUserService> Service { get; }
internal UserServiceCache UserServiceCache { get; }
internal CoreBaseSettings CoreBaseSettings { get; }
public ConfigureCachedUserService(
IOptionsSnapshot<EFUserService> service,

View File

@ -79,12 +79,12 @@ namespace ASC.Core.Common.Configuration
private readonly bool OnlyDefault;
public TenantManager TenantManager { get; set; }
public CoreBaseSettings CoreBaseSettings { get; set; }
public CoreSettings CoreSettings { get; set; }
public ConsumerFactory ConsumerFactory { get; set; }
public IConfiguration Configuration { get; }
public ICacheNotify<ConsumerCacheItem> Cache { get; }
internal protected TenantManager TenantManager { get; set; }
internal protected CoreBaseSettings CoreBaseSettings { get; set; }
internal protected CoreSettings CoreSettings { get; set; }
internal protected ConsumerFactory ConsumerFactory { get; set; }
internal protected IConfiguration Configuration { get; }
internal protected ICacheNotify<ConsumerCacheItem> Cache { get; }
public bool IsSet
{
@ -144,7 +144,7 @@ namespace ASC.Core.Common.Configuration
IConfiguration configuration,
ICacheNotify<ConsumerCacheItem> cache,
ConsumerFactory consumerFactory,
string name, int order, Dictionary<string, string> props, Dictionary<string, string> additional)
string name, int order, Dictionary<string, string> props, Dictionary<string, string> additional = null)
: this(tenantManager, coreBaseSettings, coreSettings, configuration, cache, consumerFactory)
{
Name = name;
@ -409,7 +409,7 @@ namespace ASC.Core.Common.Configuration
}
return new T();
}
}
public T Get<T>() where T : Consumer, new()
{

View File

@ -40,8 +40,8 @@ namespace ASC.Core
{
private readonly IUserService userService;
public UserManager UserManager { get; }
public UserFormatter UserFormatter { get; }
private UserManager UserManager { get; }
private UserFormatter UserFormatter { get; }
public AuthManager(IUserService service, UserManager userManager, UserFormatter userFormatter)
{

View File

@ -46,7 +46,7 @@ namespace ASC.Core
private bool? personal;
private bool? customMode;
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
public CoreBaseSettings(IConfiguration configuration)
{
@ -75,9 +75,9 @@ namespace ASC.Core
class ConfigureCoreSettings : IConfigureNamedOptions<CoreSettings>
{
public IOptionsSnapshot<CachedTenantService> TenantService { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public IConfiguration Configuration { get; }
private IOptionsSnapshot<CachedTenantService> TenantService { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private IConfiguration Configuration { get; }
public ConfigureCoreSettings(
IOptionsSnapshot<CachedTenantService> tenantService,
@ -305,9 +305,9 @@ namespace ASC.Core
set { SaveSetting("SmtpSettings", value?.Serialize(), TenantManager.GetCurrentTenant().TenantId); }
}
public CoreSettings CoreSettings { get; }
public TenantManager TenantManager { get; }
public IConfiguration Configuration { get; }
private CoreSettings CoreSettings { get; }
private TenantManager TenantManager { get; }
private IConfiguration Configuration { get; }
#region Methods Get/Save Setting

View File

@ -52,8 +52,8 @@ namespace ASC.Core
private readonly string partnerUrl;
private readonly string partnerKey;
public TenantManager TenantManager { get; }
public IConfiguration Configuration { get; }
private TenantManager TenantManager { get; }
private IConfiguration Configuration { get; }
public PaymentManager(TenantManager tenantManager, ITariffService tariffService, IConfiguration configuration)
{

View File

@ -44,12 +44,12 @@ namespace ASC.Core
{
class ConfigureTenantManager : IConfigureNamedOptions<TenantManager>
{
public IOptionsSnapshot<CachedTenantService> TenantService { get; }
public IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
public IOptionsSnapshot<TariffService> TariffService { get; }
public IHttpContextAccessor HttpContextAccessor { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public CoreSettings CoreSettings { get; }
private IOptionsSnapshot<CachedTenantService> TenantService { get; }
private IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
private IOptionsSnapshot<TariffService> TariffService { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private CoreSettings CoreSettings { get; }
public ConfigureTenantManager(
IOptionsSnapshot<CachedTenantService> tenantService,

View File

@ -43,7 +43,7 @@ namespace ASC.Core
public class UserManagerConstants
{
public IDictionary<Guid, UserInfo> SystemUsers { get; }
public Constants Constants { get; }
internal Constants Constants { get; }
public UserManagerConstants(Constants constants)
{

View File

@ -72,7 +72,7 @@ namespace ASC.Core
private TenantManager TenantManager { get; }
private UserFormatter UserFormatter { get; }
private CookieStorage CookieStorage { get; }
public TenantCookieSettingsHelper TenantCookieSettingsHelper { get; }
private TenantCookieSettingsHelper TenantCookieSettingsHelper { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
public SecurityContext(
@ -288,8 +288,8 @@ namespace ASC.Core
public class PermissionContext
{
public IPermissionResolver PermissionResolver { get; private set; }
public AuthContext AuthContext { get; }
public IPermissionResolver PermissionResolver { get; set; }
private AuthContext AuthContext { get; }
public PermissionContext(IPermissionResolver permissionResolver, AuthContext authContext)
{

View File

@ -134,9 +134,9 @@ namespace TMResourceData
get { return typeof(DBResourceSet); }
}
public IConfiguration Configuration { get; }
public IOptionsMonitor<ILog> Option { get; }
public DbContextManager<ResourceDbContext> DbContext { get; }
private IConfiguration Configuration { get; }
private IOptionsMonitor<ILog> Option { get; }
private DbContextManager<ResourceDbContext> DbContext { get; }
protected override ResourceSet InternalGetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents)
{
@ -163,9 +163,9 @@ namespace TMResourceData
private readonly string filename;
private readonly ILog log;
public IConfiguration Configuration { get; }
public IOptionsMonitor<ILog> Option { get; }
public DbContextManager<ResourceDbContext> DbContext { get; }
private IConfiguration Configuration { get; }
private IOptionsMonitor<ILog> Option { get; }
private DbContextManager<ResourceDbContext> DbContext { get; }
public DBResourceSet(
IConfiguration configuration,
@ -289,7 +289,7 @@ namespace TMResourceData
private readonly ConcurrentDictionary<int, string> whiteLabelDictionary;
public string DefaultLogoText;
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
public WhiteLabelHelper(IConfiguration configuration, IOptionsMonitor<ILog> option)
{

View File

@ -38,7 +38,7 @@ namespace ASC.Core.Data
{
class ConfigureDbQuotaService : IConfigureNamedOptions<DbQuotaService>
{
public DbContextManager<CoreDbContext> DbContextManager { get; }
private DbContextManager<CoreDbContext> DbContextManager { get; }
public string DbId { get; set; }
public ConfigureDbQuotaService(DbContextManager<CoreDbContext> dbContextManager)

View File

@ -44,7 +44,7 @@ namespace ASC.Core.Data
public class DbSettingsManagerCache
{
public ICache Cache { get; }
public ICacheNotify<SettingsCacheItem> Notify { get; }
private ICacheNotify<SettingsCacheItem> Notify { get; }
public DbSettingsManagerCache(ICacheNotify<SettingsCacheItem> notify)
{

View File

@ -42,8 +42,8 @@ namespace ASC.Core.Data
{
public class ConfigureDbTenantService : IConfigureNamedOptions<DbTenantService>
{
public TenantDomainValidator TenantDomainValidator { get; }
public DbContextManager<TenantDbContext> DbContextManager { get; }
private TenantDomainValidator TenantDomainValidator { get; }
private DbContextManager<TenantDbContext> DbContextManager { get; }
public ConfigureDbTenantService(
TenantDomainValidator tenantDomainValidator,

View File

@ -40,7 +40,7 @@ namespace ASC.Core.Data
{
public class ConfigureEFUserService : IConfigureNamedOptions<EFUserService>
{
public DbContextManager<UserDbContext> DbContextManager { get; }
private DbContextManager<UserDbContext> DbContextManager { get; }
public string DbId { get; set; }
public ConfigureEFUserService(DbContextManager<UserDbContext> dbContextManager)

View File

@ -12,8 +12,8 @@ namespace ASC.Core.Common.EF
public class ConfigureDbContext : IConfigureNamedOptions<BaseDbContext>
{
const string baseName = "default";
public EFLoggerFactory LoggerFactory { get; }
public IConfiguration Configuration { get; }
private EFLoggerFactory LoggerFactory { get; }
private IConfiguration Configuration { get; }
public ConfigureDbContext(EFLoggerFactory loggerFactory, IConfiguration configuration)
{
@ -36,8 +36,8 @@ namespace ASC.Core.Common.EF
public class ConfigureMultiRegionalDbContext<T> : IConfigureNamedOptions<MultiRegionalDbContext<T>> where T : BaseDbContext, new()
{
const string baseName = "default";
public IConfiguration Configuration { get; }
public DbContextManager<T> DbContext { get; }
private IConfiguration Configuration { get; }
private DbContextManager<T> DbContext { get; }
public ConfigureMultiRegionalDbContext(IConfiguration configuration, DbContextManager<T> dbContext)
{

View File

@ -40,7 +40,7 @@ namespace ASC.Geolocation
public string Dbid { get; set; }
public ILog Log { get; }
public DbContext DbContext { get; }
private DbContext DbContext { get; }
public GeolocationHelper(DbContextManager<DbContext> dbContext, IOptionsMonitor<ILog> option)
{

View File

@ -44,15 +44,15 @@ namespace ASC.Core
{
class ConfigureHostedSolution : IConfigureNamedOptions<HostedSolution>
{
public UserFormatter UserFormatter { get; }
public IOptionsSnapshot<CachedTenantService> TenantService { get; }
public IOptionsSnapshot<CachedUserService> UserService { get; }
public IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
public IOptionsSnapshot<TariffService> TariffService { get; }
public IOptionsSnapshot<TenantManager> TenantManager { get; }
public IOptionsSnapshot<TenantUtil> TenantUtil { get; }
public IOptionsSnapshot<DbSettingsManager> DbSettingsManager { get; }
public IOptionsSnapshot<CoreSettings> CoreSettings { get; }
private UserFormatter UserFormatter { get; }
private IOptionsSnapshot<CachedTenantService> TenantService { get; }
private IOptionsSnapshot<CachedUserService> UserService { get; }
private IOptionsSnapshot<CachedQuotaService> QuotaService { get; }
private IOptionsSnapshot<TariffService> TariffService { get; }
private IOptionsSnapshot<TenantManager> TenantManager { get; }
private IOptionsSnapshot<TenantUtil> TenantUtil { get; }
private IOptionsSnapshot<DbSettingsManager> DbSettingsManager { get; }
private IOptionsSnapshot<CoreSettings> CoreSettings { get; }
public ConfigureHostedSolution(
UserFormatter userFormatter,

View File

@ -49,10 +49,10 @@ namespace ASC.Core
private readonly Dictionary<string, HostedSolution> regions = new Dictionary<string, HostedSolution>();
private readonly string dbid;
public IConfiguration Configuraion { get; }
public CookieStorage CookieStorage { get; }
public EFLoggerFactory LoggerFactory { get; }
public IOptionsSnapshot<HostedSolution> HostedSolutionOptions { get; }
private IConfiguration Configuraion { get; }
private CookieStorage CookieStorage { get; }
private EFLoggerFactory LoggerFactory { get; }
private IOptionsSnapshot<HostedSolution> HostedSolutionOptions { get; }
public MultiRegionHostedSolution(string dbid,
IConfiguration configuraion,

View File

@ -50,7 +50,7 @@ namespace ASC.Core.Notify
ServiceProvider = serviceProvider;
}
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public override SendResponse ProcessMessage(INoticeMessage message)
{

View File

@ -67,7 +67,7 @@ namespace ASC.Notify.Engine
private readonly TimeSpan defaultSleep = TimeSpan.FromSeconds(10);
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public event Action<NotifyEngine, NotifyRequest, IServiceScope> BeforeTransferRequest;

View File

@ -39,9 +39,9 @@ namespace ASC.Core.Notify.Jabber
private static DateTime lastErrorTime = default;
public UserManager UserManager { get; }
public AuthContext AuthContext { get; }
public TenantManager TenantManager { get; }
private UserManager UserManager { get; }
private AuthContext AuthContext { get; }
private TenantManager TenantManager { get; }
public JabberServiceClient(UserManager userManager, AuthContext authContext, TenantManager tenantManager)
{

View File

@ -45,7 +45,7 @@ namespace ASC.Core.Notify
ServiceProvider = serviceProvider;
}
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public override SendResponse ProcessMessage(INoticeMessage message)
{

View File

@ -66,8 +66,8 @@ namespace ASC.Core.Notify
get;
private set;
}
public UserManager UserManager { get; }
public SubscriptionManager SubscriptionManager { get; }
private UserManager UserManager { get; }
private SubscriptionManager SubscriptionManager { get; }
public NotifySource(string id, UserManager userManager, IRecipientProvider recipientsProvider, SubscriptionManager subscriptionManager)
{

View File

@ -48,7 +48,7 @@ namespace ASC.Core.Common.Notify
_log = ServiceProvider.GetService<IOptionsMonitor<ILog>>().CurrentValue;
}
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public override SendResponse ProcessMessage(INoticeMessage message)
{

View File

@ -36,7 +36,7 @@ namespace ASC.Core.Notify
{
public class RecipientProviderImpl : IRecipientProvider
{
public UserManager UserManager { get; }
private UserManager UserManager { get; }
public RecipientProviderImpl(UserManager userManager) =>
(UserManager) = (userManager);

View File

@ -94,8 +94,8 @@ namespace ASC.Core.Common.Notify
}
}
public TenantManager TenantManager { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public CoreSettings CoreSettings { get; }
private TenantManager TenantManager { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private CoreSettings CoreSettings { get; }
}
}

View File

@ -42,7 +42,7 @@ namespace ASC.Core.Notify.Senders
{
private readonly ILog log;
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public JabberSender(IServiceProvider serviceProvider)
{

View File

@ -58,8 +58,8 @@ namespace ASC.Core.Notify.Senders
</html>";
protected ILog Log { get; set; }
public IConfiguration Configuration { get; }
public IServiceProvider ServiceProvider { get; }
protected IConfiguration Configuration { get; }
protected IServiceProvider ServiceProvider { get; }
private string _host;
private int _port;

View File

@ -45,10 +45,10 @@ namespace ASC.Core.Notify.Signalr
{
public class ConfigureSignalrServiceClient : IConfigureNamedOptions<SignalrServiceClient>
{
public TenantManager TenantManager { get; }
public CoreSettings CoreSettings { get; }
public IConfiguration Configuration { get; }
public IOptionsMonitor<ILog> Options { get; }
internal TenantManager TenantManager { get; }
internal CoreSettings CoreSettings { get; }
internal IConfiguration Configuration { get; }
internal IOptionsMonitor<ILog> Options { get; }
public ConfigureSignalrServiceClient(
TenantManager tenantManager,
@ -111,8 +111,8 @@ namespace ASC.Core.Notify.Signalr
internal string hub;
public TenantManager TenantManager { get; internal set; }
public CoreSettings CoreSettings { get; internal set; }
internal TenantManager TenantManager { get; set; }
internal CoreSettings CoreSettings { get; set; }
static SignalrServiceClient()
{
@ -397,7 +397,7 @@ namespace ASC.Core.Notify.Signalr
{
if (services.TryAddScoped<SignalrServiceClient>())
{
services.TryAddScoped<IConfigureOptions<SignalrServiceClient>, ConfigureSignalrServiceClient>();
services.TryAddScoped<IConfigureNamedOptions<SignalrServiceClient>, ConfigureSignalrServiceClient>();
return services
.AddTenantManagerService()

View File

@ -43,7 +43,7 @@ namespace ASC.Core.Security.Authentication
private const string DateTimeFormat = "yyyy-MM-dd HH:mm:ss,fff";
private InstanceCrypto InstanceCrypto { get; }
public TenantCookieSettingsHelper TenantCookieSettingsHelper { get; }
private TenantCookieSettingsHelper TenantCookieSettingsHelper { get; }
private HttpContext HttpContext { get; }
private ILog Log { get; }

View File

@ -55,8 +55,8 @@ namespace ASC.Security.Cryptography
private static readonly DateTime _from = new DateTime(2010, 01, 01, 0, 0, 0, DateTimeKind.Utc);
internal readonly TimeSpan ValidInterval;
public TenantManager TenantManager { get; }
public IConfiguration Configuration { get; }
private TenantManager TenantManager { get; }
private IConfiguration Configuration { get; }
public EmailValidationKeyProvider(TenantManager tenantManager, IConfiguration configuration, IOptionsMonitor<ILog> options)
{

View File

@ -68,7 +68,7 @@ namespace ASC.Core.Tenants
public class TenantCookieSettingsHelper
{
public bool IsVisibleSettings { get; internal set; }
public SettingsManager SettingsManager { get; }
private SettingsManager SettingsManager { get; }
public TenantCookieSettingsHelper(IConfiguration configuration, SettingsManager settingsManager)
{

View File

@ -35,8 +35,8 @@ namespace ASC.Core.Tenants
{
class ConfigureTenantUtil : IConfigureNamedOptions<TenantUtil>
{
public IOptionsSnapshot<TenantManager> TenantManager { get; }
public TimeZoneConverter TimeZoneConverter { get; }
private IOptionsSnapshot<TenantManager> TenantManager { get; }
private TimeZoneConverter TimeZoneConverter { get; }
public ConfigureTenantUtil(
IOptionsSnapshot<TenantManager> tenantManager,

View File

@ -36,7 +36,7 @@ namespace ASC.Common.Tests.Security.Cryptography
[TestFixture]
public class EmailValidationKeyPairProvider_Test
{
public EmailValidationKeyProvider EmailValidationKeyProvider { get; set; }
private EmailValidationKeyProvider EmailValidationKeyProvider { get; set; }
public void PasswordDerivedBytes_Test()
{

View File

@ -25,11 +25,11 @@
using System;
using ASC.Common;
using ASC.Common;
using Microsoft.Extensions.Configuration;
using Action = ASC.Common.Security.Authorizing.Action;
using AuthConst = ASC.Common.Security.Authorizing.Constants;
@ -61,7 +61,7 @@ namespace ASC.Core.Users
}
}
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
#region system group and category groups

View File

@ -61,8 +61,8 @@ namespace ASC.Web.Core.Users
UserFormatter = userFormatter;
}
public UserManager UserManager { get; }
public UserFormatter UserFormatter { get; }
private UserManager UserManager { get; }
private UserFormatter UserFormatter { get; }
public string GetFullUserName(Guid userID, bool withHtmlEncode = true)
{

View File

@ -28,9 +28,9 @@ using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading;
using ASC.Common;
using Microsoft.Extensions.Configuration;
namespace ASC.Core.Users
@ -140,7 +140,7 @@ namespace ASC.Core.Users
public Regex UserNameRegex;
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
public bool IsValidUserName(string firstName, string lastName)
{

View File

@ -25,11 +25,11 @@
using System;
using ASC.Common;
using ASC.Common;
using ASC.Core.Common;
using ASC.Core.Common.Settings;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -153,7 +153,7 @@ namespace ASC.Web.Core.WhiteLabel
}
}
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
}
public static class MailWhiteLabelSettingsExtention

View File

@ -48,8 +48,8 @@ namespace ASC.Data.Reassigns
{
protected readonly ProgressQueue<T> Queue;
public IHttpContextAccessor HttpContextAccessor { get; }
public IServiceProvider ServiceProvider { get; }
protected IHttpContextAccessor HttpContextAccessor { get; }
protected IServiceProvider ServiceProvider { get; }
public QueueWorker(
IHttpContextAccessor httpContextAccessor,
@ -108,7 +108,7 @@ namespace ASC.Data.Reassigns
public class QueueWorkerReassign : QueueWorker<ReassignProgressItem>
{
public QueueWorkerRemove QueueWorkerRemove { get; }
private QueueWorkerRemove QueueWorkerRemove { get; }
public QueueWorkerReassign(
IHttpContextAccessor httpContextAccessor,
IServiceProvider serviceProvider,

View File

@ -26,8 +26,8 @@
using System;
using System.Collections.Generic;
using ASC.Common;
using ASC.Common;
using ASC.Common.Logging;
//using System.Web;
using ASC.Common.Threading.Progress;
@ -44,8 +44,8 @@ using ASC.Web.Studio.Core.Notify;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives;
using Microsoft.Extensions.Primitives;
namespace ASC.Data.Reassigns
{
public class ReassignProgressItem : IProgressItem
@ -67,8 +67,8 @@ namespace ASC.Data.Reassigns
public bool IsCompleted { get; set; }
public Guid FromUser { get; }
public Guid ToUser { get; }
public IServiceProvider ServiceProvider { get; }
public QueueWorkerRemove QueueWorkerRemove { get; }
private IServiceProvider ServiceProvider { get; }
private QueueWorkerRemove QueueWorkerRemove { get; }
public ReassignProgressItem(
IServiceProvider serviceProvider,

View File

@ -29,8 +29,8 @@ using System.Collections.Generic;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using ASC.Common;
using ASC.Common;
using ASC.Common.Logging;
using ASC.Common.Threading.Progress;
using ASC.Core;
@ -46,8 +46,8 @@ using ASC.Web.Studio.Core.Notify;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives;
using Microsoft.Extensions.Primitives;
namespace ASC.Data.Reassigns
{
public class RemoveProgressItem : IProgressItem
@ -67,7 +67,7 @@ namespace ASC.Data.Reassigns
public double Percentage { get; set; }
public bool IsCompleted { get; set; }
public Guid FromUser { get; }
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public UserInfo User { get; }
public RemoveProgressItem(

View File

@ -214,11 +214,11 @@ namespace ASC.Data.Storage
public virtual bool IsSupportChunking { get { return false; } }
public TenantManager TenantManager { get; }
public PathUtils PathUtils { get; }
public EmailValidationKeyProvider EmailValidationKeyProvider { get; }
public IHttpContextAccessor HttpContextAccessor { get; }
public IOptionsMonitor<ILog> Options { get; }
protected TenantManager TenantManager { get; }
protected PathUtils PathUtils { get; }
protected EmailValidationKeyProvider EmailValidationKeyProvider { get; }
protected IHttpContextAccessor HttpContextAccessor { get; }
protected IOptionsMonitor<ILog> Options { get; }
#endregion

View File

@ -27,11 +27,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq;
using ASC.Common.Logging;
using ASC.Data.Storage;
using ASC.Data.Storage;
using Microsoft.Extensions.Options;
namespace ASC.Core.ChunkedUploader
@ -40,7 +40,7 @@ namespace ASC.Core.ChunkedUploader
{
public static readonly TimeSpan SlidingExpiration = TimeSpan.FromHours(12);
public IOptionsMonitor<ILog> Option { get; }
private IOptionsMonitor<ILog> Option { get; }
private IDataStore DataStore { get; set; }
private string Domain { get; set; }
private long MaxChunkUploadSize { get; set; }

View File

@ -67,7 +67,7 @@ namespace ASC.Data.Storage.Configuration
}, CacheNotifyAction.Remove);
}
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
}
[Serializable]
@ -80,7 +80,7 @@ namespace ASC.Data.Storage.Configuration
public ISettings GetDefault(IServiceProvider serviceProvider) => new T();
public virtual Func<DataStoreConsumer, DataStoreConsumer> Switch { get { return d => d; } }
public ICacheNotify<DataStoreCacheItem> Cache { get; internal set; }
internal ICacheNotify<DataStoreCacheItem> Cache { get; set; }
public abstract Guid ID { get; }
}
@ -107,16 +107,16 @@ namespace ASC.Data.Storage.Configuration
public class StorageSettingsHelper
{
public BaseStorageSettingsListener BaseStorageSettingsListener { get; }
public StorageFactoryConfig StorageFactoryConfig { get; }
public PathUtils PathUtils { get; }
public EmailValidationKeyProvider EmailValidationKeyProvider { get; }
public ICacheNotify<DataStoreCacheItem> Cache { get; }
public IOptionsMonitor<ILog> Options { get; }
public TenantManager TenantManager { get; }
public SettingsManager SettingsManager { get; }
public IHttpContextAccessor HttpContextAccessor { get; }
public ConsumerFactory ConsumerFactory { get; }
private BaseStorageSettingsListener BaseStorageSettingsListener { get; }
private StorageFactoryConfig StorageFactoryConfig { get; }
private PathUtils PathUtils { get; }
private EmailValidationKeyProvider EmailValidationKeyProvider { get; }
private ICacheNotify<DataStoreCacheItem> Cache { get; }
private IOptionsMonitor<ILog> Options { get; }
private TenantManager TenantManager { get; }
private SettingsManager SettingsManager { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
private ConsumerFactory ConsumerFactory { get; }
public StorageSettingsHelper(
BaseStorageSettingsListener baseStorageSettingsListener,

View File

@ -50,7 +50,7 @@ namespace ASC.Data.Storage
chunksize = 5 * 1024 * 1024;
}
public IOptionsMonitor<ILog> Option { get; }
private IOptionsMonitor<ILog> Option { get; }
public void CopyFile(string srcDomain, string srcPath, string destDomain, string destPath)
{

View File

@ -32,7 +32,7 @@ namespace ASC.Data.Storage.DiscStorage
internal class MappedPath
{
public string PhysicalPath { get; set; }
public PathUtils PathUtils { get; }
private PathUtils PathUtils { get; }
private MappedPath(PathUtils pathUtils)
{

View File

@ -39,9 +39,9 @@ namespace ASC.Data.Storage
public class PathUtils
{
private string StorageRoot { get; }
public IConfiguration Configuration { get; }
private IConfiguration Configuration { get; }
public IHostEnvironment HostEnvironment { get; }
public IWebHostEnvironment WebHostEnvironment { get; }
private IWebHostEnvironment WebHostEnvironment { get; }
public PathUtils(IConfiguration configuration, IHostEnvironment hostEnvironment)
{

View File

@ -43,7 +43,7 @@ namespace ASC.Data.Storage.S3
private bool configErrors;
private bool configured;
public CoreSettings CoreSettings { get; }
private CoreSettings CoreSettings { get; }
public Configuration.Storage Storage { get; }
public S3UploadGuard(CoreSettings coreSettings, Configuration.Storage storage)

View File

@ -53,10 +53,10 @@ namespace ASC.Data.Storage
private static readonly ICache Cache;
private static readonly object Locker;
public IServiceProvider ServiceProvider { get; }
public TenantManager TenantManager { get; }
public SettingsManager SettingsManager { get; }
public StorageSettingsHelper StorageSettingsHelper { get; }
private IServiceProvider ServiceProvider { get; }
private TenantManager TenantManager { get; }
private SettingsManager SettingsManager { get; }
private StorageSettingsHelper StorageSettingsHelper { get; }
static StaticUploader()
{
@ -191,7 +191,7 @@ namespace ASC.Data.Storage
private readonly string path;
private readonly string mappedPath;
public string Result { get; private set; }
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public UploadOperation(IServiceProvider serviceProvider, int tenantId, string path, string mappedPath)
{
@ -246,8 +246,8 @@ namespace ASC.Data.Storage
private readonly string mappedPath;
private readonly IEnumerable<string> directoryFiles;
public IServiceProvider ServiceProvider { get; }
public StaticUploader StaticUploader { get; }
private IServiceProvider ServiceProvider { get; }
private StaticUploader StaticUploader { get; }
public UploadOperationProgress(StaticUploader staticUploader, string relativePath, string mappedPath)
{

View File

@ -158,16 +158,16 @@ namespace ASC.Data.Storage
{
private const string DefaultTenantName = "default";
public StorageFactoryListener StorageFactoryListener { get; }
public StorageFactoryConfig StorageFactoryConfig { get; }
public SettingsManager SettingsManager { get; }
public StorageSettingsHelper StorageSettingsHelper { get; }
public TenantManager TenantManager { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public PathUtils PathUtils { get; }
public EmailValidationKeyProvider EmailValidationKeyProvider { get; }
public IOptionsMonitor<ILog> Options { get; }
public IHttpContextAccessor HttpContextAccessor { get; }
private StorageFactoryListener StorageFactoryListener { get; }
private StorageFactoryConfig StorageFactoryConfig { get; }
private SettingsManager SettingsManager { get; }
private StorageSettingsHelper StorageSettingsHelper { get; }
private TenantManager TenantManager { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private PathUtils PathUtils { get; }
private EmailValidationKeyProvider EmailValidationKeyProvider { get; }
private IOptionsMonitor<ILog> Options { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
public StorageFactory(
StorageFactoryListener storageFactoryListener,

View File

@ -32,7 +32,7 @@ using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using ASC.Common;
using ASC.Common.Web;
using ASC.Core;
@ -61,7 +61,7 @@ namespace ASC.Data.Storage.DiscStorage
_checkAuth = checkAuth;
}
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
public async Task Invoke(HttpContext context)
{

View File

@ -51,7 +51,7 @@ namespace ASC.Data.Storage
private static readonly ICache Cache;
private static readonly object Locker;
public IServiceProvider ServiceProvider { get; }
private IServiceProvider ServiceProvider { get; }
static StorageUploader()
{
@ -139,8 +139,8 @@ namespace ASC.Data.Storage
Log = serviceProvider.GetService<IOptionsMonitor<ILog>>().CurrentValue;
}
public IServiceProvider ServiceProvider { get; }
public StorageFactoryConfig StorageFactoryConfig { get; }
private IServiceProvider ServiceProvider { get; }
private StorageFactoryConfig StorageFactoryConfig { get; }
protected override void DoJob()
{

View File

@ -37,7 +37,7 @@ namespace ASC.Data.Storage
private readonly int tenant;
private long currentSize;
public TenantManager TenantManager { get; }
private TenantManager TenantManager { get; }
public TenantQuotaController(int tenant, TenantManager tenantManager)
{

View File

@ -145,14 +145,14 @@ namespace ASC.Data.Storage
{
private static readonly IDictionary<string, bool> Existing = new ConcurrentDictionary<string, bool>();
public WebPathSettings WebPathSettings { get; }
public StaticUploader StaticUploader { get; }
public SettingsManager SettingsManager { get; }
public StorageSettingsHelper StorageSettingsHelper { get; }
public IHttpContextAccessor HttpContextAccessor { get; }
private WebPathSettings WebPathSettings { get; }
private StaticUploader StaticUploader { get; }
private SettingsManager SettingsManager { get; }
private StorageSettingsHelper StorageSettingsHelper { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
public IHostEnvironment HostEnvironment { get; }
public CoreBaseSettings CoreBaseSettings { get; }
public IOptionsMonitor<ILog> Options { get; }
private CoreBaseSettings CoreBaseSettings { get; }
private IOptionsMonitor<ILog> Options { get; }
public WebPath(
WebPathSettings webPathSettings,

View File

@ -70,10 +70,10 @@ namespace ASC.FederatedLogin
}
public class ConfigureAccountLinker : IConfigureNamedOptions<AccountLinker>
{
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
public AccountLinkerStorage AccountLinkerStorage { get; }
public DbContextManager<AccountLinkContext> DbContextManager { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
private AccountLinkerStorage AccountLinkerStorage { get; }
private DbContextManager<AccountLinkContext> DbContextManager { get; }
public ConfigureAccountLinker(
Signature signature,
@ -105,10 +105,10 @@ namespace ASC.FederatedLogin
public class AccountLinker
{
public string DbId { get; set; }
public Signature Signature { get; set; }
public InstanceCrypto InstanceCrypto { get; set; }
public AccountLinkerStorage AccountLinkerStorage { get; set; }
public DbContextManager<AccountLinkContext> AccountLinkContextManager { get; set; }
internal Signature Signature { get; set; }
internal InstanceCrypto InstanceCrypto { get; set; }
internal AccountLinkerStorage AccountLinkerStorage { get; set; }
internal DbContextManager<AccountLinkContext> AccountLinkContextManager { get; set; }
public AccountLinkContext AccountLinkContext
{

View File

@ -54,9 +54,9 @@ namespace ASC.FederatedLogin
private IWebHostEnvironment WebHostEnvironment { get; }
private IMemoryCache MemoryCache { get; }
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
public ProviderManager ProviderManager { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
private ProviderManager ProviderManager { get; }
public Login(
IWebHostEnvironment webHostEnvironment,
@ -225,8 +225,8 @@ namespace ASC.FederatedLogin
public class LoginHandler
{
public RequestDelegate Next { get; }
public IServiceProvider ServiceProvider { get; }
private RequestDelegate Next { get; }
private IServiceProvider ServiceProvider { get; }
public LoginHandler(RequestDelegate next, IServiceProvider serviceProvider)
{

View File

@ -68,8 +68,8 @@ namespace ASC.FederatedLogin.LoginProviders
}
}
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
internal Signature Signature { get; }
internal InstanceCrypto InstanceCrypto { get; }
protected BaseLoginProvider()
{

View File

@ -33,9 +33,7 @@ using System.Xml.XPath;
using ASC.Common.Caching;
using ASC.Core;
using ASC.Core.Common;
using ASC.Core.Common.Configuration;
using ASC.Core.Tenants;
using Microsoft.Extensions.Configuration;
@ -72,7 +70,7 @@ namespace ASC.FederatedLogin.LoginProviders
{
}
public bool ValidateKeys(AuthContext authContext, TenantUtil tenantUtil, SecurityContext securityContext, TenantManager tenantManager, BaseCommonLinkUtility baseCommonLinkUtility)
public bool ValidateKeys()
{
try
{

View File

@ -44,12 +44,12 @@ namespace ASC.Web.Studio.Core
{
public class EncryptionLoginProvider
{
public UserManager UserManager { get; }
public TenantManager TenantManager { get; }
public SecurityContext SecurityContext { get; }
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
public IOptionsSnapshot<AccountLinker> Snapshot { get; }
private UserManager UserManager { get; }
private TenantManager TenantManager { get; }
private SecurityContext SecurityContext { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
private IOptionsSnapshot<AccountLinker> Snapshot { get; }
public EncryptionLoginProvider(
UserManager userManager,

View File

@ -23,15 +23,10 @@
*
*/
using ASC.Core;
using ASC.Core.Common;
using ASC.Core.Tenants;
namespace ASC.FederatedLogin.LoginProviders
{
public interface IValidateKeysProvider
{
bool ValidateKeys(AuthContext authContext, TenantUtil tenantUtil, SecurityContext securityContext, TenantManager tenantManager, BaseCommonLinkUtility baseCommonLinkUtility);
bool ValidateKeys();
}
}

View File

@ -150,9 +150,9 @@ namespace ASC.FederatedLogin.LoginProviders
public string ClientSecret { get { return ""; } }
public bool IsEnabled { get { return ConsumerFactory.Get<GoogleLoginProvider>().IsEnabled; } }
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
public ConsumerFactory ConsumerFactory { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
private ConsumerFactory ConsumerFactory { get; }
internal LoginProfile ProfileFromOpenId(ClaimsResponse spprofile, FetchResponse fetchprofile, string claimedId, string realmUrlString)
{

View File

@ -52,9 +52,9 @@ namespace ASC.FederatedLogin.LoginProviders
ProviderConstants.GosUslugi
};
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
public ConsumerFactory ConsumerFactory { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
private ConsumerFactory ConsumerFactory { get; }
public ProviderManager(Signature signature, InstanceCrypto instanceCrypto, ConsumerFactory consumerFactory)
{

View File

@ -38,8 +38,8 @@ using ASC.FederatedLogin.Helpers;
using ASC.Security.Cryptography;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Caching.Memory;
using Newtonsoft.Json;
@ -213,8 +213,8 @@ namespace ASC.FederatedLogin.Profile
get { return !IsFailed; }
}
public Signature Signature { get; }
public InstanceCrypto InstanceCrypto { get; }
private Signature Signature { get; }
private InstanceCrypto InstanceCrypto { get; }
internal string GetField(string name)
{

View File

@ -44,10 +44,10 @@ namespace ASC.Feed.Data
{
public class FeedAggregateDataProvider
{
public AuthContext AuthContext { get; }
public TenantManager TenantManager { get; }
public TenantUtil TenantUtil { get; }
public FeedDbContext FeedDbContext { get; }
private AuthContext AuthContext { get; }
private TenantManager TenantManager { get; }
private TenantUtil TenantUtil { get; }
private FeedDbContext FeedDbContext { get; }
public FeedAggregateDataProvider(AuthContext authContext, TenantManager tenantManager, TenantUtil tenantUtil, DbContextManager<FeedDbContext> dbContextManager)
: this(authContext, tenantManager, tenantUtil)

View File

@ -40,9 +40,9 @@ namespace ASC.Feed.Data
{
private const string dbId = Constants.FeedDbId;
public AuthContext AuthContext { get; }
public TenantManager TenantManager { get; }
public FeedDbContext FeedDbContext { get; }
private AuthContext AuthContext { get; }
private TenantManager TenantManager { get; }
private FeedDbContext FeedDbContext { get; }
public FeedReadedDataProvider(AuthContext authContext, TenantManager tenantManager, DbContextManager<FeedDbContext> dbContextManager)
{

View File

@ -38,7 +38,7 @@ namespace ASC.IPSecurity
{
private const string dbId = "core";
public TenantDbContext TenantDbContext { get; }
private TenantDbContext TenantDbContext { get; }
public IPRestrictionsRepository(DbContextManager<TenantDbContext> dbContextManager)
{

View File

@ -37,7 +37,7 @@ namespace ASC.IPSecurity
private const string cacheKey = "iprestrictions";
public ICache Cache { get; set; }
public ICacheNotify<IPRestrictionItem> Notify { get; }
internal ICacheNotify<IPRestrictionItem> Notify { get; }
public IPRestrictionsServiceCache(ICacheNotify<IPRestrictionItem> notify)
{
@ -57,7 +57,7 @@ namespace ASC.IPSecurity
private readonly ICacheNotify<IPRestrictionItem> notify;
private static readonly TimeSpan timeout = TimeSpan.FromMinutes(5);
public IPRestrictionsRepository IPRestrictionsRepository { get; }
private IPRestrictionsRepository IPRestrictionsRepository { get; }
public IPRestrictionsService(
IPRestrictionsRepository iPRestrictionsRepository,

Some files were not shown because too many files have changed in this diff Show More