mirror of https://github.com/abpframework/abp.git
4 changed files with 43 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
using Volo.Abp.Authorization.Permissions; |
|||
|
|||
namespace Volo.Abp.MultiTenancy |
|||
{ |
|||
public class AbpTenantManagementPermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var identityGroup = context.AddGroup(TenantManagementPermissions.GroupName); |
|||
|
|||
var rolesPermission = identityGroup.AddPermission(TenantManagementPermissions.Tenants.Default); |
|||
rolesPermission.AddChild(TenantManagementPermissions.Tenants.Create); |
|||
rolesPermission.AddChild(TenantManagementPermissions.Tenants.Update); |
|||
rolesPermission.AddChild(TenantManagementPermissions.Tenants.Delete); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
namespace Volo.Abp.MultiTenancy |
|||
{ |
|||
public static class TenantManagementPermissions |
|||
{ |
|||
public const string GroupName = "AbpTenantManagement"; |
|||
|
|||
public static class Tenants |
|||
{ |
|||
public const string Default = GroupName + ".Tenants"; |
|||
public const string Create = Default + ".Create"; |
|||
public const string Update = Default + ".Update"; |
|||
public const string Delete = Default + ".Delete"; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue