Browse Source

Merge pull request #12 from abpframework/master

merge
pull/985/head
Marcelo Mohr Maciel 7 years ago
committed by GitHub
parent
commit
2cddd64be5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      abp_io/src/Volo.AbpWebSite.Web/Volo.AbpWebSite.Web.csproj
  2. 20
      docs/en/Samples/Microservice-Demo.md
  3. BIN
      docs/en/images/microservice-sample-diagram-2.png
  4. 11
      framework/Volo.Abp.sln
  5. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs
  6. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs
  7. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs
  8. 13
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FlagIconCss/FlagIconCssStyleContributor.cs
  9. 9
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AlwaysAllowPermissionChecker.cs
  10. 13
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs
  11. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/IPermissionChecker.cs
  12. 3
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/IPermissionValueProvider.cs
  13. 3
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/NullPermissionStore.cs
  14. 19
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs
  15. 20
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionCheckerExtensions.cs
  16. 10
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs
  17. 9
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGrantResult.cs
  18. 8
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs
  19. 4
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueCheckContext.cs
  20. 2
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProvider.cs
  21. 8
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs
  22. 13
      framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs
  23. 16
      framework/src/Volo.Abp.Core/Volo/Abp/Threading/TaskCache.cs
  24. 7
      framework/src/Volo.Abp.Data/Volo/Abp/Data/HasExtraPropertiesExtensions.cs
  25. 21
      framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj
  26. 18
      framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs
  27. 1
      framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj
  28. 4
      framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs
  29. 1
      framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs
  30. 19
      framework/src/Volo.Abp.Settings/Volo/Abp/Settings/NullSettingStore.cs
  31. 2
      framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs
  32. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
  33. 33
      framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HasExtraPropertiesExtensions_Tests.cs
  34. 6
      modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUserSynchronizer.cs
  35. 4
      modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionValueProviderGrantInfo.cs
  36. 17
      modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml
  37. 37
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml
  38. 2
      npm/lerna.json
  39. 6
      npm/packs/flag-icon-css/abp.resourcemapping.js
  40. 10
      npm/packs/flag-icon-css/package.json
  41. 1
      nupkg/common.ps1
  42. 2
      samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj
  43. 2
      samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj
  44. 2
      samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj
  45. 16
      samples/MicroserviceDemo/docker-compose.migrations.yml
  46. 18
      samples/MicroserviceDemo/docker-compose.yml
  47. 2
      samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj
  48. 2
      samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj
  49. 2
      samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj
  50. 2
      samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj
  51. 2
      samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj
  52. 2
      samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj
  53. 2
      templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj

2
abp_io/src/Volo.AbpWebSite.Web/Volo.AbpWebSite.Web.csproj

@ -9,7 +9,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<UserSecretsId>c140514f-e488-4c99-8b9a-fabee0f53ce0</UserSecretsId> <UserSecretsId>c140514f-e488-4c99-8b9a-fabee0f53ce0</UserSecretsId>
</PropertyGroup> </PropertyGroup>

20
docs/en/Samples/Microservice-Demo.md

