Merge pull request #12 from abpframework/master

merge
pull/985/head
Marcelo Mohr Maciel 6 years ago committed by GitHub
commit 2cddd64be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -24,7 +24,7 @@ This sample aims to demonstrate a simple yet complete microservice solution;
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
@ -32,7 +32,7 @@ You can get the source code from [the GitHub repository](https://github.com/abpf
### 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
@ -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.
- 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:
```
@ -62,8 +76,6 @@ Running as docker containers is easier since all dependencies are pre-configured
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:
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

@ -222,9 +222,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.Identi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.IdentityModel", "src\Volo.Abp.IdentityModel\Volo.Abp.IdentityModel.csproj", "{64D99E19-EE25-465A-82E5-17B25F4C4E18}"
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
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
Global
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}.Release|Any CPU.ActiveCfg = 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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -749,6 +755,7 @@ Global
{64D99E19-EE25-465A-82E5-17B25F4C4E18} = {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}
{01E3D389-8872-4EB1-9D3D-13B6ED54DE0E} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}

@ -14,19 +14,17 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
ConfigurationClient = configurationClient;
}
public async Task<PermissionGrantInfo> CheckAsync(string name)
public async Task<bool> IsGrantedAsync(string name)
{
var configuration = await ConfigurationClient.GetAsync();
return new PermissionGrantInfo(
name,
configuration.Auth.GrantedPolicies.ContainsKey(name)
);
return 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);
}
}
}

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

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

@ -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");
}
}
}

@ -1,5 +1,6 @@
using System.Security.Claims;
using System.Threading.Tasks;
using Volo.Abp.Threading;
namespace Volo.Abp.Authorization.Permissions
{
@ -11,14 +12,14 @@ namespace Volo.Abp.Authorization.Permissions
/// </summary>
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;
}
}
}

@ -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;
if (clientId == null)
{
return PermissionValueProviderGrantInfo.NonGranted;
return PermissionGrantResult.Undefined;
}
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId))
{
return new PermissionValueProviderGrantInfo(true, clientId);
}
return PermissionValueProviderGrantInfo.NonGranted;
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, clientId)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined;
}
}
}

@ -6,8 +6,8 @@ namespace Volo.Abp.Authorization.Permissions
{
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);
}
}

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

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

@ -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));
@ -55,6 +55,8 @@ namespace Volo.Abp.Authorization.Permissions
claimsPrincipal
);
var isGranted = false;
foreach (var provider in ValueProviders)
{
if (context.Permission.Providers.Any() &&
@ -64,13 +66,18 @@ namespace Volo.Abp.Authorization.Permissions
}
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;
}
}
}

@ -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
}
}

@ -22,7 +22,7 @@ namespace Volo.Abp.Authorization.Permissions
/// A list of allowed providers to get/set value of this permission.
/// An empty list indicates that all providers are allowed.
/// </summary>
public List<string> Providers { get; }
public List<string> Providers { get; } //TODO: Rename to AllowedProviders?
public ILocalizableString DisplayName
{
@ -53,7 +53,9 @@ namespace Volo.Abp.Authorization.Permissions
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));
DisplayName = displayName ?? new FixedLocalizableString(name);
@ -63,7 +65,9 @@ namespace Volo.Abp.Authorization.Permissions
_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)
{

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

@ -37,7 +37,9 @@ namespace Volo.Abp.Authorization.Permissions
set => Properties[name] = value;
}
protected internal PermissionGroupDefinition(string name, ILocalizableString displayName = null)
protected internal PermissionGroupDefinition(
string name,
ILocalizableString displayName = null)
{
Name = name;
DisplayName = displayName ?? new FixedLocalizableString(Name);
@ -46,7 +48,9 @@ namespace Volo.Abp.Authorization.Permissions
_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);

@ -11,7 +11,9 @@ namespace Volo.Abp.Authorization.Permissions
[CanBeNull]
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));

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

@ -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();
if (roles == null || !roles.Any())
{
return PermissionValueProviderGrantInfo.NonGranted;
return PermissionGrantResult.Undefined;
}
foreach (var role in roles)
{
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, role))
{
return new PermissionValueProviderGrantInfo(true, role);
return PermissionGrantResult.Granted;
}
}
return PermissionValueProviderGrantInfo.NonGranted;
return PermissionGrantResult.Undefined;
}
}
}

@ -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;
if (userId == null)
{
return PermissionValueProviderGrantInfo.NonGranted;
return PermissionGrantResult.Undefined;
}
if (await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId))
{
return new PermissionValueProviderGrantInfo(true, userId);
}
return PermissionValueProviderGrantInfo.NonGranted;
return await PermissionStore.IsGrantedAsync(context.Permission.Name, Name, userId)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined;
}
}
}

@ -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);
}
}
}

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

@ -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>

@ -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)
{
}
}
}

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

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

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

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.DependencyInjection;
@ -19,21 +18,5 @@ namespace Volo.Abp.Settings
{
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;
}
}
}

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

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

@ -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();
}
}
}

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

@ -1,8 +1,8 @@
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);

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

@ -14,24 +14,21 @@
</abp-script-bundle>
}
<abp-card id="SettingManagementWrapper">
<abp-card-header>
<abp-row>
<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">
<div id="SettingManagementWrapper">
<abp-card>
<abp-card-body>
<h2>@group.DisplayName</h2>
@await Component.InvokeAsync(group.ComponentType)
</abp-tab>
}
</abp-tabs>
</abp-card-body>
</abp-card>
<abp-tabs tab-style="PillVertical" vertical-header-size="_3">
@foreach (var group in Model.SettingPageCreationContext.Groups)
{
<abp-tab title="@group.DisplayName">
<h2>@group.DisplayName</h2>
<hr class="my-4" />
@await Component.InvokeAsync(group.ComponentType)
</abp-tab>
}
</abp-tabs>
</abp-card-body>
</abp-card>
</div>

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

@ -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"
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save