forked from EtchUK/Etch.OrchardCore.ContentPermissions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Startup.cs
36 lines (30 loc) · 1.37 KB
/
Startup.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Etch.OrchardCore.ContentPermissions.Drivers;
using Etch.OrchardCore.ContentPermissions.Indexing;
using Etch.OrchardCore.ContentPermissions.Liquid;
using Etch.OrchardCore.ContentPermissions.Models;
using Etch.OrchardCore.ContentPermissions.Services;
using Etch.OrchardCore.ContentPermissions.Settings;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.Data.Migration;
using OrchardCore.Indexing;
using OrchardCore.Liquid;
using OrchardCore.Modules;
using YesSql.Indexes;
namespace Etch.OrchardCore.ContentPermissions
{
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IContentPermissionsService, ContentPermissionsService>();
services.AddContentPart<ContentPermissionsPart>().UseDisplayDriver<ContentPermissionsDisplay>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, ContentPermissionsPartSettingsDisplayDriver>();
services.AddLiquidFilter<UserCanViewFilter>("user_can_view");
services.AddScoped<IDataMigration, Migrations>();
services.AddScoped<IContentPartIndexHandler, ContentPermissionsPartIndexHandler>();
}
}
}