@ -24,7 +24,7 @@ This sample aims to demonstrate a simple yet complete microservice solution;
The diagram below shows the system: The diagram below shows the system:
![microservice-sample-diagram](../images/microservice-sample-diagram.png) ![microservice-sample-diagram-2](../images/microservice-sample-diagram-2.png)
### Source Code ### Source Code
@ -32,7 +32,7 @@ You can get the source code from [the GitHub repository](https://github.com/abpf
### Status ### Status
This sample is still in development, not completed yet. Initial version of this sample has been completed. Additional improvement are still in development.
## Running the Solution ## Running the Solution
@ -50,6 +50,20 @@ Running as docker containers is easier since all dependencies are pre-configured
- Open a command line in the `samples/MicroserviceDemo` folder of the repository. - Open a command line in the `samples/MicroserviceDemo` folder of the repository.
- Pull images from Docker Hub:
```
docker-compose -f docker-compose.yml -f docker-compose.migrations.yml pull
```
- If you want to build images locally you may skip the above step and instead use build command:
```
docker-compose -f docker-compose.yml -f docker-compose.migrations.yml build
```
Building images may take a **long time** depending on your machine.
- Restore SQL Server databases: - Restore SQL Server databases:
``` ```
@ -62,8 +76,6 @@ Running as docker containers is easier since all dependencies are pre-configured
docker-compose up -d docker-compose up -d
``` ```
At the first run, it will take a **long time** because it will build all docker images.
- Add this line to the end of your `hosts` file: - Add this line to the end of your `hosts` file:
``` ```

BIN
docs/en/images/microservice-sample-diagram-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

11
framework/Volo.Abp.sln

@ -222,9 +222,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.Identi
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.IdentityModel", "src\Volo.Abp.IdentityModel\Volo.Abp.IdentityModel.csproj", "{64D99E19-EE25-465A-82E5-17B25F4C4E18}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.IdentityModel", "src\Volo.Abp.IdentityModel\Volo.Abp.IdentityModel.csproj", "{64D99E19-EE25-465A-82E5-17B25F4C4E18}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Mvc.Client", "src\Volo.Abp.AspNetCore.Mvc.Client\Volo.Abp.AspNetCore.Mvc.Client.csproj", "{E803DDB8-81EA-454B-9A66-9C2941100B67}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.Client", "src\Volo.Abp.AspNetCore.Mvc.Client\Volo.Abp.AspNetCore.Mvc.Client.csproj", "{E803DDB8-81EA-454B-9A66-9C2941100B67}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Mvc.Contracts", "src\Volo.Abp.AspNetCore.Mvc.Contracts\Volo.Abp.AspNetCore.Mvc.Contracts.csproj", "{88F6D091-CA16-4B71-9499-8D5B8FA2E712}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.Contracts", "src\Volo.Abp.AspNetCore.Mvc.Contracts\Volo.Abp.AspNetCore.Mvc.Contracts.csproj", "{88F6D091-CA16-4B71-9499-8D5B8FA2E712}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Features", "src\Volo.Abp.Features\Volo.Abp.Features.csproj", "{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -640,6 +642,10 @@ Global
{88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Debug|Any CPU.Build.0 = Debug|Any CPU {88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Release|Any CPU.ActiveCfg = Release|Any CPU {88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Release|Any CPU.Build.0 = Release|Any CPU {88F6D091-CA16-4B71-9499-8D5B8FA2E712}.Release|Any CPU.Build.0 = Release|Any CPU
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -749,6 +755,7 @@ Global
{64D99E19-EE25-465A-82E5-17B25F4C4E18} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {64D99E19-EE25-465A-82E5-17B25F4C4E18} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{E803DDB8-81EA-454B-9A66-9C2941100B67} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {E803DDB8-81EA-454B-9A66-9C2941100B67} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{88F6D091-CA16-4B71-9499-8D5B8FA2E712} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {88F6D091-CA16-4B71-9499-8D5B8FA2E712} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}

12
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemotePermissionChecker.cs

@ -14,19 +14,17 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
ConfigurationClient = configurationClient; ConfigurationClient = configurationClient;
} }
public async Task<PermissionGrantInfo> CheckAsync(string name) public async Task<bool> IsGrantedAsync(string name)
{ {
var configuration = await ConfigurationClient.GetAsync(); var configuration = await ConfigurationClient.GetAsync();
return new PermissionGrantInfo( return configuration.Auth.GrantedPolicies.ContainsKey(name);
name,
configuration.Auth.GrantedPolicies.ContainsKey(name)
);
} }
public Task<PermissionGrantInfo> CheckAsync(ClaimsPrincipal claimsPrincipal, string name) public Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
{ {
return CheckAsync(name); /* This provider always works for the current principal. */
return IsGrantedAsync(name);
} }
} }
} }

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs

@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
public AbpFormControlSize Size { get; set; } = AbpFormControlSize.Default; public AbpFormControlSize Size { get; set; } = AbpFormControlSize.Default;
[HtmlAttributeNotBound] [HtmlAttributeName("required-symbol")]
public bool DisplayRequiredSymbol { get; set; } = true; public bool DisplayRequiredSymbol { get; set; } = true;
[HtmlAttributeNotBound] [HtmlAttributeNotBound]

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs

@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
[HtmlAttributeName("info")] [HtmlAttributeName("info")]
public string InfoText { get; set; } public string InfoText { get; set; }
[HtmlAttributeNotBound] [HtmlAttributeName("required-symbol")]
public bool DisplayRequiredSymbol { get; set; } = true; public bool DisplayRequiredSymbol { get; set; } = true;
[HtmlAttributeNotBound] [HtmlAttributeNotBound]

13
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/FlagIconCss/FlagIconCssStyleContributor.cs

@ -0,0 +1,13 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.FlagIconCss
{
public class FlagIconCssStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/flag-icon-css/css/flag-icon.min.css");
}
}
}

9
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/AlwaysAllowPermissionChecker.cs

