From 5e4a3b76a3acfcaa9e9ef91a6dcd26b6b071feb0 Mon Sep 17 00:00:00 2001 From: Andrey Savihin Date: Tue, 24 Dec 2024 13:38:27 +0300 Subject: [PATCH] ASC.ApiSystem: removed unused controllers and models --- .../ASC.ApiSystem/Classes/EmailAttribute.cs | 41 -- .../Controllers/CalDavController.cs | 351 ------------------ .../Controllers/PeopleController.cs | 125 ------- .../Controllers/PortalController.cs | 2 +- .../Controllers/TariffController.cs | 223 ----------- .../ASC.ApiSystem/Models/CoreSettingsModel.cs | 49 --- .../ASC.ApiSystem/Models/FindPeopleModel.cs | 38 -- .../ASC.ApiSystem/Models/TariffModel.cs | 70 ---- 8 files changed, 1 insertion(+), 898 deletions(-) delete mode 100644 common/services/ASC.ApiSystem/Classes/EmailAttribute.cs delete mode 100644 common/services/ASC.ApiSystem/Controllers/CalDavController.cs delete mode 100644 common/services/ASC.ApiSystem/Controllers/PeopleController.cs delete mode 100644 common/services/ASC.ApiSystem/Controllers/TariffController.cs delete mode 100644 common/services/ASC.ApiSystem/Models/CoreSettingsModel.cs delete mode 100644 common/services/ASC.ApiSystem/Models/FindPeopleModel.cs delete mode 100644 common/services/ASC.ApiSystem/Models/TariffModel.cs diff --git a/common/services/ASC.ApiSystem/Classes/EmailAttribute.cs b/common/services/ASC.ApiSystem/Classes/EmailAttribute.cs deleted file mode 100644 index e61e715611d..00000000000 --- a/common/services/ASC.ApiSystem/Classes/EmailAttribute.cs +++ /dev/null @@ -1,41 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Classes; - -[AttributeUsage(AttributeTargets.Property)] -public sealed class EmailAttribute : DataTypeAttribute -{ - public EmailAttribute() : base(DataType.EmailAddress) - { - ErrorMessage = "emailIncorrect"; - } - - public override bool IsValid(object value) - { - return value != null && (value as string).TestEmailRegex(); - } -} diff --git a/common/services/ASC.ApiSystem/Controllers/CalDavController.cs b/common/services/ASC.ApiSystem/Controllers/CalDavController.cs deleted file mode 100644 index bccd3b60458..00000000000 --- a/common/services/ASC.ApiSystem/Controllers/CalDavController.cs +++ /dev/null @@ -1,351 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Controllers; - -[Scope] -[ApiController] -[Route("[controller]")] -[ApiExplorerSettings(IgnoreApi = true)] -public class CalDavController(CommonMethods commonMethods, - EmailValidationKeyProvider emailValidationKeyProvider, - CoreSettings coreSettings, - CommonConstants commonConstants, - InstanceCrypto instanceCrypto, - ILogger logger, - IHttpClientFactory httpClientFactory) - : ControllerBase -{ - #region For TEST api - - /// - /// Test api - /// - /// apisystem/caldav/test - [SwaggerResponse(200, "CalDav api works")] - [HttpGet("test")] - public IActionResult Check() - { - return Ok(new - { - value = "CalDav api works" - }); - } - - #endregion - - #region API methods - - /// - /// Changes to storage - /// - /// apisystem/caldav/change_to_storage - [Tags("CalDav")] - [SwaggerResponse(200, "Ok", typeof(IActionResult))] - [HttpGet("change_to_storage")] - public async Task СhangeOfCalendarStorageAsync(string change) - { - var (succ, tenant, error) = await GetTenantAsync(change); - if (!succ) - { - return BadRequest(error); - } - - try - { - var scheme = commonMethods.GetRequestScheme(); - var validationKey = emailValidationKeyProvider.GetEmailKey(tenant.Id, change + ConfirmType.Auth); - - await SendToApi(scheme, tenant, "calendar/change_to_storage", new Dictionary { { "change", change }, { "key", validationKey } }); - } - catch (Exception ex) - { - logger.LogError(ex, "Error change_to_storage"); - - return StatusCode(StatusCodes.Status500InternalServerError, new - { - error = "apiError", - message = ex.Message - }); - } - - return Ok(); - } - - /// - /// Delete - /// - /// apisystem/caldav/caldav_delete_event - [Tags("CalDav")] - [SwaggerResponse(200, "Ok", typeof(IActionResult))] - [HttpGet("caldav_delete_event")] - [Authorize(AuthenticationSchemes = "auth:allowskip:default")] - public async Task CaldavDeleteEventAsync(string eventInfo) - { - var (succ, tenant, error) = await GetTenantAsync(eventInfo); - if (!succ) - { - return BadRequest(error); - } - - try - { - var scheme = commonMethods.GetRequestScheme(); - var validationKey = emailValidationKeyProvider.GetEmailKey(tenant.Id, eventInfo + ConfirmType.Auth); - - await SendToApi(scheme, tenant, "calendar/caldav_delete_event", new Dictionary { { "eventInfo", eventInfo }, { "key", validationKey } }); - } - catch (Exception ex) - { - logger.LogError(ex, "Error caldav_delete_event"); - - return StatusCode(StatusCodes.Status500InternalServerError, new - { - error = "apiError", - message = ex.Message - }); - } - - return Ok(); - } - - /// - /// Caldav authenticated - /// - /// apisystem/caldav/is_caldav_authenticated - [Tags("CalDav")] - [SwaggerResponse(200, "Ok", typeof(IActionResult))] - [HttpPost("is_caldav_authenticated")] - [Authorize(AuthenticationSchemes = "auth:allowskip:default")] - public async Task IsCaldavAuthenticatedAsync(UserPassword userPassword) - { - if (userPassword == null || string.IsNullOrEmpty(userPassword.User) || string.IsNullOrEmpty(userPassword.Password)) - { - logger.LogError("CalDav authenticated data is null"); - - return BadRequest(new - { - value = "false", - error = "portalNameEmpty", - message = "Argument is required" - }); - } - - var (succ, email, tenant, error) = await GetUserDataAsync(userPassword.User); - if (!succ) - { - return BadRequest(error); - } - - try - { - logger.LogInformation(string.Format("Caldav auth user: {0}, tenant: {1}", email, tenant.Id)); - - if (await instanceCrypto.EncryptAsync(email) == userPassword.Password) - { - return Ok(new - { - value = "true" - }); - } - - var validationKey = emailValidationKeyProvider.GetEmailKey(tenant.Id, email + userPassword.Password + ConfirmType.Auth); - - var authData = $"userName={HttpUtility.UrlEncode(email)}&password={HttpUtility.UrlEncode(userPassword.Password)}&key={HttpUtility.UrlEncode(validationKey)}"; - - var scheme = commonMethods.GetRequestScheme(); - - await SendToApi(scheme, tenant, "authentication/login", null, WebRequestMethods.Http.Post, authData); - - return Ok(new - { - value = "true" - }); - } - catch (Exception ex) - { - logger.LogError(ex, "Caldav authenticated"); - - return StatusCode(StatusCodes.Status500InternalServerError, new - { - value = "false", - message = ex.Message - }); - } - } - - #endregion - - #region private methods - - private async Task<(bool, Tenant, object)> GetTenantAsync(string calendarParam) - { - object error; - - if (string.IsNullOrEmpty(calendarParam)) - { - logger.LogError("calendarParam is empty"); - - error = new - { - value = "false", - error = "portalNameEmpty", - message = "Argument is required" - }; - - return (false, null, error); - } - - logger.LogInformation($"CalDav calendarParam: {calendarParam}"); - - var userParam = calendarParam.Split('/')[0]; - (var succ, _, var tenant, error) = await GetUserDataAsync(userParam); - - return (succ, tenant, error); - } - - private async Task<(bool, string, Tenant, object)> GetUserDataAsync(string userParam) - { - object error; - - if (string.IsNullOrEmpty(userParam)) - { - logger.LogError("userParam is empty"); - - error = new - { - value = "false", - error = "portalNameEmpty", - message = "Argument is required" - }; - - return (false, null, null, error); - } - - var userData = userParam.Split('@'); - - if (userData.Length < 3) - { - logger.LogError($"Error Caldav username: {userParam}"); - - error = new - { - value = "false", - error = "portalNameEmpty", - message = "PortalName is required" - }; - - return (false, null, null, error); - } - - var email = string.Join("@", userData[0], userData[1]); - - var tenantName = userData[2]; - - var baseUrl = coreSettings.BaseDomain; - - if (!string.IsNullOrEmpty(baseUrl) && tenantName.EndsWith("." + baseUrl, StringComparison.InvariantCultureIgnoreCase)) - { - tenantName = tenantName.Replace("." + baseUrl, ""); - } - - logger.LogInformation($"CalDav: user:{userParam} tenantName:{tenantName}"); - - var tenantModel = new TenantModel { PortalName = tenantName }; - - var (succ, tenant) = await commonMethods.TryGetTenantAsync(tenantModel); - if (!succ) - { - logger.LogError("Model without tenant"); - - error = new - { - value = "false", - error = "portalNameEmpty", - message = "PortalName is required" - }; - - return (false, email, tenant, error); - } - - if (tenant == null) - { - logger.LogError("Tenant not found " + tenantName); - - error = new - { - value = "false", - error = "portalNameNotFound", - message = "Portal not found" - }; - - return (false, email, null, error); - } - - return (true, email, tenant, null); - } - - private async Task SendToApi( - string requestUriScheme, - Tenant tenant, - string path, - IEnumerable> args = null, - string httpMethod = WebRequestMethods.Http.Get, - string data = null) - { - var query = args == null - ? null - : string.Join("&", args.Select(arg => HttpUtility.UrlEncode(arg.Key) + "=" + HttpUtility.UrlEncode(arg.Value)).ToArray()); - - var url = $"{requestUriScheme}{Uri.SchemeDelimiter}{tenant.GetTenantDomain(coreSettings)}{commonConstants.WebApiBaseUrl}{path}{(string.IsNullOrEmpty(query) ? "" : "?" + query)}"; - - logger.LogInformation($"CalDav: SendToApi: {url}"); - - var request = new HttpRequestMessage - { - RequestUri = new Uri(url), - Method = new HttpMethod(httpMethod) - }; - request.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var httpClient = httpClientFactory.CreateClient(); - - if (data != null) - { - request.Content = new StringContent(data, Encoding.UTF8, "application/x-www-form-urlencoded"); - } - - await httpClient.SendAsync(request); - } - - #endregion - - public class UserPassword - { - public string User { get; set; } - public string Password { get; set; } - } -} diff --git a/common/services/ASC.ApiSystem/Controllers/PeopleController.cs b/common/services/ASC.ApiSystem/Controllers/PeopleController.cs deleted file mode 100644 index 9e21c48b149..00000000000 --- a/common/services/ASC.ApiSystem/Controllers/PeopleController.cs +++ /dev/null @@ -1,125 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Controllers; - -[Scope] -[ApiController] -[Route("[controller]")] -public class PeopleController( - ILogger option, - HostedSolution hostedSolution, - UserFormatter userFormatter, - ICache cache, - CoreSettings coreSettings, - CommonLinkUtility commonLinkUtility, - CommonMethods commonMethods) - : ControllerBase -{ - #region For TEST api - - /// - /// Test api - /// - /// apisystem/people/test - [ApiExplorerSettings(IgnoreApi = true)] - [SwaggerResponse(200, "People api works")] - [HttpGet("test")] - public IActionResult Check() - { - return Ok(new - { - value = "People api works" - }); - } - - #endregion - - #region API methods - - /// - /// Find - /// - /// apisystem/people/find - [Tags("People")] - [SwaggerResponse(200, "Ok", typeof(IActionResult))] - [HttpPost("find")] - [AllowCrossSiteJson] - public async Task FindAsync(FindPeopleModel model) - { - var sw = Stopwatch.StartNew(); - var userIds = model.UserIds ?? new List(); - - var users = await hostedSolution.FindUsersAsync(userIds); - - var result = await users.ToAsyncEnumerable().SelectAwait(async user => new - { - id = user.Id, - name = userFormatter.GetUserName(user), - email = user.Email, - - link = await GetUserProfileLinkAsync(user) - }).ToListAsync(); - - option.LogDebug("People find {0} / {1}; Elapsed {2} ms", result.Count, userIds.Count(), sw.ElapsedMilliseconds); - sw.Stop(); - - return Ok(new - { - result - }); - } - - #endregion - - #region private methods - - private async Task GetTenantDomainAsync(int tenantId) - { - var domain = cache.Get(tenantId.ToString()); - if (string.IsNullOrEmpty(domain)) - { - var tenant = await hostedSolution.GetTenantAsync(tenantId); - domain = tenant.GetTenantDomain(coreSettings); - cache.Insert(tenantId.ToString(), domain, TimeSpan.FromMinutes(10)); - } - return domain; - } - - private async Task GetUserProfileLinkAsync(UserInfo user) - { - var scheme = commonMethods.GetRequestScheme(); - var tenantDomain = await GetTenantDomainAsync(user.TenantId); - var profileUrl = await commonLinkUtility.GetUserProfileAsync(user.Id); - return string.Format("{0}{1}{2}{3}", - scheme, - Uri.SchemeDelimiter, - tenantDomain, - profileUrl.TrimStart('~')); - } - - #endregion -} diff --git a/common/services/ASC.ApiSystem/Controllers/PortalController.cs b/common/services/ASC.ApiSystem/Controllers/PortalController.cs index 7e55f8c13d0..4fc0d5d9912 100644 --- a/common/services/ASC.ApiSystem/Controllers/PortalController.cs +++ b/common/services/ASC.ApiSystem/Controllers/PortalController.cs @@ -494,7 +494,7 @@ public async ValueTask CheckExistingNamePortalAsync(TenantModel m /// /// Gets a list of portals /// - /// apisystem/portal + /// apisystem/portal/get [Tags("Portal")] [SwaggerResponse(200, "Ok", typeof(IActionResult))] [HttpGet("get")] diff --git a/common/services/ASC.ApiSystem/Controllers/TariffController.cs b/common/services/ASC.ApiSystem/Controllers/TariffController.cs deleted file mode 100644 index a3e8fd22ce2..00000000000 --- a/common/services/ASC.ApiSystem/Controllers/TariffController.cs +++ /dev/null @@ -1,223 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Controllers; - -[Scope] -[ApiController] -[Route("[controller]")] -public class TariffController(CommonMethods commonMethods, - HostedSolution hostedSolution, - ILogger option) - : ControllerBase -{ - private CommonMethods CommonMethods { get; } = commonMethods; - private HostedSolution HostedSolution { get; } = hostedSolution; - private ILogger Log { get; } = option; - - #region For TEST api - - /// - /// Test Api - /// - /// apisystem/tariff/test - [ApiExplorerSettings(IgnoreApi = true)] - [SwaggerResponse(200, "Tariff api works")] - [HttpGet("test")] - public IActionResult Check() - { - return Ok(new - { - value = "Tariff api works" - }); - } - - #endregion - - #region API methods - - /// - /// Sets tariff - /// - /// apisystem/tariff/set - [Tags("Tariff")] - [SwaggerResponse(200, "Tariff", typeof(IActionResult))] - [HttpPut("set")] - [AllowCrossSiteJson] - [Authorize(AuthenticationSchemes = "auth:allowskip:default")] - public async Task SetTariffAsync(TariffModel model) - { - var (succ, tenant) = await CommonMethods.TryGetTenantAsync(model); - if (!succ) - { - Log.LogError("Model without tenant"); - - return BadRequest(new - { - error = "portalNameEmpty", - message = "PortalName is required" - }); - } - - if (tenant == null) - { - Log.LogError("Tenant not found"); - - return BadRequest(new - { - error = "portalNameNotFound", - message = "Portal not found" - }); - } - - var quota = new TenantQuota(tenant.Id) - { - CountRoomAdmin = 10000, - Features = model.Features ?? "", - MaxFileSize = 1024 * 1024 * 1024, - MaxTotalSize = 1024L * 1024 * 1024 * 1024 - 1, - Name = "api" - }; - - if (model.ActiveUsers != 0) - { - quota.CountRoomAdmin = model.ActiveUsers; - } - - if (model.MaxTotalSize != 0) - { - quota.MaxTotalSize = model.MaxTotalSize; - } - - if (model.MaxFileSize != 0) - { - quota.MaxFileSize = model.MaxFileSize; - } - - await HostedSolution.SaveTenantQuotaAsync(quota); - - var tariff = new Tariff - { - Quotas = [new(quota.TenantId, 1)], - DueDate = model.DueDate != default ? model.DueDate : DateTime.MaxValue.AddSeconds(-1) - }; - - await HostedSolution.SetTariffAsync(tenant.Id, tariff); - - return await GetTariffAsync(tenant); - } - - /// - /// Gets tariff - /// - /// apisystem/tariff/get - [Tags("Tariff")] - [SwaggerResponse(200, "Tariff", typeof(IActionResult))] - [HttpGet("get")] - [AllowCrossSiteJson] - [Authorize(AuthenticationSchemes = "auth:allowskip:default")] - public async Task GetTariffAsync([FromQuery] TariffModel model) - { - var (succ, tenant) = await CommonMethods.TryGetTenantAsync(model); - if (!succ) - { - Log.LogError("Model without tenant"); - - return BadRequest(new - { - error = "portalNameEmpty", - message = "PortalName is required" - }); - } - - if (tenant == null) - { - Log.LogError("Tenant not found"); - - return BadRequest(new - { - error = "portalNameNotFound", - message = "Portal not found" - }); - } - - return await GetTariffAsync(tenant); - } - - /// - /// Gets all tariffs - /// - /// apisystem/tariff/all - [Tags("Tariff")] - [SwaggerResponse(200, "Tariff", typeof(IActionResult))] - [HttpGet("all")] - [AllowCrossSiteJson] - public async Task GetTariffsAsync() - { - var tariffs = (await HostedSolution.GetTenantQuotasAsync()) - .Where(q => !q.Trial && !q.Free) - .OrderBy(q => q.CountRoomAdmin) - .ThenByDescending(q => q.TenantId) - .Select(q => ToTariffWrapper(null, q)); - - return Ok(new - { - tariffs - }); - } - - #endregion - - #region private methods - - private async Task GetTariffAsync(Tenant tenant) - { - var tariff = await HostedSolution.GetTariffAsync(tenant.Id, false); - - var quota = await HostedSolution.GetTenantQuotaAsync(tenant.Id); - - return Ok(new - { - tenant = CommonMethods.ToTenantWrapper(tenant), - tariff = ToTariffWrapper(tariff, quota) - }); - } - - private static object ToTariffWrapper(Tariff t, TenantQuota q) - { - return new - { - countManager = q.CountRoomAdmin, - dueDate = t?.DueDate ?? DateTime.MaxValue, - features = q.Features, - maxFileSize = q.MaxFileSize, - maxTotalSize = q.MaxTotalSize, - state = t?.State ?? TariffState.Paid - }; - } - - #endregion -} diff --git a/common/services/ASC.ApiSystem/Models/CoreSettingsModel.cs b/common/services/ASC.ApiSystem/Models/CoreSettingsModel.cs deleted file mode 100644 index 9cbec4f2857..00000000000 --- a/common/services/ASC.ApiSystem/Models/CoreSettingsModel.cs +++ /dev/null @@ -1,49 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Models; - -/// -/// Request parameters -/// -public class CoreSettingsModel -{ - /// - /// Tenant - /// - public int Tenant { get; set; } = -1; - - /// - /// Key - /// - [StringLength(255)] - public string Key { get; set; } - - /// - /// Value - /// - public string Value { get; set; } -} diff --git a/common/services/ASC.ApiSystem/Models/FindPeopleModel.cs b/common/services/ASC.ApiSystem/Models/FindPeopleModel.cs deleted file mode 100644 index bb520368290..00000000000 --- a/common/services/ASC.ApiSystem/Models/FindPeopleModel.cs +++ /dev/null @@ -1,38 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Models; - -/// -/// Request parameters for people -/// -public class FindPeopleModel -{ - /// - /// User ids - /// - public IEnumerable UserIds { get; set; } -} diff --git a/common/services/ASC.ApiSystem/Models/TariffModel.cs b/common/services/ASC.ApiSystem/Models/TariffModel.cs deleted file mode 100644 index a03b8b75729..00000000000 --- a/common/services/ASC.ApiSystem/Models/TariffModel.cs +++ /dev/null @@ -1,70 +0,0 @@ -// (c) Copyright Ascensio System SIA 2009-2024 -// -// 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.ApiSystem.Models; - -/// -/// Request parameters for tariff -/// -public class TariffModel : IModel -{ - /// - /// Portal name - /// - [StringLength(255)] - public string PortalName { get; set; } - - /// - /// Tenant id - /// - public int? TenantId { get; set; } - - /// - /// Active users - /// - public int ActiveUsers { get; set; } - - /// - /// Due date - /// - public DateTime DueDate { get; set; } - - /// - /// Features - /// - [StringLength(255)] - public string Features { get; set; } - - /// - /// Max file size - /// - public long MaxFileSize { get; set; } - - /// - /// Max total size - /// - public long MaxTotalSize { get; set; } -}