Base solution for your next web application

Activities of "pradippatil"

Hi,

I want to add a layer between Host and Tenant. Below is my requirement: Host -> Tenants Host -> Extra Layer(say Reseller) -> Tenants

So, tenants can be added to Host as well as under Reseller. And reseller will be added under host. What will be the best way to add this layer using the ABP framework?

Thanks

Hi,

I want to use multiple resource files to have separation of localized keys/texts. I tried to add multiple resource files in Localization Source list (in PreInitilizae method of Core module) which I was able to do with no issue, but as I see we can only provide one LocalizationSourceName, hence only one resource file.

How can we use multiple resource files?

Thanks

Hi,

You got it right!

But my question is how to specify multiple LocationSourceNames?

We set LocalizationSourceName in base classes like the one which derives from AbpWebViewPage. Below is the code snippet:

public abstract class DemoWebViewPageBase<TModel> : AbpWebViewPage<TModel>
    {
        public IAbpSession AbpSession { get; private set; }
        
        protected DemoWebViewPageBase()
        {
            AbpSession = IocManager.Instance.Resolve<IAbpSession>();
            LocalizationSourceName = DemoConsts.LocalizationSourceName;
        }
    }

In above code we can speficy only one LocalizationSourceName. How can we specify multiple here?

Thanks

Thanks!

Is there any way to use localization in Dtos? I want to use localization in Dtos in DataAnnotations for custom server side error messages.

For example, I want to use localization in TenantEditDto class like below:

[Required(ErrorMessage = "Please provide Name")]
public string Name { get; set; }

Hi,

Can we add multiple records in AbpUsers table with TenantId as NULL(means it will create multiple Hosts)? If yes, what are the places where we need to take care to not allow other users to be treated as Host? i.e. we need to have single host admin user, but also want to store multiple records in AbpUsers with TenantId as NULL.

Hi,

I want to add a new property in session without changing existing functionality of module zero implemented session. How can I add new property in IAbpSession?

Thanks!

Hi,

Currently, in ABP, in case of impersonation, audit fields are getting updated by the User Id of the user and not of the impersonated user. i.e. If host logs in as tenant then Tenant user id is updated in audit fields while performing any CRUD operation.

I want to change it like if host logs in as tenant and performs any CRUD operation then audit fields should get updated by the host user id instead of tenant user id. Is there any quick way to do it?

I have investigated a bit and got to know that I need to change in methods like "SetCreationAuditProperties", but this method is also not available for override. Any solution will be helpful.

Thanks

Hi,

I do not want to update AuditLogs.

I want to change the values which are saved in auditable entities fields like "CreatorUserId", "LastModifiedUserId", and "DeletedUserId". I think, currently, AbpSession.UserId is being saved in these fields for each auditable entity (for example...AbpRoles), instead I want to save AbpSession.ImpersonatorUserId value in these fields in case host logs in as tenant.

Thanks

Hi,

I think you still didn't get me.

I do not want to update the existing functionality of the AbpAuditLogs table.

I want to change the values of entities fields like "CreatorUserId", "LastModifiedUserId", and "DeletedUserId". These are the fields of all auditable entities (like AbpUsers, AbpRoles etc) and not the AbpAuditLogs table.

Currently, irrespective of who is performing operation i.e. whether actual user or impersonator, these fields are updated by AbpSession.UserId (which always contains the actual user id, not the impersonator use id).

Hence, I want to save Impersonator User Id value in fields like "CreatorUserId", "LastModifiedUserId", and "DeletedUserId" for each entity, so that I can get who has performed that particular operation on any entity without looking into AbpAuditLogs.

Thanks

Showing 1 to 10 of 29 entries