@ -1,5 +1,6 @@
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Threading;
namespace Volo.Abp.Authorization.Permissions namespace Volo.Abp.Authorization.Permissions
{ {
@ -11,14 +12,14 @@ namespace Volo.Abp.Authorization.Permissions
/// </summary> /// </summary>
public class AlwaysAllowPermissionChecker : IPermissionChecker public class AlwaysAllowPermissionChecker : IPermissionChecker
{ {
public Task<PermissionGrantInfo> CheckAsync(string name) public Task<bool> IsGrantedAsync(string name)
{ {
return Task.FromResult(new PermissionGrantInfo(name, true, "AlwaysAllow")); return TaskCache.TrueResult;
} }
public Task<PermissionGrantInfo> CheckAsync(ClaimsPrincipal claimsPrincipal, string name) public Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
{ {
return Task.FromResult(new PermissionGrantInfo(name, true, "AlwaysAllow")); return TaskCache.TrueResult;
} }
} }
} }

13
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/ClientPermissionValueProvider.cs

@ -15,21 +15,18 @@ namespace Volo.Abp.Authorization.Permissions
} }
public override async Task<PermissionValueProviderGrantInfo> CheckAsync(PermissionValueCheckContext context) public override async Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context)
{ {
var clientId = context.Principal?.FindFirst(AbpClaimTypes.ClientId)?.Value; var clientId = context.Principal?.FindFirst(AbpClaimTypes.ClientId)?.Value;
if (clientId == null) if (clientId == null)
{ {
return PermissionValueProviderGrantInfo.NonGranted; return PermissionGrantResult.Undefined;
} }
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)) return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)
{ ? PermissionGrantResult.Granted
return new PermissionValueProviderGrantInfo(true, clientId); : PermissionGrantResult.Undefined;
}
return PermissionValueProviderGrantInfo.NonGranted;
} }
} }
} }

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/IPermissionChecker.cs

@ -6,8 +6,8 @@ namespace Volo.Abp.Authorization.Permissions
{ {
public interface IPermissionChecker public interface IPermissionChecker
{ {
Task<PermissionGrantInfo> CheckAsync([NotNull]string name); Task<bool> IsGrantedAsync([NotNull]string name);
Task<PermissionGrantInfo> CheckAsync([CanBeNull] ClaimsPrincipal claimsPrincipal, [NotNull]string name); Task<bool> IsGrantedAsync([CanBeNull] ClaimsPrincipal claimsPrincipal, [NotNull]string name);
} }
} }

3
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/IPermissionValueProvider.cs

@ -7,6 +7,7 @@ namespace Volo.Abp.Authorization.Permissions
{ {
string Name { get; } string Name { get; }
Task<PermissionValueProviderGrantInfo> CheckAsync(PermissionValueCheckContext context); //TODO: Rename to GetResult? (CheckAsync throws exception by naming convention)
Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context);
} }
} }

3
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/NullPermissionStore.cs

@ -2,6 +2,7 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Threading;
namespace Volo.Abp.Authorization.Permissions namespace Volo.Abp.Authorization.Permissions
{ {
@ -16,7 +17,7 @@ namespace Volo.Abp.Authorization.Permissions
public Task<bool> IsGrantedAsync(string name, string providerName, string providerKey) public Task<bool> IsGrantedAsync(string name, string providerName, string providerKey)
{ {
return Task.FromResult(false); return TaskCache.FalseResult;
} }
} }
} }

19
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionChecker.cs

@ -41,12 +41,12 @@ namespace Volo.Abp.Authorization.Permissions
); );
} }
public virtual Task<PermissionGrantInfo> CheckAsync(string name) public virtual Task<bool> IsGrantedAsync(string name)
{ {
return CheckAsync(PrincipalAccessor.Principal, name); return IsGrantedAsync(PrincipalAccessor.Principal, name);
} }
public virtual async Task<PermissionGrantInfo> CheckAsync(ClaimsPrincipal claimsPrincipal, string name) public virtual async Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
{ {
Check.NotNull(name, nameof(name)); Check.NotNull(name, nameof(name));
@ -55,6 +55,8 @@ namespace Volo.Abp.Authorization.Permissions
claimsPrincipal claimsPrincipal
); );
var isGranted = false;
foreach (var provider in ValueProviders) foreach (var provider in ValueProviders)
{ {
if (context.Permission.Providers.Any() && if (context.Permission.Providers.Any() &&
@ -64,13 +66,18 @@ namespace Volo.Abp.Authorization.Permissions
} }
var result = await provider.CheckAsync(context); var result = await provider.CheckAsync(context);
if (result.IsGranted)
if (result == PermissionGrantResult.Granted)
{
isGranted = true;
}
else if (result == PermissionGrantResult.Prohibited)
{ {
return new PermissionGrantInfo(context.Permission.Name, true, provider.Name, result.ProviderKey); return false;
} }
} }
return new PermissionGrantInfo(context.Permission.Name, false); return isGranted;
} }
} }
} }

