removed unused variables

This commit is contained in:
pavelbannov 2022-12-09 16:34:00 +03:00
parent e8e75dfa8a
commit 6e45bc5aa8
28 changed files with 57 additions and 321 deletions

View File

@ -33,14 +33,11 @@ public class WhiteLabelHelper
private readonly ConcurrentDictionary<int, string> _whiteLabelDictionary;
public string DefaultLogoText { get; set; }
private readonly IConfiguration _configuration;
public WhiteLabelHelper(IConfiguration configuration, ILoggerProvider option)
public WhiteLabelHelper(ILoggerProvider option)
{
_logger = option.CreateLogger("ASC.Resources");
_whiteLabelDictionary = new ConcurrentDictionary<int, string>();
DefaultLogoText = string.Empty;
_configuration = configuration;
}
public void SetNewText(int tenantId, string newText)

View File

@ -30,12 +30,10 @@ namespace ASC.MessagingSystem.EF.Model;
public class MessageTarget
{
private IEnumerable<string> _items;
private readonly ILogger _logger;
private readonly ILoggerProvider _option;
public MessageTarget(ILoggerProvider option)
{
_logger = option.CreateLogger("ASC.Messaging");
_option = option;
}

View File

@ -32,25 +32,6 @@ public class CoreModuleSpecifics : ModuleSpecificsBase
public override IEnumerable<TableInfo> Tables => _tables;
public override IEnumerable<RelationInfo> TableRelations => _tableRelations;
private const string ForumsNewPostInTopicActionID = "new post in topic";
private const string ForumsNewPostInThreadActionID = "new post in thread";
private const string NewsNewCommentActionID = "new feed comment";
private const string BlogsNewCommentActionID = "new comment";
private const string CrmCompanyAclObjectStart = "ASC.CRM.Core.Entities.Company|";
private const string CrmPersonAclObjectStart = "ASC.CRM.Core.Entities.Person|";
private const string CrmDealAclObjectStart = "ASC.CRM.Core.Entities.Deal|";
private const string CrmCasesAclObjectStart = "ASC.CRM.Core.Entities.Cases|";
private const string CrmRelationshipEventAclObjectStart = "ASC.CRM.Core.Entities.RelationshipEvent|";
private const string CalendarCalendarAclObjectStart = "ASC.Api.Calendar.BusinessObjects.Calendar|";
private const string CalendarEventAclObjectStart = "ASC.Api.Calendar.BusinessObjects.Event|";
private static readonly Guid _projectsSourceID = new Guid("6045B68C-2C2E-42db-9E53-C272E814C4AD");
private static readonly Guid _bookmarksSourceID = new Guid("28B10049-DD20-4f54-B986-873BC14CCFC7");
private static readonly Guid _forumsSourceID = new Guid("853B6EB9-73EE-438d-9B09-8FFEEDF36234");
private static readonly Guid _newsSourceID = new Guid("6504977C-75AF-4691-9099-084D3DDEEA04");
private static readonly Guid _blogsSourceID = new Guid("6A598C74-91AE-437d-A5F4-AD339BD11BB2");
private readonly RelationInfo[] _tableRelations;
private readonly Helpers _helpers;
private readonly TableInfo[] _tables = new[]

View File

@ -125,12 +125,9 @@ public class CdnStorageSettings : BaseStorageSettings<CdnStorageSettings>, ISett
public class StorageSettingsHelper
{
private readonly StorageFactoryConfig _storageFactoryConfig;
private readonly PathUtils _pathUtils;
private readonly ICacheNotify<DataStoreCacheItem> _cache;
private readonly ILogger _options;
private readonly TenantManager _tenantManager;
private readonly SettingsManager _settingsManager;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ConsumerFactory _consumerFactory;
private readonly IServiceProvider _serviceProvider;
private IDataStore _dataStore;
@ -138,9 +135,7 @@ public class StorageSettingsHelper
public StorageSettingsHelper(
BaseStorageSettingsListener baseStorageSettingsListener,
StorageFactoryConfig storageFactoryConfig,
PathUtils pathUtils,
ICacheNotify<DataStoreCacheItem> cache,
ILogger<StorageSettingsHelper> options,
TenantManager tenantManager,
SettingsManager settingsManager,
ConsumerFactory consumerFactory,
@ -148,31 +143,13 @@ public class StorageSettingsHelper
{
baseStorageSettingsListener.Subscribe();
_storageFactoryConfig = storageFactoryConfig;
_pathUtils = pathUtils;
_cache = cache;
_options = options;
_tenantManager = tenantManager;
_settingsManager = settingsManager;
_consumerFactory = consumerFactory;
_serviceProvider = serviceProvider;
}
public StorageSettingsHelper(
BaseStorageSettingsListener baseStorageSettingsListener,
StorageFactoryConfig storageFactoryConfig,
PathUtils pathUtils,
ICacheNotify<DataStoreCacheItem> cache,
ILogger<StorageSettingsHelper> options,
TenantManager tenantManager,
SettingsManager settingsManager,
IHttpContextAccessor httpContextAccessor,
ConsumerFactory consumerFactory,
IServiceProvider serviceProvider)
: this(baseStorageSettingsListener, storageFactoryConfig, pathUtils, cache, options, tenantManager, settingsManager, consumerFactory, serviceProvider)
{
_httpContextAccessor = httpContextAccessor;
}
public bool Save<T>(BaseStorageSettings<T> baseStorageSettings) where T : class, ISettings<T>, new()
{
ClearDataStoreCache();

View File

@ -1,136 +0,0 @@
// (c) Copyright Ascensio System SIA 2010-2022
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
namespace ASC.Data.Storage.DiscStorage;
public class DiscDataHandler
{
private readonly string _physPath;
private readonly bool _checkAuth;
public DiscDataHandler(string physPath, bool checkAuth = true)
{
_physPath = physPath;
_checkAuth = checkAuth;
}
public async Task Invoke(HttpContext context)
{
//TODO
//if (_checkAuth && !Core.SecurityContext.IsAuthenticated)
//{
// context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
// return;
//}
var path = CombinePath(_physPath, context);
if (File.Exists(path))
{
var lastwrite = File.GetLastWriteTime(path);
var etag = '"' + lastwrite.Ticks.ToString("X8", CultureInfo.InvariantCulture) + '"';
var notmodified = context.Request.Headers["If-None-Match"] == etag ||
context.Request.Headers["If-Modified-Since"] == lastwrite.ToString("R");
if (notmodified)
{
context.Response.StatusCode = (int)HttpStatusCode.NotModified;
}
else
{
if (File.Exists(path + ".gz"))
{
await context.Response.SendFileAsync(path + ".gz");
context.Response.Headers["Content-Encoding"] = "gzip";
}
else
{
await context.Response.SendFileAsync(path);
}
context.Response.ContentType = MimeMapping.GetMimeMapping(path);
//TODO
//context.Response.Cache.SetVaryByCustom("*");
//context.Response.Cache.SetAllowResponseInBrowserHistory(true);
//context.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(1));
//context.Response.Cache.SetLastModified(lastwrite);
//context.Response.Cache.SetETag(etag);
//context.Response.Cache.SetCacheability(HttpCacheability.Public);
}
}
else
{
context.Response.StatusCode = (int)HttpStatusCode.NotFound;
}
}
private static string CombinePath(string physPath, HttpContext requestContext)
{
var pathInfo = GetRouteValue("pathInfo").Replace('/', Path.DirectorySeparatorChar);
var path = CrossPlatform.PathCombine(physPath, pathInfo);
var tenant = GetRouteValue("0");
if (string.IsNullOrEmpty(tenant))
{
tenant = CrossPlatform.PathCombine(GetRouteValue("t1"), GetRouteValue("t2"), GetRouteValue("t3"));
}
path = path.Replace("{0}", tenant);
return path;
string GetRouteValue(string name)
{
return (requestContext.GetRouteValue(name) ?? "").ToString();
}
}
}
public static class DiscDataHandlerExtensions
{
public static IEndpointRouteBuilder RegisterDiscDataHandler(this IEndpointRouteBuilder builder, string virtPath, string physPath, bool publicRoute = false)
{
if (virtPath != "/")
{
var handler = new DiscDataHandler(physPath, !publicRoute);
var url = virtPath + "{*pathInfo}";
if (!builder.DataSources.Any(r => r.Endpoints.Any(e => e.DisplayName == url)))
{
builder.Map(url, handler.Invoke);
var newUrl = url.Replace("{0}", "{t1}/{t2}/{t3}");
if (newUrl != url)
{
builder.Map(url, handler.Invoke);
}
}
}
return builder;
}
}

View File

@ -72,34 +72,6 @@ public static class StorageFactoryExtenstion
var pathUtils = builder.ServiceProvider.GetService<PathUtils>();
if (section != null)
{
//old scheme
var discHandler = section.GetHandler("disc");
if (discHandler != null && section.Module != null)
{
var props = discHandler.Property != null ? discHandler.Property.ToDictionary(r => r.Name, r => r.Value) : new Dictionary<string, string>();
foreach (var m in section.Module.Where(m => m.Type == "disc"))
{
if (m.Path.Contains(Constants.StorageRootParam))
{
builder.RegisterDiscDataHandler(
pathUtils.ResolveVirtualPath(m.VirtualPath),
pathUtils.ResolvePhysicalPath(m.Path, props),
m.Public);
}
if (m.Domain != null)
{
foreach (var d in m.Domain.Where(d => (d.Type == "disc" || string.IsNullOrEmpty(d.Type)) && d.Path.Contains(Constants.StorageRootParam)))
{
builder.RegisterDiscDataHandler(
pathUtils.ResolveVirtualPath(d.VirtualPath),
pathUtils.ResolvePhysicalPath(d.Path, props));
}
}
}
}
//new scheme
if (section.Module != null)
{
foreach (var m in section.Module)

View File

@ -34,22 +34,19 @@ public class AuditReportUploader
private readonly FilesLinkUtility _filesLinkUtility;
private readonly CommonLinkUtility _commonLinkUtility;
private readonly ILogger<AuditReportUploader> _logger;
private readonly AuditReportCreator _auditReportCreator;
public AuditReportUploader(
GlobalFolderHelper globalFolderHelper,
ILogger<AuditReportUploader> logger,
FileUploader fileUploader,
FilesLinkUtility filesLinkUtility,
CommonLinkUtility commonLinkUtility,
AuditReportCreator auditReportCreator)
CommonLinkUtility commonLinkUtility)
{
_globalFolderHelper = globalFolderHelper;
_logger = logger;
_fileUploader = fileUploader;
_filesLinkUtility = filesLinkUtility;
_commonLinkUtility = commonLinkUtility;
_auditReportCreator = auditReportCreator;
}
public async Task<string> UploadCsvReport(Stream stream, string reportName)

View File

@ -58,9 +58,8 @@ public class File<T> : FileEntry<T>, IFileEntry<T>
FileHelper fileHelper,
Global global,
GlobalFolderHelper globalFolderHelper,
SettingsManager settingsManager,
FilesSettingsHelper filesSettingsHelper,
FileDateTime fileDateTime) : base(fileHelper, global, globalFolderHelper, settingsManager, filesSettingsHelper, fileDateTime)
FileDateTime fileDateTime) : base(fileHelper, global, globalFolderHelper, filesSettingsHelper, fileDateTime)
{
Version = 1;
VersionGroup = 1;

View File

@ -112,7 +112,6 @@ public abstract class FileEntry<T> : FileEntry, ICloneable, IFileEntry<T>
public T ParentId { get; set; }
private T _folderIdDisplay;
private readonly GlobalFolderHelper _globalFolderHelper;
private readonly SettingsManager _settingsManager;
private readonly FilesSettingsHelper _filesSettingsHelper;
private readonly FileDateTime _fileDateTime;
@ -122,12 +121,10 @@ public abstract class FileEntry<T> : FileEntry, ICloneable, IFileEntry<T>
FileHelper fileHelper,
Global global,
GlobalFolderHelper globalFolderHelper,
SettingsManager settingsManager,
FilesSettingsHelper filesSettingsHelper,
FileDateTime fileDateTime) : base(fileHelper, global)
{
_globalFolderHelper = globalFolderHelper;
_settingsManager = settingsManager;
_filesSettingsHelper = filesSettingsHelper;
_fileDateTime = fileDateTime;
}

View File

@ -91,9 +91,8 @@ public class Folder<T> : FileEntry<T>, IFolder
FileHelper fileHelper,
Global global,
GlobalFolderHelper globalFolderHelper,
SettingsManager settingsManager,
FilesSettingsHelper filesSettingsHelper,
FileDateTime fileDateTime) : base(fileHelper, global, globalFolderHelper, settingsManager, filesSettingsHelper, fileDateTime)
FileDateTime fileDateTime) : base(fileHelper, global, globalFolderHelper, filesSettingsHelper, fileDateTime)
{
Title = string.Empty;
FileEntryType = FileEntryType.Folder;

View File

@ -82,7 +82,6 @@ public class FileStorageService<T> //: IFileStorageService
private readonly FileShareParamsHelper _fileShareParamsHelper;
private readonly EncryptionLoginProvider _encryptionLoginProvider;
private readonly CountRoomChecker _countRoomChecker;
private readonly CountRoomCheckerStatistic _countRoomCheckerStatistic;
private readonly RoomLinkService _roomLinkService;
private readonly DocSpaceLinkHelper _docSpaceLinkHelper;
private readonly StudioNotifyService _studioNotifyService;
@ -138,7 +137,6 @@ public class FileStorageService<T> //: IFileStorageService
FileShareParamsHelper fileShareParamsHelper,
EncryptionLoginProvider encryptionLoginProvider,
CountRoomChecker countRoomChecker,
CountRoomCheckerStatistic countRoomCheckerStatistic,
RoomLinkService roomLinkService,
DocSpaceLinkHelper docSpaceLinkHelper,
StudioNotifyService studioNotifyService)
@ -194,7 +192,6 @@ public class FileStorageService<T> //: IFileStorageService
_fileShareParamsHelper = fileShareParamsHelper;
_encryptionLoginProvider = encryptionLoginProvider;
_countRoomChecker = countRoomChecker;
_countRoomCheckerStatistic = countRoomCheckerStatistic;
_roomLinkService = roomLinkService;
_docSpaceLinkHelper = docSpaceLinkHelper;
_studioNotifyService = studioNotifyService;

View File

@ -145,14 +145,12 @@ internal class DropboxProviderInfo : IProviderInfo
internal class DropboxStorageDisposableWrapper : IDisposable
{
public DropboxStorage Storage { get; private set; }
private readonly TempStream _tempStream;
private readonly IServiceProvider _serviceProvider;
private readonly OAuth20TokenHelper _oAuth20TokenHelper;
private readonly ConsumerFactory _consumerFactory;
public DropboxStorageDisposableWrapper(TempStream tempStream, IServiceProvider serviceProvider, OAuth20TokenHelper oAuth20TokenHelper, ConsumerFactory consumerFactory)
public DropboxStorageDisposableWrapper(IServiceProvider serviceProvider, OAuth20TokenHelper oAuth20TokenHelper, ConsumerFactory consumerFactory)
{
_tempStream = tempStream;
_serviceProvider = serviceProvider;
_oAuth20TokenHelper = oAuth20TokenHelper;
_consumerFactory = consumerFactory;

View File

@ -32,18 +32,21 @@ public class CustomTagsService<T>
private readonly IDaoFactory _daoFactory;
private readonly FileSecurity _fileSecurity;
private readonly AuthContext _authContext;
private readonly FileSecurityCommon _fileSecurityCommon;
private readonly FilesMessageService _filesMessageService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly UserManager _userManager;
public CustomTagsService(IDaoFactory daoFactory, FileSecurity fileSecurity, AuthContext authContext, FileSecurityCommon fileSecurityCommon,
FilesMessageService filesMessageService, IHttpContextAccessor httpContextAccessor, UserManager userManager)
public CustomTagsService(
IDaoFactory daoFactory,
FileSecurity fileSecurity,
AuthContext authContext,
FilesMessageService filesMessageService,
IHttpContextAccessor httpContextAccessor,
UserManager userManager)
{
_daoFactory = daoFactory;
_fileSecurity = fileSecurity;
_authContext = authContext;
_fileSecurityCommon = fileSecurityCommon;
_filesMessageService = filesMessageService;
_httpContextAccessor = httpContextAccessor;
_userManager = userManager;

View File

@ -282,7 +282,6 @@ public class GlobalFolder
private readonly SettingsManager _settingsManager;
private readonly GlobalStore _globalStore;
private readonly IServiceProvider _serviceProvider;
private readonly Global _global;
private readonly ILogger _logger;
public GlobalFolder(
@ -296,8 +295,7 @@ public class GlobalFolder
GlobalStore globalStore,
ILoggerProvider options,
IServiceProvider serviceProvider,
Global global,
ThumbnailSettings thumbnailSettings
ThumbnailSettings thumbnailSettings
)
{
_coreBaseSettings = coreBaseSettings;
@ -309,7 +307,6 @@ public class GlobalFolder
_settingsManager = settingsManager;
_globalStore = globalStore;
_serviceProvider = serviceProvider;
_global = global;
_logger = options.CreateLogger("ASC.Files");
_thumbnailSettings = thumbnailSettings;
}

View File

@ -38,7 +38,6 @@ public class PathProvider
private readonly FilesLinkUtility _filesLinkUtility;
private readonly EmailValidationKeyProvider _emailValidationKeyProvider;
private readonly GlobalStore _globalStore;
private readonly BaseCommonLinkUtility _baseCommonLinkUtility;
public PathProvider(
WebImageSupplier webImageSupplier,
@ -46,8 +45,7 @@ public class PathProvider
CommonLinkUtility commonLinkUtility,
FilesLinkUtility filesLinkUtility,
EmailValidationKeyProvider emailValidationKeyProvider,
GlobalStore globalStore,
BaseCommonLinkUtility baseCommonLinkUtility)
GlobalStore globalStore)
{
_webImageSupplier = webImageSupplier;
_daoFactory = daoFactory;
@ -55,7 +53,6 @@ public class PathProvider
_filesLinkUtility = filesLinkUtility;
_emailValidationKeyProvider = emailValidationKeyProvider;
_globalStore = globalStore;
_baseCommonLinkUtility = baseCommonLinkUtility;
}
public string GetImagePath(string imgFileName)

View File

@ -43,7 +43,6 @@ public class NotifyClient
private readonly UserManager _userManager;
private readonly TenantManager _tenantManager;
private readonly StudioNotifyHelper _studioNotifyHelper;
private readonly IServiceScopeFactory _scope;
private readonly Context _notifyContext;
private readonly NotifyEngineQueue _notifyEngineQueue;
@ -59,8 +58,7 @@ public class NotifyClient
PathProvider pathProvider,
UserManager userManager,
TenantManager tenantManager,
StudioNotifyHelper studioNotifyHelper,
IServiceScopeFactory serviceScope)
StudioNotifyHelper studioNotifyHelper)
{
_notifyContext = notifyContext;
_notifyEngineQueue = notifyEngineQueue;
@ -74,7 +72,6 @@ public class NotifyClient
_userManager = userManager;
_tenantManager = tenantManager;
_studioNotifyHelper = studioNotifyHelper;
_scope = serviceScope;
}
public void SendDocuSignComplete<T>(File<T> file, string sourceTitle)

View File

@ -27,7 +27,7 @@
namespace ASC.Web.Files.ThirdPartyApp;
[Scope]
[Scope]
public class BoxApp : Consumer, IThirdPartyApp, IOAuthProvider
{
public const string AppAttr = "box";
@ -51,7 +51,6 @@ public class BoxApp : Consumer, IThirdPartyApp, IOAuthProvider
private readonly UserManager _userManager;
private readonly UserManagerWrapper _userManagerWrapper;
private readonly CookiesManager _cookiesManager;
private readonly MessageService _messageService;
private readonly Global _global;
private readonly EmailValidationKeyProvider _emailValidationKeyProvider;
private readonly FilesLinkUtility _filesLinkUtility;
@ -79,7 +78,6 @@ public class BoxApp : Consumer, IThirdPartyApp, IOAuthProvider
UserManager userManager,
UserManagerWrapper userManagerWrapper,
CookiesManager cookiesManager,
MessageService messageService,
Global global,
EmailValidationKeyProvider emailValidationKeyProvider,
FilesLinkUtility filesLinkUtility,
@ -111,7 +109,6 @@ public class BoxApp : Consumer, IThirdPartyApp, IOAuthProvider
_userManager = userManager;
_userManagerWrapper = userManagerWrapper;
_cookiesManager = cookiesManager;
_messageService = messageService;
_global = global;
_emailValidationKeyProvider = emailValidationKeyProvider;
_filesLinkUtility = filesLinkUtility;
@ -284,36 +281,36 @@ public class BoxApp : Consumer, IThirdPartyApp, IOAuthProvider
{
RequestUri = new Uri(_boxUrlUpload.Replace("{fileId}", fileId))
};
StreamContent streamContent;
using var multipartFormContent = new MultipartFormDataContent();
if (stream != null)
{
streamContent = new StreamContent(stream);
}
else
{
var downloadRequest = new HttpRequestMessage
{
RequestUri = new Uri(downloadUrl)
};
var response = await httpClient.SendAsync(downloadRequest);
var downloadStream = new ResponseStream(response);
streamContent = new StreamContent(downloadStream);
}
streamContent.Headers.TryAddWithoutValidation("Content-Type", MimeMapping.GetMimeMapping(title));
multipartFormContent.Add(streamContent, name: "filename", fileName: title);
request.Content = multipartFormContent;
request.Method = HttpMethod.Post;
request.Headers.Add("Authorization", "Bearer " + token);
//request.Content.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data; boundary=" + boundary);
//_logger.DebugBoxAppSaveFileTotalSize(tmpStream.Length);
StreamContent streamContent;
using var multipartFormContent = new MultipartFormDataContent();
if (stream != null)
{
streamContent = new StreamContent(stream);
}
else
{
var downloadRequest = new HttpRequestMessage
{
RequestUri = new Uri(downloadUrl)
};
var response = await httpClient.SendAsync(downloadRequest);
var downloadStream = new ResponseStream(response);
streamContent = new StreamContent(downloadStream);
}
streamContent.Headers.TryAddWithoutValidation("Content-Type", MimeMapping.GetMimeMapping(title));
multipartFormContent.Add(streamContent, name: "filename", fileName: title);
request.Content = multipartFormContent;
request.Method = HttpMethod.Post;
request.Headers.Add("Authorization", "Bearer " + token);
//request.Content.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data; boundary=" + boundary);
//_logger.DebugBoxAppSaveFileTotalSize(tmpStream.Length);
try
{
using var response = await httpClient.SendAsync(request);

View File

@ -49,7 +49,6 @@ public class GoogleDriveApp : Consumer, IThirdPartyApp, IOAuthProvider
private readonly UserManager _userManager;
private readonly UserManagerWrapper _userManagerWrapper;
private readonly CookiesManager _cookiesManager;
private readonly MessageService _messageService;
private readonly Global _global;
private readonly GlobalStore _globalStore;
private readonly EmailValidationKeyProvider _emailValidationKeyProvider;
@ -82,7 +81,6 @@ public class GoogleDriveApp : Consumer, IThirdPartyApp, IOAuthProvider
UserManager userManager,
UserManagerWrapper userManagerWrapper,
CookiesManager cookiesManager,
MessageService messageService,
Global global,
GlobalStore globalStore,
EmailValidationKeyProvider emailValidationKeyProvider,
@ -121,7 +119,6 @@ public class GoogleDriveApp : Consumer, IThirdPartyApp, IOAuthProvider
_userManager = userManager;
_userManagerWrapper = userManagerWrapper;
_cookiesManager = cookiesManager;
_messageService = messageService;
_global = global;
_globalStore = globalStore;
_emailValidationKeyProvider = emailValidationKeyProvider;

View File

@ -324,7 +324,6 @@ public class EntryManager
private readonly ILogger<EntryManager> _logger;
private readonly IHttpClientFactory _clientFactory;
private readonly FilesMessageService _filesMessageService;
private readonly Global _global;
public EntryManager(
IDaoFactory daoFactory,
@ -353,8 +352,7 @@ public class EntryManager
ThirdPartySelector thirdPartySelector,
IHttpClientFactory clientFactory,
FilesMessageService filesMessageService,
ThumbnailSettings thumbnailSettings,
Global global)
ThumbnailSettings thumbnailSettings)
{
_daoFactory = daoFactory;
_fileSecurity = fileSecurity;
@ -380,7 +378,6 @@ public class EntryManager
_fileTracker = fileTracker;
_entryStatusManager = entryStatusManager;
_clientFactory = clientFactory;
_global = global;
_filesMessageService = filesMessageService;
_thirdPartySelector = thirdPartySelector;
_thumbnailSettings = thumbnailSettings;

View File

@ -39,7 +39,6 @@ public class FilesModule : FeedModule
private const string SharedFileItem = Constants.SharedFileItem;
private readonly FileSecurity _fileSecurity;
private readonly FilesLinkUtility _filesLinkUtility;
private readonly IFileDao<int> _fileDao;
private readonly IFolderDao<int> _folderDao;
private readonly UserManager _userManager;
@ -48,7 +47,6 @@ public class FilesModule : FeedModule
TenantManager tenantManager,
UserManager userManager,
WebItemSecurity webItemSecurity,
FilesLinkUtility filesLinkUtility,
FileSecurity fileSecurity,
IDaoFactory daoFactory)
: base(tenantManager, webItemSecurity)
@ -56,7 +54,6 @@ public class FilesModule : FeedModule
_fileDao = daoFactory.GetFileDao<int>();
_folderDao = daoFactory.GetFolderDao<int>();
_userManager = userManager;
_filesLinkUtility = filesLinkUtility;
_fileSecurity = fileSecurity;
}

View File

@ -41,8 +41,7 @@ public class AuthenticationController : ControllerBase
private readonly TenantCookieSettingsHelper _tenantCookieSettingsHelper;
private readonly CookiesManager _cookiesManager;
private readonly PasswordHasher _passwordHasher;
private readonly EmailValidationKeyModelHelper _emailValidationKeyModelHelper;
private readonly ICache _cache;
private readonly EmailValidationKeyModelHelper _emailValidationKeyModelHelper;
private readonly SetupInfo _setupInfo;
private readonly MessageService _messageService;
private readonly ProviderManager _providerManager;
@ -79,7 +78,6 @@ public class AuthenticationController : ControllerBase
CookiesManager cookiesManager,
PasswordHasher passwordHasher,
EmailValidationKeyModelHelper emailValidationKeyModelHelper,
ICache cache,
SetupInfo setupInfo,
MessageService messageService,
ProviderManager providerManager,
@ -114,8 +112,7 @@ public class AuthenticationController : ControllerBase
_tenantCookieSettingsHelper = tenantCookieSettingsHelper;
_cookiesManager = cookiesManager;
_passwordHasher = passwordHasher;
_emailValidationKeyModelHelper = emailValidationKeyModelHelper;
_cache = cache;
_emailValidationKeyModelHelper = emailValidationKeyModelHelper;
_setupInfo = setupInfo;
_messageService = messageService;
_providerManager = providerManager;

View File

@ -34,9 +34,7 @@ public class CapabilitiesController : ControllerBase
private readonly CoreBaseSettings _coreBaseSettings;
private readonly TenantManager _tenantManager;
private readonly ProviderManager _providerManager;
private readonly SettingsManager _settingsManager;
private readonly IConfiguration _configuration;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly SettingsManager _settingsManager;
private readonly ILogger _log;
@ -45,16 +43,12 @@ public class CapabilitiesController : ControllerBase
TenantManager tenantManager,
ProviderManager providerManager,
SettingsManager settingsManager,
IConfiguration configuration,
IHttpContextAccessor httpContextAccessor,
ILogger<CapabilitiesController> logger)
{
_coreBaseSettings = coreBaseSettings;
_tenantManager = tenantManager;
_providerManager = providerManager;
_settingsManager = settingsManager;
_configuration = configuration;
_httpContextAccessor = httpContextAccessor;
_settingsManager = settingsManager;
_log = logger;
}

