Starts in:
2 DAYS
23 HRS
2 MIN
44 SEC
Starts in:
2 D
23 H
2 M
44 S

Activities of "Bryan-EDV"

@Bryan-EDV if you want to update only texts you can use the localization text files. @maliming provided you the localization keys. if you add these keys in your localization file (en.json) it'll be changed. also you can change the colors and other styles with simple CSS overrides. but if you want to radically change this bar, you need to replace this component as stated here.

Hi, Thanks for the reply, I explored doing css overrides but this component is not in the classes that i can overwrite, so i think i'm left with replacing the whole component.

Is this the correct replaceable component? I am on abp v8.3, eGdprConfigComponents.CookieConsent does not work

`import { eGdprComponents } from '@volo/abp.ng.gdpr';

key : eGdprComponents.PersonalData `

I'm also under the impression that all source code will be included in the Enterprise version (which my company has purchased), however i didn't find any for this cookie consent bar. can you kindly point me to it? thank you.

hi

Can you inspect this element with dev tool to see if it is a angular or MVC component?

it looks like this:

hi

The component is rendered by AbpCookieConsentViewComponent(Volo.Abp.Gdpr.Web.Pages.Gdpr.Components.CookieConsent;)

You can override it.

Hi, thanks for the reply,

Can i customize this in my angular proj? instead of MVC?

Hi, i've done all that, but how do customize the UI?

  • ABP Framework version:v8.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

How can i customize the GDPR cookie consent bar?

Posted this article on the topic: https://medium.com/@kaffeeebene/abp-in-depth-storing-key-tenant-data-in-the-host-database-while-keeping-the-rest-in-tenant-ca2aca0e4cd2

Thanks!

Creating a knowledge article on this topic and will post the link here in a bit

Hi maliming,

I've managed to resolve the issues and get the desired implementation. Give me a few hours to add the code snippets here for others to reference.

Thank you

Thank you for the insights. As I do not want to deviate from the framework design, I will implement the manual assignment of TenantIdCustom upon entity creation (We forsee only a limited number of such entities)

In addition, I've implemented a DataFilter within MyApplcaitionDbContext.cs

protected bool IsMultiTenantInHostDb => DataFilter?.IsEnabled<IMultiTenantInHostDb>() ?? false;

protected override bool ShouldFilterEntity<TEntity>(IMutableEntityType entityType)
{
    if (typeof(IMultiTenantInHostDb).IsAssignableFrom(typeof(TEntity)))
    {
        return true; // Apply filter for entities implementing IMultiTenantInHostDb
    }

    return base.ShouldFilterEntity<TEntity>(entityType);
}

protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntity>(ModelBuilder modelBuilder)
{
    var expression = base.CreateFilterExpression<TEntity>(modelBuilder);

    if (typeof(IMultiTenantInHostDb).IsAssignableFrom(typeof(TEntity)))
    {
        // Get the current tenant ID
        var currentTenantId = CurrentTenant.Id;
        Console.WriteLine("currentTenantId:");
        Console.WriteLine(currentTenantId);

        // Create the filter expression
        Expression<Func<TEntity, bool>> tenantFilter = e =>
            !IsMultiTenantInHostDb ||
            (EF.Property<Guid?>(e, "TenantIdCustom") == currentTenantId || EF.Property<Guid?>(e, "TenantIdCustom") == null);

        expression = expression == null ? tenantFilter : QueryFilterExpressionHelper.CombineExpressions(expression, tenantFilter);
    }

    return expression;
}

as per your reference for ef core filter: https://abp.io/docs/latest/framework/infrastructure/data-filtering?_redirected=B8ABF606AA1BDF5C629883DF1061649A#entityframework-core

However the currentTenantId coming as null, even when logged in as a tenant. Is there some issue with my usage of CurrentTenant.Id?

Something like this? (I not sure if ICurrentTenant is available for dependency injection on a Entity level though)

Injecting into DomainService should work right? But this is not desirable, as I would need to override the CreateAsync method for every DomainService for the entity. I would prefer if the Entity itself does the initialization, similar to classes implementing IMultiTenant

Showing 11 to 20 of 39 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06