20
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionCheckerExtensions.cs

@ -1,20 +0,0 @@
using System.Security.Claims;
using System.Threading.Tasks;
namespace Volo.Abp.Authorization.Permissions
{
public static class PermissionCheckerExtensions
{
public static async Task<bool> IsGrantedAsync(this IPermissionChecker permissionChecker, string name)
{
return (await permissionChecker.CheckAsync(name)).IsGranted;
}
public static async Task<bool> IsGrantedAsync(this IPermissionChecker permissionChecker, ClaimsPrincipal principal, string name)
{
return (await permissionChecker.CheckAsync(principal, name)).IsGranted;
}
//TODO: Add sync extensions
}
}

10
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs

@ -22,7 +22,7 @@ namespace Volo.Abp.Authorization.Permissions
/// A list of allowed providers to get/set value of this permission. /// A list of allowed providers to get/set value of this permission.
/// An empty list indicates that all providers are allowed. /// An empty list indicates that all providers are allowed.
/// </summary> /// </summary>
public List<string> Providers { get; } public List<string> Providers { get; } //TODO: Rename to AllowedProviders?
public ILocalizableString DisplayName public ILocalizableString DisplayName
{ {
@ -53,7 +53,9 @@ namespace Volo.Abp.Authorization.Permissions
set => Properties[name] = value; set => Properties[name] = value;
} }
protected internal PermissionDefinition([NotNull] string name, ILocalizableString displayName = null) protected internal PermissionDefinition(
[NotNull] string name,
ILocalizableString displayName = null)
{ {
Name = Check.NotNull(name, nameof(name)); Name = Check.NotNull(name, nameof(name));
DisplayName = displayName ?? new FixedLocalizableString(name); DisplayName = displayName ?? new FixedLocalizableString(name);
@ -63,7 +65,9 @@ namespace Volo.Abp.Authorization.Permissions
_children = new List<PermissionDefinition>(); _children = new List<PermissionDefinition>();
} }
public virtual PermissionDefinition AddChild([NotNull] string name, ILocalizableString displayName = null) public virtual PermissionDefinition AddChild(
[NotNull] string name,
ILocalizableString displayName = null)
{ {
var child = new PermissionDefinition(name, displayName) var child = new PermissionDefinition(name, displayName)
{ {

9
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGrantResult.cs

@ -0,0 +1,9 @@
namespace Volo.Abp.Authorization.Permissions
{
public enum PermissionGrantResult
{
Undefined,
Granted,
Prohibited
}
}

8
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs

@ -37,7 +37,9 @@ namespace Volo.Abp.Authorization.Permissions
set => Properties[name] = value; set => Properties[name] = value;
} }
protected internal PermissionGroupDefinition(string name, ILocalizableString displayName = null) protected internal PermissionGroupDefinition(
string name,
ILocalizableString displayName = null)
{ {
Name = name; Name = name;
DisplayName = displayName ?? new FixedLocalizableString(Name); DisplayName = displayName ?? new FixedLocalizableString(Name);
@ -46,7 +48,9 @@ namespace Volo.Abp.Authorization.Permissions
_permissions = new List<PermissionDefinition>(); _permissions = new List<PermissionDefinition>();
} }
public virtual PermissionDefinition AddPermission(string name, ILocalizableString displayName = null) public virtual PermissionDefinition AddPermission(
string name,
ILocalizableString displayName = null)
{ {
var permission = new PermissionDefinition(name, displayName); var permission = new PermissionDefinition(name, displayName);

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueCheckContext.cs

@ -11,7 +11,9 @@ namespace Volo.Abp.Authorization.Permissions
[CanBeNull] [CanBeNull]
public ClaimsPrincipal Principal { get; } public ClaimsPrincipal Principal { get; }
public PermissionValueCheckContext([NotNull] PermissionDefinition permission, [CanBeNull] ClaimsPrincipal principal) public PermissionValueCheckContext(
[NotNull] PermissionDefinition permission,
[CanBeNull] ClaimsPrincipal principal)
{ {
Check.NotNull(permission, nameof(permission)); Check.NotNull(permission, nameof(permission));

2
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProvider.cs

@ -13,6 +13,6 @@ namespace Volo.Abp.Authorization.Permissions
PermissionStore = permissionStore; PermissionStore = permissionStore;
} }
public abstract Task<PermissionValueProviderGrantInfo> CheckAsync(PermissionValueCheckContext context); public abstract Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context);
} }
} }

8
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs

@ -16,23 +16,23 @@ namespace Volo.Abp.Authorization.Permissions
} }
public override async Task<PermissionValueProviderGrantInfo> CheckAsync(PermissionValueCheckContext context) public override async Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context)
{ {
var roles = context.Principal?.FindAll(AbpClaimTypes.Role).Select(c => c.Value).ToArray(); var roles = context.Principal?.FindAll(AbpClaimTypes.Role).Select(c => c.Value).ToArray();
if (roles == null || !roles.Any()) if (roles == null || !roles.Any())
{ {
return PermissionValueProviderGrantInfo.NonGranted; return PermissionGrantResult.Undefined;
} }
foreach (var role in roles) foreach (var role in roles)
{ {
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role)) if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role))
{ {
return new PermissionValueProviderGrantInfo(true, role); return PermissionGrantResult.Granted;
} }
} }
return PermissionValueProviderGrantInfo.NonGranted; return PermissionGrantResult.Undefined;
} }
} }
} }

13
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/UserPermissionValueProvider.cs

@ -15,21 +15,18 @@ namespace Volo.Abp.Authorization.Permissions
} }
public override async Task<PermissionValueProviderGrantInfo> CheckAsync(PermissionValueCheckContext context) public override async Task<PermissionGrantResult> CheckAsync(PermissionValueCheckContext context)
{ {
var userId = context.Principal?.FindFirst(AbpClaimTypes.UserId)?.Value; var userId = context.Principal?.FindFirst(AbpClaimTypes.UserId)?.Value;
if (userId == null) if (userId == null)
{ {
return PermissionValueProviderGrantInfo.NonGranted; return PermissionGrantResult.Undefined;
} }
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId)) return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId)
{ ? PermissionGrantResult.Granted
return new PermissionValueProviderGrantInfo(true, userId); : PermissionGrantResult.Undefined;
}
return PermissionValueProviderGrantInfo.NonGranted;
} }
} }
} }

16
framework/src/Volo.Abp.Core/Volo/Abp/Threading/TaskCache.cs

@ -0,0 +1,16 @@
using System.Threading.Tasks;
namespace Volo.Abp.Threading
{
public static class TaskCache
{
public static Task<bool> TrueResult { get; }
public static Task<bool> FalseResult { get; }
static TaskCache()
{
TrueResult = Task.FromResult(true);
FalseResult = Task.FromResult(false);
}
}
}

7
framework/src/Volo.Abp.Data/Volo/Abp/Data/HasExtraPropertiesExtensions.cs

@ -39,5 +39,12 @@ namespace Volo.Abp.Data
source.ExtraProperties[name] = value; source.ExtraProperties[name] = value;
return source; return source;
} }
public static TSource RemoveProperty<TSource>(this TSource source, string name)
where TSource : IHasExtraProperties
{
source.ExtraProperties.Remove(name);
return source;
}
} }
} }

21
framework/src/Volo.Abp.Features/Volo.Abp.Features.csproj

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.Features</AssemblyName>
<PackageId>Volo.Abp.Features</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.Localization.Abstractions\Volo.Abp.Localization.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Abstractions\Volo.Abp.MultiTenancy.Abstractions.csproj" />
</ItemGroup>
</Project>

18
framework/src/Volo.Abp.Features/Volo/Abp/Features/AbpFeaturesModule.cs

@ -0,0 +1,18 @@
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.Features
{
[DependsOn(
typeof(AbpLocalizationAbstractionsModule),
typeof(AbpMultiTenancyAbstractionsModule)
)]
public class AbpFeaturesModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
}
}
}

1
framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo.Abp.MultiTenancy.Abstractions.csproj

@ -14,7 +14,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Volo.Abp.Core\Volo.Abp.Core.csproj" />
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" /> <ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" />
<ProjectReference Include="..\Volo.Abp.Security\Volo.Abp.Security.csproj" /> <ProjectReference Include="..\Volo.Abp.Security\Volo.Abp.Security.csproj" />
</ItemGroup> </ItemGroup>

4
framework/src/Volo.Abp.MultiTenancy.Abstractions/Volo/Abp/MultiTenancy/AbpMultiTenancyAbstractionsModule.cs