View File

@ -30,8 +30,7 @@ public class SettingsController : BaseSettingsController
{
private static readonly object locked = new object();
private Tenant Tenant { get { return ApiContext.Tenant; } }
private readonly IServiceScopeFactory _serviceScopeFactory;
private readonly MessageService _messageService;
private readonly ConsumerFactory _consumerFactory;
private readonly TimeZoneConverter _timeZoneConverter;
@ -62,8 +61,7 @@ public class SettingsController : BaseSettingsController
private readonly QuotaUsageManager _quotaUsageManager;
private readonly QuotaSyncOperation _quotaSyncOperation;
public SettingsController(
IServiceScopeFactory serviceScopeFactory,
public SettingsController(
ILoggerProvider option,
MessageService messageService,
ApiContext apiContext,
@ -105,7 +103,6 @@ public class SettingsController : BaseSettingsController
_customNamingPeople = customNamingPeople;
_providerManager = providerManager;
_firstTimeTenantSettings = firstTimeTenantSettings;
_serviceScopeFactory = serviceScopeFactory;
_messageService = messageService;
_userManager = userManager;
_tenantManager = tenantManager;

View File

@ -38,8 +38,7 @@ public class WhitelabelController : BaseSettingsController
private readonly CoreBaseSettings _coreBaseSettings;
private readonly CommonLinkUtility _commonLinkUtility;
private readonly IMapper _mapper;
private readonly CompanyWhiteLabelSettingsHelper _companyWhiteLabelSettingsHelper;
private readonly AdditionalWhiteLabelSettingsHelper _additionalWhiteLabelSettingsHelper;
private readonly CompanyWhiteLabelSettingsHelper _companyWhiteLabelSettingsHelper;
public WhitelabelController(
ApiContext apiContext,
@ -54,7 +53,7 @@ public class WhitelabelController : BaseSettingsController
IMemoryCache memoryCache,
IHttpContextAccessor httpContextAccessor,
IMapper mapper,
CompanyWhiteLabelSettingsHelper companyWhiteLabelSettingsHelper, AdditionalWhiteLabelSettingsHelper additionalWhiteLabelSettingsHelper) : base(apiContext, memoryCache, webItemManager, httpContextAccessor)
CompanyWhiteLabelSettingsHelper companyWhiteLabelSettingsHelper) : base(apiContext, memoryCache, webItemManager, httpContextAccessor)
{
_permissionContext = permissionContext;
_settingsManager = settingsManager;
@ -65,7 +64,6 @@ public class WhitelabelController : BaseSettingsController
_commonLinkUtility = commonLinkUtility;
_mapper = mapper;
_companyWhiteLabelSettingsHelper = companyWhiteLabelSettingsHelper;
_additionalWhiteLabelSettingsHelper = additionalWhiteLabelSettingsHelper;
}
///<visible>false</visible>

View File

@ -39,7 +39,7 @@ public class Startup : BaseStartup
{
base.ConfigureServices(services);
if (!_configuration.GetValue<bool>("disableLdapNotifyService"))
if (!_configuration.GetValue<bool>("disableLdapNotifyService"))
{
services.AddHostedService<LdapNotifyService>();
DIHelper.TryAdd<LdapNotifyService>();
@ -52,5 +52,7 @@ public class Startup : BaseStartup
services.AddScoped<ITenantQuotaFeatureStat<CountRoomFeature, int>, CountRoomCheckerStatistic>();
services.AddScoped<CountRoomCheckerStatistic>();
DIHelper.TryAdd<AdditionalWhiteLabelSettingsConverter>();
}
}

View File

@ -40,7 +40,6 @@ public class StudioPeriodicNotify
private readonly CommonLinkUtility _commonLinkUtility;
private readonly ApiSystemHelper _apiSystemHelper;
private readonly SetupInfo _setupInfo;
private readonly IDbContextFactory<FeedDbContext> _dbContextFactory;
private readonly SettingsManager _settingsManager;
private readonly CoreBaseSettings _coreBaseSettings;
private readonly DisplayUserSettingsHelper _displayUserSettingsHelper;
@ -61,7 +60,6 @@ public class StudioPeriodicNotify
CommonLinkUtility commonLinkUtility,
ApiSystemHelper apiSystemHelper,
SetupInfo setupInfo,
IDbContextFactory<FeedDbContext> dbContextFactory,
SettingsManager settingsManager,
CoreBaseSettings coreBaseSettings,
DisplayUserSettingsHelper displayUserSettingsHelper,
@ -79,7 +77,6 @@ public class StudioPeriodicNotify
_commonLinkUtility = commonLinkUtility;
_apiSystemHelper = apiSystemHelper;
_setupInfo = setupInfo;
_dbContextFactory = dbContextFactory;
_settingsManager = settingsManager;
_coreBaseSettings = coreBaseSettings;
_displayUserSettingsHelper = displayUserSettingsHelper;

View File

@ -40,12 +40,10 @@ public sealed class UserManagerWrapper
private readonly StudioNotifyService _studioNotifyService;
private readonly UserManager _userManager;
private readonly SecurityContext _securityContext;
private readonly MessageService _messageService;
private readonly CustomNamingPeople _customNamingPeople;
private readonly TenantUtil _tenantUtil;
private readonly CoreBaseSettings _coreBaseSettings;
private readonly IPSecurity.IPSecurity _iPSecurity;
private readonly DisplayUserSettingsHelper _displayUserSettingsHelper;
private readonly SettingsManager _settingsManager;
private readonly UserFormatter _userFormatter;
private readonly CountRoomAdminChecker _countManagerChecker;
@ -54,12 +52,10 @@ public sealed class UserManagerWrapper
StudioNotifyService studioNotifyService,
UserManager userManager,
SecurityContext securityContext,
MessageService messageService,
CustomNamingPeople customNamingPeople,
TenantUtil tenantUtil,
CoreBaseSettings coreBaseSettings,
IPSecurity.IPSecurity iPSecurity,
DisplayUserSettingsHelper displayUserSettingsHelper,
SettingsManager settingsManager,
UserFormatter userFormatter,
CountRoomAdminChecker countManagerChecker)
@ -67,12 +63,10 @@ public sealed class UserManagerWrapper
_studioNotifyService = studioNotifyService;
_userManager = userManager;
_securityContext = securityContext;
_messageService = messageService;
_customNamingPeople = customNamingPeople;
_tenantUtil = tenantUtil;
_coreBaseSettings = coreBaseSettings;
_iPSecurity = iPSecurity;
_displayUserSettingsHelper = displayUserSettingsHelper;
_settingsManager = settingsManager;
_userFormatter = userFormatter;
_countManagerChecker = countManagerChecker;

View File

@ -437,7 +437,6 @@ public class UserPhotoManager
};
}
private static readonly HashSet<int> _tenantDiskCache = new HashSet<int>();
private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1);