Skip to content

Commit

Permalink
Update platform
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-dudarev committed May 16, 2024
1 parent 2ae1da9 commit 6917359
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.CoreModule.Core" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.NotificationsModule.Core" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Core" Version="3.825.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<noWarn>NU5104</noWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.0-beta.2" />
<PackageReference Include="VirtoCommerce.Platform.Data.MySql" Version="3.825.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.StoreModule.Data\VirtoCommerce.StoreModule.Data.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Npgsql" Version="8.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="VirtoCommerce.Platform.Data.PostgreSql" Version="3.825.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.StoreModule.Data\VirtoCommerce.StoreModule.Data.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="VirtoCommerce.Platform.Data.SqlServer" Version="3.825.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.StoreModule.Data\VirtoCommerce.StoreModule.Data.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.CoreModule.Data" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Hangfire" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Security" Version="3.800.0" />
<PackageReference Include="VirtoCommerce.Platform.Data" Version="3.825.0" />
<PackageReference Include="VirtoCommerce.Platform.Hangfire" Version="3.825.0" />
<PackageReference Include="VirtoCommerce.Platform.Security" Version="3.825.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.StoreModule.Core\VirtoCommerce.StoreModule.Core.csproj" />
Expand Down
18 changes: 8 additions & 10 deletions src/VirtoCommerce.StoreModule.Web/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
using Microsoft.Extensions.DependencyInjection;
using VirtoCommerce.CoreModule.Core.Seo;
using VirtoCommerce.NotificationsModule.Core.Services;
using VirtoCommerce.Platform.Core.Bus;
using VirtoCommerce.Platform.Core.Common;
using VirtoCommerce.Platform.Core.DynamicProperties;
using VirtoCommerce.Platform.Core.Events;
using VirtoCommerce.Platform.Core.ExportImport;
using VirtoCommerce.Platform.Core.Modularity;
using VirtoCommerce.Platform.Core.Security;
Expand Down Expand Up @@ -83,28 +83,26 @@ public void PostInitialize(IApplicationBuilder appBuilder)

var settingsRegistrar = appBuilder.ApplicationServices.GetRequiredService<ISettingsRegistrar>();
settingsRegistrar.RegisterSettings(ModuleConstants.Settings.AllSettings, ModuleInfo.Id);
//Register settings for type Store
// Register settings for type Store
settingsRegistrar.RegisterSettingsForType(ModuleConstants.Settings.AllSettings, nameof(Store));

var permissionsRegistrar = appBuilder.ApplicationServices.GetRequiredService<IPermissionsRegistrar>();
permissionsRegistrar.RegisterPermissions(ModuleInfo.Id, "Store", ModuleConstants.Security.Permissions.AllPermissions);

//Register Permission scopes
// Register permission scopes
AbstractTypeFactory<PermissionScope>.RegisterType<StoreSelectedScope>();

permissionsRegistrar.WithAvailabeScopesForPermissions(
new[]
{
[
ModuleConstants.Security.Permissions.Read,
ModuleConstants.Security.Permissions.Update,
ModuleConstants.Security.Permissions.Delete,
},
],
new StoreSelectedScope());

//Events handlers registration
var inProcessBus = appBuilder.ApplicationServices.GetService<IHandlerRegistrar>();
inProcessBus.RegisterHandler<StoreChangedEvent>(async (message, _) => await appBuilder.ApplicationServices.GetService<LogChangesChangedEventHandler>().Handle(message));
inProcessBus.RegisterHandler<UserVerificationEmailEvent>(async (message, _) => await appBuilder.ApplicationServices.GetService<SendStoreUserVerificationEmailHandler>().Handle(message));
// Register event handlers
appBuilder.RegisterEventHandler<StoreChangedEvent, LogChangesChangedEventHandler>();
appBuilder.RegisterEventHandler<UserVerificationEmailEvent, SendStoreUserVerificationEmailHandler>();

var databaseProvider = Configuration.GetValue("DatabaseProvider", "SqlServer");

Expand Down
2 changes: 1 addition & 1 deletion src/VirtoCommerce.StoreModule.Web/module.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<id>VirtoCommerce.Store</id>
<version>3.804.0</version>
<version-tag />
<platformVersion>3.800.0</platformVersion>
<platformVersion>3.825.0</platformVersion>
<dependencies>
<dependency id="VirtoCommerce.Core" version="3.800.0" />
<dependency id="VirtoCommerce.Notifications" version="3.800.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<noWarn>1591</noWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 6917359

Please sign in to comment.