Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into bugfix/66037
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/ASC.Core.Common/Quota/QuotaSocketManager.cs
#	common/ASC.Socket.IO/app/controllers/files.js
#	common/ASC.Socket.IO/app/hubs/files.js
#	products/ASC.People/Server/Api/UserController.cs
  • Loading branch information
andreysavihin committed Jul 29, 2024
2 parents bf3855a + 6aaa43f commit d02184a
Show file tree
Hide file tree
Showing 1,375 changed files with 102,214 additions and 30,315 deletions.
1 change: 1 addition & 0 deletions .github/workflows/trigger-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- 'hotfix/v*'
- 'release/v*'
- 'develop'

jobs:
dispatch:
Expand Down
12 changes: 0 additions & 12 deletions ASC.Migrations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.Extensions.Log
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{FD61091C-F0C1-47B3-B442-9B69CEA603DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Creator", "common\Tools\ASC.Migration.Creator\ASC.Migration.Creator.csproj", "{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}"
Expand All @@ -25,8 +23,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Runner", "com
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ActiveDirectory", "common\ASC.ActiveDirectory\ASC.ActiveDirectory.csproj", "{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.PersonalToDocspace", "common\Tools\ASC.MigrationPersonalToDocspace\ASC.Migration.PersonalToDocspace.csproj", "{9493BF4B-46DF-4BE7-AC63-83992B205A00}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Common", "common\ASC.Common\ASC.Common.csproj", "{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql.SaaS", "migrations\mysql\SaaS\ASC.Migrations.MySql.SaaS.csproj", "{57A7DD9D-373D-4270-9FF0-986F62B594EF}"
Expand Down Expand Up @@ -63,10 +59,6 @@ Global
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.Build.0 = Release|Any CPU
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.Build.0 = Release|Any CPU
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -87,10 +79,6 @@ Global
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD482D67-F700-4C30-9AA6-A2BE7A1079B5}.Release|Any CPU.Build.0 = Release|Any CPU
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9493BF4B-46DF-4BE7-AC63-83992B205A00}.Release|Any CPU.Build.0 = Release|Any CPU
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C5691B2-4AB1-4D3C-931C-AF7AD9CE8241}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
24 changes: 0 additions & 24 deletions ASC.Web.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.MessagingSystem", "comm
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.IPSecurity", "common\ASC.IPSecurity\ASC.IPSecurity.csproj", "{2FF2177F-2D1A-4396-84EB-51F14FD99385}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{B0431EC9-21D8-4D96-B333-6DD430031C82}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Reassigns", "common\ASC.Data.Reassigns\ASC.Data.Reassigns.csproj", "{104D045A-F9CC-4DD7-B04D-8DA7543435DD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify", "common\services\ASC.Notify\ASC.Notify.csproj", "{8484A675-1C93-4D87-8FF2-7530A5711208}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Studio.Notify", "common\services\ASC.Studio.Notify\ASC.Studio.Notify.csproj", "{E3567AB9-0926-444D-A0D0-A369D5890EAA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Textile", "common\ASC.Textile\ASC.Textile.csproj", "{C8F410B4-B83B-47B9-9ECD-07590A8750A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Notify.Textile", "common\ASC.Notify.Textile\ASC.Notify.Textile.csproj", "{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ElasticSearch", "common\services\ASC.ElasticSearch\ASC.ElasticSearch.csproj", "{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files", "products\ASC.Files\Server\ASC.Files.csproj", "{77BA2F61-6155-4283-BB39-F8E42F46A0B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Service", "products\ASC.Files\Service\ASC.Files.Service.csproj", "{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed.Aggregator", "common\services\ASC.Feed.Aggregator\ASC.Feed.Aggregator.csproj", "{07CCC11F-76CB-448E-B15A-72E09FBB348B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{F0A39728-940D-4DBE-A37A-05D4EB57F342}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.TelegramService", "common\services\ASC.TelegramService\ASC.TelegramService.csproj", "{95CE7371-17B6-4EEE-8E38-2FDE6347E955}"
Expand Down Expand Up @@ -139,10 +131,6 @@ Global
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FF2177F-2D1A-4396-84EB-51F14FD99385}.Release|Any CPU.Build.0 = Release|Any CPU
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0431EC9-21D8-4D96-B333-6DD430031C82}.Release|Any CPU.Build.0 = Release|Any CPU
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{104D045A-F9CC-4DD7-B04D-8DA7543435DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -155,14 +143,6 @@ Global
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3567AB9-0926-444D-A0D0-A369D5890EAA}.Release|Any CPU.Build.0 = Release|Any CPU
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8F410B4-B83B-47B9-9ECD-07590A8750A7}.Release|Any CPU.Build.0 = Release|Any CPU
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB50E2EF-B4D8-493A-8568-29CAC0DF9062}.Release|Any CPU.Build.0 = Release|Any CPU
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE1A0E06-6CD4-4E1D-8209-22BBBD6D5652}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -175,10 +155,6 @@ Global
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D41FFFF-816C-40B2-95CD-E2DDDCB83784}.Release|Any CPU.Build.0 = Release|Any CPU
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07CCC11F-76CB-448E-B15A-72E09FBB348B}.Release|Any CPU.Build.0 = Release|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
4 changes: 0 additions & 4 deletions ASC.Web.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@
"common\\ASC.EventBus.RabbitMQ\\ASC.EventBus.RabbitMQ.csproj",
"common\\ASC.EventBus\\ASC.EventBus.csproj",
"common\\ASC.FederatedLogin\\ASC.FederatedLogin.csproj",
"common\\ASC.Feed\\ASC.Feed.csproj",
"common\\ASC.IPSecurity\\ASC.IPSecurity.csproj",
"common\\ASC.MessagingSystem\\ASC.MessagingSystem.csproj",
"common\\ASC.Migration\\ASC.Migration.Core.csproj",
"common\\ASC.Notify.Textile\\ASC.Notify.Textile.csproj",
"common\\ASC.Textile\\ASC.Textile.csproj",
"common\\ASC.Webhooks.Core\\ASC.Webhooks.Core.csproj",
"common\\services\\ASC.ApiSystem\\ASC.ApiSystem.csproj",
"common\\services\\ASC.AuditTrail\\ASC.AuditTrail.csproj",
"common\\services\\ASC.ClearEvents\\ASC.ClearEvents.csproj",
"common\\services\\ASC.Data.Backup.BackgroundTasks\\ASC.Data.Backup.BackgroundTasks.csproj",
"common\\services\\ASC.Data.Backup\\ASC.Data.Backup.csproj",
"common\\services\\ASC.ElasticSearch\\ASC.ElasticSearch.csproj",
"common\\services\\ASC.Feed.Aggregator\\ASC.Feed.Aggregator.csproj",
"common\\services\\ASC.Notify\\ASC.Notify.csproj",
"common\\services\\ASC.Studio.Notify\\ASC.Studio.Notify.csproj",
"products\\ASC.Files\\Core\\ASC.Files.Core.csproj",
Expand Down
3 changes: 1 addition & 2 deletions common/ASC.ActiveDirectory/Base/DbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
namespace ASC.ActiveDirectory.Base;

[Scope]
public class DbHelper(IDbContextFactory<WebstudioDbContext> activeDirectoryDbContextFactory,
LdapSettings ldapSettings)
public class DbHelper(IDbContextFactory<WebstudioDbContext> activeDirectoryDbContextFactory, LdapSettings ldapSettings)
{
public async Task<List<int>> TenantsAsync()
{
Expand Down
10 changes: 4 additions & 6 deletions common/ASC.ActiveDirectory/Base/LdapHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@

namespace ASC.ActiveDirectory.Base;

[Scope]
public abstract class LdapHelper(ILogger<LdapHelper> logger,
InstanceCrypto instanceCrypto)
: IDisposable

public abstract class LdapHelper(ILogger<LdapHelper> logger, InstanceCrypto instanceCrypto) : IDisposable
{
public LdapSettings Settings { get; private set; }
public abstract bool IsConnected { get; }
Expand Down Expand Up @@ -130,13 +128,13 @@ public string GetPassword(byte[] passwordBytes)
return password;
}

public byte[] GetPasswordBytes(string password)
public async Task<byte[]> GetPasswordBytesAsync(string password)
{
byte[] passwordBytes;

try
{
passwordBytes = _instanceCrypto.Encrypt(new UnicodeEncoding().GetBytes(password));
passwordBytes = await _instanceCrypto.EncryptAsync(new UnicodeEncoding().GetBytes(password));
}
catch (Exception)
{
Expand Down
11 changes: 1 addition & 10 deletions common/ASC.ActiveDirectory/Base/LdapNotifyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace ASC.ActiveDirectory.Base;

[Singleton(Additional = typeof(LdapNotifyHelperExtension))]
[Singleton]
public class LdapNotifyService(IServiceScopeFactory serviceScopeFactory,
WorkContext workContext,
NotifyConfiguration notifyConfiguration,
Expand Down Expand Up @@ -105,12 +105,3 @@ public async Task AutoSyncAsync(Tenant tenant)
await ldapSaveSyncOperation.RunJobAsync(ldapSettings, tenant, LdapOperationType.Sync);
}
}

public static class LdapNotifyHelperExtension
{
public static void Register(DIHelper services)
{
services.TryAdd<DbHelper>();
services.TryAdd<LdapNotifySource>();
}
}
27 changes: 23 additions & 4 deletions common/ASC.ActiveDirectory/Base/NotifyConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,31 @@ public static class NotifyConstants

public static ITagValue TagOrangeButton(string btnText, string btnUrl)
{
const string td = "<td style=\"height: 48px; width: 80px; margin:0; padding-bottom:56px;\">&nbsp;</td>";
const string color = "background-color:#FF6F3D; border:1px solid #FF6F3D; border-radius: 3px; color:#ffffff; display: inline-block; font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-size: 13px; font-weight: 600; padding-top: 15px; padding-right: 25px; padding-bottom: 15px; padding-left: 25px; text-align: center; text-decoration: none; text-transform: uppercase; -webkit-text-size-adjust: none; letter-spacing: 0.04em;";
var sb = new StringBuilder();

var action = $@"<table style=""border: 0 none; border-collapse: collapse; border-spacing: 0; empty-cells: show; margin: 0 auto; max-width: 600px; padding: 0; vertical-align: top; width: 100%; text-align: left;""><tbody><tr cellpadding=""0"" cellspacing=""0"" border=""0"">{td}<td style=""height: 48px; width: 380px; margin:0; padding:0; text-align:center;""><a style=""{color}"" target=""_blank"" href=""{btnUrl}"">{btnText}</a></td>{td}</tr></tbody></table>";
sb.Append(@"<table cellspacing=""0"" cellpadding=""0"" style=""border: 0 none; border-collapse: collapse; border-spacing: 0; empty-cells: show; margin: 0 auto; max-width: 600px; padding: 0; vertical-align: top; width: 100%; text-align: left;"">");
sb.Append("<tbody>");
sb.Append(@"<tr border=""0"" cellspacing=""0"" cellpadding=""0"">");
sb.Append(@"<td style=""width: 180px;""></td>");
sb.Append("<!--[if mso]>");
sb.Append(@"<td class=""body-text"" border=""0"" style=""margin: 0; padding: 0; text-align: center; width: 230px;"">");
sb.Append($@"<v:roundrect xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:w=""urn:schemas-microsoft-com:office:word"" href=""{btnUrl}"" style=""v-text-anchor: middle; box-sizing: border-box; font-weight: 600; font-size: 12px; height: 56px; text-decoration: none; width: 230px;"" arcsize=""5%"" strokecolor=""#FF6F3D"" fillcolor=""#FF6F3D"" alt=""{btnText}"" target=""_blank"">");
sb.Append("<w:anchorlock/>");
sb.Append($@"<center class=""fol"" style=""color:#ffffff; font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-align: center; text-decoration: none; text-transform: uppercase; white-space: nowrap;"">{btnText}</center>");
sb.Append("</v:roundrect>");
sb.Append("</td>");
sb.Append("<![endif]-->");
sb.Append("<!--[if !mso]> <!-->");
sb.Append("<td>");
sb.Append($@"<a class=""fol"" href=""{btnUrl}"" style=""background-color:#FF6F3D; border:1px solid #FF6F3D; border-radius: 3px; color:#ffffff; display: inline-block; font-family: 'Open Sans', Helvetica, Arial, Tahoma, sans-serif; font-size: 12px; font-weight: 600; padding-top: 15px; padding-right: 83px; padding-bottom: 15px; padding-left: 83px; text-align: center; text-decoration: none; text-transform: uppercase; -webkit-text-size-adjust: none; mso-hide: all; white-space: nowrap; letter-spacing: 0.04em;"" alt=""{btnText}"" target=""_blank"">{btnText}</a>");
sb.Append("</td>");
sb.Append("<!-- <![endif]-->");
sb.Append(@"<td style=""width: 180px;""></td>");
sb.Append("</tr>");
sb.Append("</tbody>");
sb.Append("</table>");

return new TagValue("OrangeButton", action);
return new TagValue("OrangeButton", sb.ToString());
}
}

Expand Down
4 changes: 4 additions & 0 deletions common/ASC.ActiveDirectory/Base/Settings/LdapSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ public string LocationAttribute
/// <type>System.String, System</type>
public string AcceptCertificateHash { get; set; }

/// <summary>Users type (All, RoomAdmin, User, DocSpaceAdmin, Collaborator)</summary>
/// <type>ASC.Core.Users.EmployeeType, ASC.Core.Common</type>
public EmployeeType UsersType { get; set; }

private string GetOldSetting(MappingFields field)
{
LdapMapping ??= new Dictionary<MappingFields, string>();
Expand Down
Loading

0 comments on commit d02184a

Please sign in to comment.