PermissionOptions to AbpPermissionOptions

pull/1919/head
Yunus Emre Kalkan 5 years ago
parent df7144498c
commit 689b54f914

@ -29,7 +29,7 @@ namespace Volo.Abp.Authorization
context.Services.AddSingleton<IAuthorizationHandler, PermissionRequirementHandler>();
Configure<PermissionOptions>(options =>
Configure<AbpPermissionOptions>(options =>
{
options.ValueProviders.Add<UserPermissionValueProvider>();
options.ValueProviders.Add<RolePermissionValueProvider>();
@ -49,7 +49,7 @@ namespace Volo.Abp.Authorization
}
});
services.Configure<PermissionOptions>(options =>
services.Configure<AbpPermissionOptions>(options =>
{
options.DefinitionProviders.AddIfNotContains(definitionProviders);
});

@ -2,13 +2,13 @@
namespace Volo.Abp.Authorization.Permissions
{
public class PermissionOptions
public class AbpPermissionOptions
{
public ITypeList<IPermissionDefinitionProvider> DefinitionProviders { get; }
public ITypeList<IPermissionValueProvider> ValueProviders { get; }
public PermissionOptions()
public AbpPermissionOptions()
{
DefinitionProviders = new TypeList<IPermissionDefinitionProvider>();
ValueProviders = new TypeList<IPermissionValueProvider>();

@ -16,12 +16,12 @@ namespace Volo.Abp.Authorization.Permissions
protected IDictionary<string, PermissionDefinition> PermissionDefinitions => _lazyPermissionDefinitions.Value;
private readonly Lazy<Dictionary<string, PermissionDefinition>> _lazyPermissionDefinitions;
protected PermissionOptions Options { get; }
protected AbpPermissionOptions Options { get; }
private readonly IServiceProvider _serviceProvider;
public PermissionDefinitionManager(
IOptions<PermissionOptions> options,
IOptions<AbpPermissionOptions> options,
IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;

@ -12,11 +12,11 @@ namespace Volo.Abp.Authorization.Permissions
public IReadOnlyList<IPermissionValueProvider> ValueProviders => _lazyProviders.Value;
private readonly Lazy<List<IPermissionValueProvider>> _lazyProviders;
protected PermissionOptions Options { get; }
protected AbpPermissionOptions Options { get; }
public PermissionValueProviderManager(
IServiceProvider serviceProvider,
IOptions<PermissionOptions> options)
IOptions<AbpPermissionOptions> options)
{
Options = options.Value;

Loading…
Cancel
Save