Revert "removed products"

This reverts commit fee81e8a3b.
This commit is contained in:
pavelbannov 2023-05-11 11:26:28 +03:00
parent c733089fc0
commit 15b5aaaf83
3 changed files with 39 additions and 1 deletions

View File

@ -197,6 +197,7 @@ public abstract class BaseStartup
config.Filters.Add(new TypeFilterAttribute(typeof(TenantStatusFilter)));
config.Filters.Add(new TypeFilterAttribute(typeof(PaymentFilter)));
config.Filters.Add(new TypeFilterAttribute(typeof(IpSecurityFilter)));
config.Filters.Add(new TypeFilterAttribute(typeof(ProductSecurityFilter)));
config.Filters.Add(new CustomResponseFilterAttribute());
config.Filters.Add(new CustomExceptionFilterAttribute());
config.Filters.Add(new TypeFilterAttribute(typeof(WebhooksGlobalFilterAttribute)));

View File

@ -38,9 +38,28 @@ public class ProductSecurityFilter : IResourceFilter
static ProductSecurityFilter()
{
var blog = new Guid("6a598c74-91ae-437d-a5f4-ad339bd11bb2");
var bookmark = new Guid("28b10049-dd20-4f54-b986-873bc14ccfc7");
var forum = new Guid("853b6eb9-73ee-438d-9b09-8ffeedf36234");
var news = new Guid("3cfd481b-46f2-4a4a-b55c-b8c0c9def02c");
var wiki = new Guid("742cf945-cbbc-4a57-82d6-1600a12cf8ca");
var photo = new Guid("9d51954f-db9b-4aed-94e3-ed70b914e101");
_products = new Dictionary<string, Guid>
{
{ "files", WebItemManager.DocumentsProductID }
{ "blog", blog },
{ "bookmark", bookmark },
{ "event", news },
{ "forum", forum },
{ "photo", photo },
{ "wiki", wiki },
{ "birthdays", WebItemManager.BirthdaysProductID },
{ "community", WebItemManager.CommunityProductID },
{ "crm", WebItemManager.CRMProductID },
{ "files", WebItemManager.DocumentsProductID },
{ "project", WebItemManager.ProjectsProductID },
{ "calendar", WebItemManager.CalendarProductID },
{ "mail", WebItemManager.MailProductID },
};
}

View File

@ -1,4 +1,22 @@
{
"components": [
{
"type": "ASC.People.PeopleProduct, ASC.People",
"services": [
{
"type": "ASC.Web.Core.IWebItem, ASC.Web.Core"
}
],
"instanceScope": "InstancePerLifetimeScope"
},
{
"type": "ASC.Files.ApiProductEntryPoint, ASC.Files",
"services": [
{
"type": "ASC.Web.Core.IWebItem, ASC.Web.Core"
}
],
"instanceScope": "InstancePerLifetimeScope"
}
]
}