@ -1,10 +1,12 @@
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Security;
namespace Volo.Abp.MultiTenancy namespace Volo.Abp.MultiTenancy
{ {
[DependsOn( [DependsOn(
typeof(AbpDataModule) typeof(AbpDataModule),
typeof(AbpSecurityModule)
)] )]
public class AbpMultiTenancyAbstractionsModule : AbpModule //TODO: Rename to AbpMultiTenancyModule? public class AbpMultiTenancyAbstractionsModule : AbpModule //TODO: Rename to AbpMultiTenancyModule?
{ {

1
framework/src/Volo.Abp.Settings/Volo/Abp/Settings/AbpSettingsModule.cs

@ -2,7 +2,6 @@
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.Security; using Volo.Abp.Security;
using Volo.Abp.Users;
namespace Volo.Abp.Settings namespace Volo.Abp.Settings
{ {

19
framework/src/Volo.Abp.Settings/Volo/Abp/Settings/NullSettingStore.cs

@ -1,5 +1,4 @@
using System.Collections.Generic; using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
@ -19,21 +18,5 @@ namespace Volo.Abp.Settings
{ {
return Task.FromResult((string) null); return Task.FromResult((string) null);
} }
public Task SetAsync(string name, string value, string providerName, string providerKey)
{
Logger.LogWarning($"Setting the value for {name} is not possible because current setting store is {nameof(NullSettingStore)}");
return Task.CompletedTask;
}
public Task<List<SettingValue>> GetListAsync(string providerName, string providerKey)
{
return Task.FromResult(new List<SettingValue>());
}
public Task DeleteAsync(string name, string providerName, string providerKey)
{
return Task.CompletedTask;
}
} }
} }

2
framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs

@ -40,7 +40,7 @@ namespace Volo.Abp.Settings
/// A list of allowed providers to get/set value of this setting. /// A list of allowed providers to get/set value of this setting.
/// An empty list indicates that all providers are allowed. /// An empty list indicates that all providers are allowed.
/// </summary> /// </summary>
public List<string> Providers { get; } public List<string> Providers { get; } //TODO: Rename to AllowedProviders
/// <summary> /// <summary>
/// Is this setting inherited from parent scopes. /// Is this setting inherited from parent scopes.

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj

@ -13,7 +13,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

33
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HasExtraPropertiesExtensions_Tests.cs

@ -0,0 +1,33 @@
using System;
using Shouldly;
using Volo.Abp.Data;
using Volo.Abp.TestApp.Domain;
using Xunit;
namespace Volo.Abp.TestApp.Testing
{
public class HasExtraPropertiesExtensions_Tests
{
[Fact]
public void Basic_Tests()
{
var city = new City(Guid.NewGuid(), "Adana");
city.HasProperty("UnknownProperty").ShouldBeFalse();
city.GetProperty("UnknownProperty").ShouldBeNull();
city.GetProperty<int>("UnknownProperty").ShouldBe(0);
city.SetProperty("IsHot", true);
city.HasProperty("IsHot").ShouldBeTrue();
city.GetProperty<bool>("IsHot").ShouldBeTrue();
city.SetProperty("IsHot", false);
city.HasProperty("IsHot").ShouldBeTrue();
city.GetProperty<bool>("IsHot").ShouldBeFalse();
city.RemoveProperty("IsHot");
city.HasProperty("IsHot").ShouldBeFalse();
city.GetProperty<bool>("IsHot").ShouldBeFalse();
}
}
}

6
modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Users/BlogUserSynchronizer.cs

@ -32,8 +32,10 @@ namespace Volo.Blogging.Users
} }
} }
user.Update(eventData.Entity); if (user.Update(eventData.Entity))
await UserRepository.UpdateAsync(user); {
await UserRepository.UpdateAsync(user);
}
} }
} }
} }

4
framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionValueProviderGrantInfo.cs → modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionValueProviderGrantInfo.cs

