Browse Source
Merge pull request #170 from fs-tw/feature/PreconfigAddBookingOrderCreationAuthorizationHandler
Register authorization handlers for the booking plugin
pull/173/head
Super
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
0 deletions
-
plugins/Booking/src/EasyAbp.EShop.Orders.Booking.Application/EasyAbp/EShop/Orders/Booking/EShopOrdersBookingApplicationModule.cs
-
plugins/Booking/src/EasyAbp.EShop.Payments.Booking.Application/EasyAbp/EShop/Payments/Booking/EShopPaymentsBookingApplicationModule.cs
|
|
|
@ -1,5 +1,8 @@ |
|
|
|
using EasyAbp.BookingService; |
|
|
|
using EasyAbp.EShop.Orders.Booking.Authorization; |
|
|
|
using EasyAbp.EShop.Orders.Booking.ObjectExtending; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Orders.Booking |
|
|
|
@ -14,6 +17,7 @@ namespace EasyAbp.EShop.Orders.Booking |
|
|
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
EShopOrdersPluginsBookingObjectExtensions.Configure(); |
|
|
|
context.Services.AddSingleton<IAuthorizationHandler, BookingOrderCreationAuthorizationHandler>(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,8 @@ |
|
|
|
using EasyAbp.BookingService; |
|
|
|
using EasyAbp.EShop.Payments.Booking.Authorization; |
|
|
|
using EasyAbp.EShop.Plugins.Booking; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Payments.Booking |
|
|
|
@ -11,5 +14,9 @@ namespace EasyAbp.EShop.Payments.Booking |
|
|
|
)] |
|
|
|
public class EShopPaymentsBookingApplicationModule : AbpModule |
|
|
|
{ |
|
|
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.AddSingleton<IAuthorizationHandler, BookingPaymentCreationAuthorizationHandler>(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|