Activities of "liangshiwei"

Hi,

Identityserver 4 is oauth 2.0 and openid connect framework. If Zapier support oauth2.0(sorry , I don't know zapier much). I think it can be integrated.

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.

Showing 5341 to 5350 of 5643 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30