Base solution for your next web application
Open Closed

User Editions #9829


User avatar
0
ibrsoft created
  • What is your product version? 3.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core
  • What is ABP Framework version? v8.0.0

Problem:

I would like to know if there is a possibility of relating Editions to Users instead of directly relating to the Tenant? If so, where to start? The idea is to make a Tenant have Users with different Plans. Thanks!


4 Answer(s)
  • User Avatar
    1
    ismcagdas created
    Support Team

    Hi @ibrsoft

    This is not supported by default. We have an active issue about this, see https://github.com/aspnetzero/aspnet-zero-core/issues/731. There are more than one place to change for implementing something like this. You can start by creating a relationship between edition and user and then you need to create methods similar to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/MultiTenancy/AbpTenantManager.cs#L164 in the TenantManager for getting feature values for currently logged in user using AbpSession.

  • User Avatar
    0
    ibrsoft created

    Thanks for the quick response. I'm going to start making changes today. Sincerely, Jonathan Amaral

  • User Avatar
    0
    ibrsoft created

    "for getting feature values for currently logged in user using AbpSession" Could you give me a code example on this?

  • User Avatar
    0
    musa.demir created

    Hi @ibrsoft

    You can use that to get value of feature: https://github.com/aspnetboilerplate/aspnetboilerplate/blob/b10830181f93a5c085ee433c955a1f3ca0d8e22f/src/Abp/Application/Features/FeatureChecker.cs#L42

    To get list of features, you can check that: https://github.com/aspnetzero/aspnet-zero-core/blob/ed904cfe5dc3219e9a36c0b74fac6b1bd581fc45/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/MultiTenancy/TenantAppService.cs#L114-L125