@ -1,8 +1,8 @@
using JetBrains.Annotations; using JetBrains.Annotations;
namespace Volo.Abp.Authorization.Permissions namespace Volo.Abp.PermissionManagement
{ {
public class PermissionValueProviderGrantInfo public class PermissionValueProviderGrantInfo //TODO: Rename to PermissionGrantInfo
{ {
public static PermissionValueProviderGrantInfo NonGranted { get; } = new PermissionValueProviderGrantInfo(false); public static PermissionValueProviderGrantInfo NonGranted { get; } = new PermissionValueProviderGrantInfo(false);

17
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml

@ -9,15 +9,9 @@
Layout = null; Layout = null;
} }
<form method="post" asp-page="/AbpPermissionManagement/PermissionManagementModal" data-script-class="abp.modals.PermissionManagement"> <form method="post" asp-page="/AbpPermissionManagement/PermissionManagementModal" data-script-class="abp.modals.PermissionManagement">
<abp-modal size="Large"> <abp-modal size="Large">
<abp-modal-header title="@(L["Permissions"].Value) - @Model.EntityDisplayName"></abp-modal-header>
<abp-modal-header title="@(L["Permissions"].Value)">
</abp-modal-header>
<abp-modal-body> <abp-modal-body>
<input asp-for="@Model.ProviderKey" /> <input asp-for="@Model.ProviderKey" />
<input asp-for="@Model.ProviderName" /> <input asp-for="@Model.ProviderName" />
<abp-tabs tab-style="PillVertical" vertical-header-size="_4"> <abp-tabs tab-style="PillVertical" vertical-header-size="_4">
@ -25,8 +19,7 @@
{ {
<abp-tab title="@Model.Groups[i].DisplayName" name="v-pills-tab-@Model.Groups[i].GetNormalizedGroupName()"> <abp-tab title="@Model.Groups[i].DisplayName" name="v-pills-tab-@Model.Groups[i].GetNormalizedGroupName()">
<h4>@Model.Groups[i].DisplayName</h4> <h4>@Model.Groups[i].DisplayName</h4>
<p> Permissions for "<strong>@Model.EntityDisplayName</strong>".</p> <hr class="mt-3 mb-4" />
<hr class="mb-4" />
@for (var j = 0; j < Model.Groups[i].Permissions.Count; j++) @for (var j = 0; j < Model.Groups[i].Permissions.Count; j++)
{ {
@ -41,11 +34,7 @@
</abp-tab> </abp-tab>
} }
</abp-tabs> </abp-tabs>
</abp-modal-body> </abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> <abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal> </abp-modal>
</form>
</form>

37
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml

@ -14,24 +14,21 @@
</abp-script-bundle> </abp-script-bundle>
} }
<abp-card id="SettingManagementWrapper"> <div id="SettingManagementWrapper">
<abp-card-header> <abp-card>
<abp-row> <abp-card-body>
<abp-column size-md="_6">
<abp-card-title>@*@L["Settings"]*@Settings</abp-card-title>
</abp-column>
</abp-row>
</abp-card-header>
<abp-card-body>
<abp-tabs tab-style="PillVertical" vertical-header-size="_2">
@foreach (var group in Model.SettingPageCreationContext.Groups)
{
<abp-tab title="@group.DisplayName">
<h2>@group.DisplayName</h2> <abp-tabs tab-style="PillVertical" vertical-header-size="_3">
@await Component.InvokeAsync(group.ComponentType) @foreach (var group in Model.SettingPageCreationContext.Groups)
</abp-tab> {
} <abp-tab title="@group.DisplayName">
</abp-tabs>
</abp-card-body> <h2>@group.DisplayName</h2>
</abp-card> <hr class="my-4" />
@await Component.InvokeAsync(group.ComponentType)
</abp-tab>
}
</abp-tabs>
</abp-card-body>
</abp-card>
</div>

2
npm/lerna.json

@ -1,5 +1,5 @@
{ {
"version": "0.5.1", "version": "0.5.2",
"packages": [ "packages": [
"packs/*" "packs/*"
], ],

6
npm/packs/flag-icon-css/abp.resourcemapping.js

@ -0,0 +1,6 @@
module.exports = {
mappings: {
"@node_modules/flag-icon-css/css/*": "@libs/flag-icon-css/css",
"@node_modules/flag-icon-css/flags/1x1/*": "@libs/flag-icon-css/flags/1x1"
}
}

10
npm/packs/flag-icon-css/package.json

@ -0,0 +1,10 @@
{
"version": "0.5.2",
"name": "@abp/flag-icon-css",
"publishConfig": {
"access": "public"
},
"dependencies": {
"flag-icon-css": "^3.3.0"
}
}

1
nupkg/common.ps1

@ -60,6 +60,7 @@ $projects = (
"framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", "framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql",
"framework/src/Volo.Abp.EventBus", "framework/src/Volo.Abp.EventBus",
"framework/src/Volo.Abp.EventBus.RabbitMQ", "framework/src/Volo.Abp.EventBus.RabbitMQ",
"framework/src/Volo.Abp.Features",
"framework/src/Volo.Abp.Guids", "framework/src/Volo.Abp.Guids",
"framework/src/Volo.Abp.HangFire", "framework/src/Volo.Abp.HangFire",
"framework/src/Volo.Abp.Http", "framework/src/Volo.Abp.Http",

2
samples/MicroserviceDemo/applications/AuthServer.Host/AuthServer.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/applications/BackendAdminApp.Host/BackendAdminApp.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/applications/PublicWebSite.Host/PublicWebSite.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

16
samples/MicroserviceDemo/docker-compose.migrations.yml

@ -8,16 +8,16 @@ services:
ports: ports:
- "1433" - "1433"
migrations: # migrations:
image: 'microservice-demo/migrations:${TAG:-latest}' # image: 'volosoft/microservice-demo-migrations:${TAG:-latest}'
build: # build:
context: ../.. # context: ../..
dockerfile: samples/MicroserviceDemo/databases/Dockerfile # dockerfile: samples/MicroserviceDemo/databases/Dockerfile
depends_on: # depends_on:
- sqlserver # - sqlserver
restore-database: restore-database:
image: 'microservice-demo/restore-database:${TAG:-latest}' image: 'volosoft/microservice-demo-restore-database:${TAG:-latest}'
build: build:
context: ../.. context: ../..
dockerfile: samples/MicroserviceDemo/databases/restore/Dockerfile dockerfile: samples/MicroserviceDemo/databases/restore/Dockerfile

18
samples/MicroserviceDemo/docker-compose.yml

@ -31,7 +31,7 @@ services:
- elasticsearch - elasticsearch
internal-gateway: internal-gateway:
image: 'microservice-demo/internal-gateway:${TAG:-latest}' image: 'volosoft/microservice-demo-internal-gateway:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/gateways/InternalGateway.Host/Dockerfile dockerfile: samples/MicroserviceDemo/gateways/InternalGateway.Host/Dockerfile
@ -44,7 +44,7 @@ services:
- blogging-service - blogging-service
backend-admin-app-gateway: backend-admin-app-gateway:
image: 'microservice-demo/backend-admin-app-gateway:${TAG:-latest}' image: 'volosoft/microservice-demo-backend-admin-app-gateway:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/Dockerfile dockerfile: samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/Dockerfile
@ -56,7 +56,7 @@ services:
- product-service - product-service
public-website-gateway: public-website-gateway:
image: 'microservice-demo/public-website-gateway:${TAG:-latest}' image: 'volosoft/microservice-demo-public-website-gateway:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/Dockerfile dockerfile: samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/Dockerfile
@ -67,7 +67,7 @@ services:
- product-service - product-service
blogging-service: blogging-service:
image: 'microservice-demo/blogging-service:${TAG:-latest}' image: 'volosoft/microservice-demo-blogging-service:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/microservices/BloggingService.Host/Dockerfile dockerfile: samples/MicroserviceDemo/microservices/BloggingService.Host/Dockerfile
@ -77,7 +77,7 @@ services:
- redis - redis
identity-service: identity-service:
image: 'microservice-demo/identity-service:${TAG:-latest}' image: 'volosoft/microservice-demo-identity-service:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/microservices/IdentityService.Host/Dockerfile dockerfile: samples/MicroserviceDemo/microservices/IdentityService.Host/Dockerfile
@ -88,7 +88,7 @@ services:
- sqlserver - sqlserver
product-service: product-service:
image: 'microservice-demo/product-service:${TAG:-latest}' image: 'volosoft/microservice-demo-product-service:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/microservices/ProductService.Host/Dockerfile dockerfile: samples/MicroserviceDemo/microservices/ProductService.Host/Dockerfile
@ -98,7 +98,7 @@ services:
- redis - redis
auth-server: auth-server:
image: 'microservice-demo/auth-server:${TAG:-latest}' image: 'volosoft/microservice-demo-auth-server:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/applications/AuthServer.Host/Dockerfile dockerfile: samples/MicroserviceDemo/applications/AuthServer.Host/Dockerfile
@ -109,7 +109,7 @@ services:
- identity-service - identity-service
backend-admin-app: backend-admin-app:
image: 'microservice-demo/backend-admin-app:${TAG:-latest}' image: 'volosoft/microservice-demo-backend-admin-app:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/applications/BackendAdminApp.Host/Dockerfile dockerfile: samples/MicroserviceDemo/applications/BackendAdminApp.Host/Dockerfile
@ -118,7 +118,7 @@ services:
- backend-admin-app-gateway - backend-admin-app-gateway
public-website: public-website:
image: 'microservice-demo/public-website:${TAG:-latest}' image: 'volosoft/microservice-demo-public-website:${TAG:-latest}'
build: build:
context: ../../ context: ../../
dockerfile: samples/MicroserviceDemo/applications/PublicWebSite.Host/Dockerfile dockerfile: samples/MicroserviceDemo/applications/PublicWebSite.Host/Dockerfile

2
samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/BackendAdminAppGateway.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/gateways/InternalGateway.Host/InternalGateway.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/PublicWebSiteGateway.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/microservices/BloggingService.Host/BloggingService.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/microservices/IdentityService.Host/IdentityService.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
samples/MicroserviceDemo/microservices/ProductService.Host/ProductService.Host.csproj

@ -8,7 +8,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

2
templates/mvc/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj

@ -9,7 +9,7 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save