From f13263c75a11d87185cf45373fed2be740684dec Mon Sep 17 00:00:00 2001 From: Vashchuk Nikita Date: Mon, 11 Jul 2022 15:43:06 +0300 Subject: [PATCH] fix contexts after merge --- common/ASC.Core.Common/EF/Model/Core/Acl.cs | 5 ++--- common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs | 2 +- products/ASC.Files/Core/Core/EF/DbFile.cs | 4 +++- products/ASC.Files/Core/Core/EF/DbFilesProperties.cs | 5 +++-- products/ASC.Files/Core/Core/EF/DbFilesTag.cs | 4 +++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/common/ASC.Core.Common/EF/Model/Core/Acl.cs b/common/ASC.Core.Common/EF/Model/Core/Acl.cs index 94cfa1f267..e26a432fc2 100644 --- a/common/ASC.Core.Common/EF/Model/Core/Acl.cs +++ b/common/ASC.Core.Common/EF/Model/Core/Acl.cs @@ -103,7 +103,7 @@ public static class AclExtension new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", AceType = 0 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = AceType.Deny }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", AceType = 0 }, @@ -113,8 +113,7 @@ public static class AclExtension new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", AceType = (AceType)1 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", AceType = (AceType)1 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", AceType = 0 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", AceType = 0 } ); + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", AceType = 0 }); return modelBuilder; } diff --git a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs index 53a2be4bad..cbcc48dc3c 100644 --- a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs +++ b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs @@ -77,7 +77,7 @@ public static class SubscriptionMethodExtension new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForTask", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "AddRelationshipEvent", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ExportCompleted", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, - new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender", Tenant = -1 }, + new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForOpportunity", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "asc.web.studio", Action = "periodic_notify", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Sender = "email.sender", Tenant = -1 } ); diff --git a/products/ASC.Files/Core/Core/EF/DbFile.cs b/products/ASC.Files/Core/Core/EF/DbFile.cs index 43a6ecd9ce..3925d72dc8 100644 --- a/products/ASC.Files/Core/Core/EF/DbFile.cs +++ b/products/ASC.Files/Core/Core/EF/DbFile.cs @@ -126,7 +126,9 @@ public static class DbFileExtension entity.Property(e => e.Version).HasColumnName("version"); - entity.Property(e => e.Category).HasColumnName("category"); + entity.Property(e => e.Category) + .HasColumnName("category") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Changes) .HasColumnName("changes") diff --git a/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs b/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs index d5f8e9f210..508702bba7 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs @@ -57,7 +57,8 @@ public static class DbFilesPropertiesExtension entity.ToTable("files_properties"); - entity.Property(e => e.TenantId).HasColumnName("tenant_id"); + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id"); entity.Property(e => e.EntryId) .HasColumnName("entry_id") @@ -65,7 +66,7 @@ public static class DbFilesPropertiesExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.EntryId) + entity.Property(e => e.Data) .HasColumnName("data") .HasColumnType("mediumtext") .HasCharSet("utf8") diff --git a/products/ASC.Files/Core/Core/EF/DbFilesTag.cs b/products/ASC.Files/Core/Core/EF/DbFilesTag.cs index bef8a02203..50fe859db7 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesTag.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesTag.cs @@ -57,7 +57,9 @@ public static class DbFilesTagExtension entity.Property(e => e.Id).HasColumnName("id"); - entity.Property(e => e.Type).HasColumnName("flag"); + entity.Property(e => e.Type) + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Name) .IsRequired()