【发布时间】:2018-02-05 02:23:34
【问题描述】:
更新到 Abp 2.3 后,我的租户创建不再起作用。
创建角色时抛出异常:
//TenantAppService.cs
//We are working entities of new tenant, so changing tenant filter
using (CurrentUnitOfWork.SetTenantId(tenant.Id))
{
//Create static roles for new tenant
CheckErrors(await _roleManager.CreateStaticRoles(tenant.Id)); <-- Here
例外:
Exception thrown: 'Abp.Authorization.AbpAuthorizationException' in
mscorlib.dll
Additional information: [At least one of these permissions must be granted]
我没有更改来自模块 0 的 TenantAppService,但如果我从类中删除 AbpAuthorize,它就可以工作。
[AbpAuthorize(PermissionNames.Pages_Tenants)] //If removed works
public class TenantAppService : SeducaAppServiceBase, ITenantAppService
{
...
谢谢。
【问题讨论】:
标签: c# asp.net-mvc aspnetboilerplate