Activities of "liangshiwei"

Hi,

Please see the docuemnt :https://docs.abp.io/en/abp/latest/Entity-Framework-Core-PostgreSQL

Hi

Permission management module is open source, your can see https://github.com/abpframework/abp/blob/dev/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs

  1. Add to PermissionDefinitionProvider derived class, Usually under the Permissions folder of the .Application.Contracts project.
  2. No problem, you can use the int type as the primary key And you don’t need to implement IMultiTenant. You should always switch to the host when operating your own tenant entity.
[Authorize(SaasHostPermissions.Tenants.Create)]
public override async Task<SaasTenantDto> CreateAsync(SaasTenantCreateDto input)
{
    var currentMyTenant = await _myTenantRepository.FindAsync(x => x.AbpTenantId == CurrentTenant.Id);

    using (CurrentTenant.Change(null))
    {
        var result = await base.CreateAsync(input);

        await _myTenantRepository.InsertAsync(new MyTenant()
        {
            AbpTenantId = result.Id,
            MasterTenant = currentMyTenant,
            MasterId = currentMyTenant.Id
        });

        return result;
    }
}

Please add js to @section scripts

If you are using tiered template, Usually caused by not installing redis.

Hi,

This is by design. A tenant must be under the host. But you can do this in the following ways:

  1. Change permissions about tenants scope:

var tenantPermission = context.GetPermissionOrNull(SaasHostPermissions.Tenants.Default);

tenantPermission.MultiTenancySide = MultiTenancySides.Both;

foreach (var tenantPermissionChild in tenantPermission.Children)
{
    tenantPermissionChild.MultiTenancySide = MultiTenancySides.Both;
}

var editionPermission = context.GetPermissionOrNull(SaasHostPermissions.Editions.Default);

editionPermission.MultiTenancySide = MultiTenancySides.Both;

foreach (var editionPermissionChild in editionPermission.Children)
{
    editionPermissionChild.MultiTenancySide = MultiTenancySides.Both;
}
  1. Create a table to store information about tenants under the tenant. Example:
public class TenantInfo : AggregateRoot<Guid>, IMultiTenant
{
    public Guid? TenantId { get; }

    public Guid RelatedTenantId { get; set; }

    public string Name { get; set; }

    ......
}
  1. Override the tenant creation method:
[Dependency(ReplaceServices = true)]
[Authorize(SaasHostPermissions.Tenants.Default)]
public class MyTenantService : TenantAppService
{
    private readonly IRepository<TenantInfo, Guid> _tenantInfoRepository;

    public MyTenantService(
        ITenantRepository tenantRepository,
        IEditionRepository editionRepository,
        ITenantManager tenantManager,
        IDataSeeder dataSeeder,
        IRepository<TenantInfo, Guid> tenantInfoRepository) :
        base(tenantRepository,
            editionRepository,
            tenantManager,
            dataSeeder)
    {
        _tenantInfoRepository = tenantInfoRepository;
    }

    [Authorize(SaasHostPermissions.Tenants.Create)]
    public override async Task<SaasTenantDto> CreateAsync(SaasTenantCreateDto input)
    {
        SaasTenantDto result = null;

        using (CurrentTenant.Change(null))
        {
            result = await base.CreateAsync(input);
        }


        await _tenantInfoRepository.InsertAsync(new TenantInfo()
        {
            Name = result.Name,
            RelatedTenantId = result.Id
        });

        return result;
    }
}

Hi,

Export requires some js. Did you add it? See https://datatables.net/download/release

What version are you using?

Yes, it looks good.

Hi @leaf

you don't need do this, because I have fixed it. see https://github.com/abpframework/abp/pull/4234. You only need to pass parameters.

Showing 6391 to 6400 of 6692 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 04, 2025, 08:36