Activities of "liangshiwei"

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.

Hi,

See https://github.com/abpframework/abp/issues/386

EF Core team has completed this feature : https://docs.microsoft.com/en-us/ef/core/providers/cosmos/?tabs=dotnet-core-cli

You can use Microsoft.EntityFrameworkCore.Cosmos package.

Hi,

Do you mean you want to get data from database and bind to googlemap? You just create an application sevice and use repository to get data.

Hi,

In next version(3.1), we have added AbpAuditLogs to record user login infomation. See https://github.com/abpframework/abp/issues/4492. But it cannot manage user sessions, you can extend it and add the revocation token feature.

Could you give me a devart license? I tried use trial license but not work. thanks.

If you want to remove the quotes in sql, you can do it:

public class RemoveQuotesInterceptor : DbCommandInterceptor
{
    public override InterceptionResult<DbDataReader> ReaderExecuting(DbCommand command, CommandEventData eventData, InterceptionResult<DbDataReader> result)
    {
        return base.ReaderExecuting(RemoveQuotes(command), eventData, result);
    }

    public override Task<InterceptionResult<DbDataReader>> ReaderExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult<DbDataReader> result,
        CancellationToken cancellationToken = new CancellationToken())
    {
        return base.ReaderExecutingAsync(RemoveQuotes(command), eventData, result, cancellationToken);
    }

    public override InterceptionResult<object> ScalarExecuting(DbCommand command, CommandEventData eventData, InterceptionResult<object> result)
    {
        return base.ScalarExecuting(RemoveQuotes(command), eventData, result);
    }

    public override Task<InterceptionResult<object>> ScalarExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult<object> result,
        CancellationToken cancellationToken = new CancellationToken())
    {
        return base.ScalarExecutingAsync(RemoveQuotes(command), eventData, result, cancellationToken);
    }

    public override InterceptionResult<int> NonQueryExecuting(DbCommand command, CommandEventData eventData, InterceptionResult<int> result)
    {
        return base.NonQueryExecuting(RemoveQuotes(command), eventData, result);
    }

    public override Task<InterceptionResult<int>> NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult<int> result,
        CancellationToken cancellationToken = new CancellationToken())
    {
        return base.NonQueryExecutingAsync(RemoveQuotes(command), eventData, result, cancellationToken);
    }

    private DbCommand RemoveQuotes(DbCommand command)
    {
        command.CommandText = command.CommandText.Replace("\"", "");
        return command;
    }
}

Showing 5671 to 5680 of 5968 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11