Reuse AddOqtaneScopedServices()

This commit is contained in:
hishamco
2021-04-20 19:10:06 +03:00
parent f7d8888232
commit 97fb6ede7e
3 changed files with 6 additions and 36 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
@ -65,7 +66,8 @@ namespace Oqtane
services.AddOqtaneAuthorizationPolicies();
// register scoped core services
services.AddOqtaneScopedServices();
services.AddScoped<IAuthorizationHandler, PermissionHandler>()
.AddOqtaneScopedServices();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();