17 changed files with 67 additions and 26 deletions
@ -0,0 +1,3 @@ |
|||
// Global using directives
|
|||
|
|||
global using Volo.Abp.Authorization.Permissions; |
|||
@ -1,6 +0,0 @@ |
|||
namespace Lion.AbpPro.CAP; |
|||
|
|||
[DependsOn(typeof(AbpEventBusModule))] |
|||
public class AbpProAbpCapModule : AbpModule |
|||
{ |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
namespace Lion.AbpPro.CAP; |
|||
|
|||
[DependsOn( |
|||
typeof(AbpEventBusModule), |
|||
typeof(LionAbpProLocalizationModule))] |
|||
public class LionAbpProCapModule : AbpModule |
|||
{ |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
using Lion.AbpPro.Localization; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace Lion.AbpPro.CAP; |
|||
|
|||
public class LionAbpProCapPermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var abpIdentityGroup = context.GetGroup(LionAbpProCapPermissions.CapManagement.Default); |
|||
|
|||
abpIdentityGroup.AddPermission(LionAbpProCapPermissions.CapManagement.Cap, L("Permission:Cap")); |
|||
} |
|||
|
|||
private static LocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<LionAbpProLocalizationResource>(name); |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
namespace Lion.AbpPro.CAP; |
|||
|
|||
public static class LionAbpProCapPermissions |
|||
{ |
|||
|
|||
public static class CapManagement |
|||
{ |
|||
public const string Default = "AbpIdentity"; |
|||
public const string Cap = Default + ".Cap"; |
|||
|
|||
} |
|||
} |
|||
@ -1,14 +1,14 @@ |
|||
namespace Lion.AbpPro.CAP; |
|||
|
|||
public static class AbpProAbpCapServiceCollectionExtensions |
|||
public static class LionAbpProCapServiceCollectionExtensions |
|||
{ |
|||
public static ServiceConfigurationContext AddAbpCap( |
|||
this ServiceConfigurationContext context, |
|||
Action<CapOptions> capAction) |
|||
{ |
|||
context.Services.AddCap(capAction); |
|||
context.Services.AddSingleton<IConsumerServiceSelector, AbpProAbpCapConsumerServiceSelector>(); |
|||
context.Services.AddSingleton<IDistributedEventBus, AbpProAbpCapDistributedEventBus>(); |
|||
context.Services.AddSingleton<IConsumerServiceSelector, LionAbpProCapConsumerServiceSelector>(); |
|||
context.Services.AddSingleton<IDistributedEventBus, LionAbpProCapDistributedEventBus>(); |
|||
return context; |
|||
} |
|||
} |
|||
@ -1,6 +1,7 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"Welcome": "Welcome" |
|||
"Welcome": "Welcome", |
|||
"Permission:Cap": "CAP Dashboard" |
|||
} |
|||
} |
|||
|
|||
@ -1,6 +1,7 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Welcome": "欢迎" |
|||
"Welcome": "欢迎", |
|||
"Permission:Cap": "CAP面板" |
|||
} |
|||
} |
|||
Loading…
Reference in new issue