Hi all,
I tried to use AbpPermissions with attribute for controller:
[AbpAuthorize(Permissions= new String[]{"CanSetting"})]
But it throw an Abp.AbpException: There is no user with id.
Please review my database in attachment image.
Please give me some advice to configuration permision.
Thanks,
4 Answer(s)
-
0
I'm getting the same error. Can't seem to figure this one out.
-
0
I figured out the issue -- we need to have at least 1 tenant.
When I had the issue, I was getting No Results even on a simple _userRepository.GetAllList() which made no sense since I had multiple users in that table.
I went ahead and created a single Tenant in the tenant table with Id = 1 and now I'm setting all my Users to have TenantId = 1.
Worked after that.
-
0
Hi,
Sorry for that since it's not documented yet. But you found the case. There should be a default tenant with Id = 1.
If the application is not multi-tenant, it's assumed as single-tenant. So, there should be a single tenant. -
0
@apexdodge and @hikalkan
Thanks for your help. I will set default tenant to 1 for all role and user.