aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Startup.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-12 21:38:43 +0800
committercrupest <crupest@outlook.com>2020-11-12 21:38:43 +0800
commite4c4a284571d51dcda373a0a1c047e634b17882d (patch)
tree2343fba4753576fd33a79e2f2d4fe1484e11f557 /BackEnd/Timeline/Startup.cs
parentb81a66ff49f5d9305108e92a009449ee5994862e (diff)
downloadtimeline-e4c4a284571d51dcda373a0a1c047e634b17882d.tar.gz
timeline-e4c4a284571d51dcda373a0a1c047e634b17882d.tar.bz2
timeline-e4c4a284571d51dcda373a0a1c047e634b17882d.zip
...
Diffstat (limited to 'BackEnd/Timeline/Startup.cs')
-rw-r--r--BackEnd/Timeline/Startup.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Startup.cs b/BackEnd/Timeline/Startup.cs
index 576836eb..532c63d0 100644
--- a/BackEnd/Timeline/Startup.cs
+++ b/BackEnd/Timeline/Startup.cs
@@ -1,4 +1,5 @@
using AutoMapper;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
@@ -72,6 +73,8 @@ namespace Timeline
.AddScheme<MyAuthenticationOptions, MyAuthenticationHandler>(AuthenticationConstants.Scheme, AuthenticationConstants.DisplayName, o => { });
services.AddAuthorization();
+ services.AddSingleton<IAuthorizationPolicyProvider, PermissionPolicyProvider>();
+
services.AddSingleton<IPathProvider, PathProvider>();
services.AddSingleton<IDatabaseBackupService, DatabaseBackupService>();
@@ -85,6 +88,7 @@ namespace Timeline
services.AddScoped<IUserDeleteService, UserDeleteService>();
services.AddScoped<IUserTokenService, JwtUserTokenService>();
services.AddScoped<IUserTokenManager, UserTokenManager>();
+ services.AddScoped<IUserPermissionService, UserPermissionService>();
services.AddScoped<IETagGenerator, ETagGenerator>();
services.AddScoped<IDataManager, DataManager>();