Hello, In one of the scenarios, I cannot inherit from the DomainService as I need to do case by case IoC by type. etc. However, in this case, I need to localize error messages.
So in the base class of a class, I add the following method:
protected ILocalizableString L(string name)
{
return new LocalizableString(name, OnlineSystemsConsts.LocalizationSourceName);
}
The above method does return a localizable string.
Now 2 questions:
Thanks Bilal
Hi Ismail
Thano you for your reply.
I'm not getting what you mean when you say cannot check permissions in a switched host and tenant context. An example pls ?
Thanks
Hello, I am in need to extend the Abp Framework heavily. In this regard, I've prepared my requirements and what I will be changing. I am seeing your kind review to see if I am thinking correctly in terms of Abp and whether my changes would cause any issues to the normal flow of the Abp Framework and hence the entire App.
Host Level
. For every new department, an OU is created. . Upon creation of a new OU, 4 Roles are to be created & each of these roles is assigned the OU ID that it belongs to. . A new Role Entity is to be created inheriting from the Role entity that ships with Abp. This new entity shall have a new property called OU of type OU. (1-to-many: A Role belongs to 1 OU and 1 OU contains multiple Roles). . A new OU entity is to be created inheriting from the OU entity that ships with Abp. This new entity shall have a new property called OU Head of type User. (1-to-many: An OU has 1 OU Head and 1 User can be the head of multiple OUs) . When a new user is being created, for each OU-Role selected, the user shall be "Add Member" to those OUs. So, a user might be added to multiple Roles that belong to multiple OUs, hence user shall be added to multiple OUs as a Member. . Add a new Entity called Region that is shared between both Host and Tenant levels. . A new Tenant Entity is to be created inheriting from the Tenant entity that ships with Abp. This new entity shall have a new property called Region of type Region entity. (1-to-many: A Tenant belongs to 1 Region while a Region contains multiple Tenants). . A new User entity is to be created inheriting from the User entity that ships with Abp. This new entity shall have a new property called TenantsToAccess of type List<Tenant>. (Many-to-Many: A user can have access to 1 or more Tenants while a Tenant can be accessed by many users). This feature is required as by extending User and adding a property of Sites to be accessed, the Web App shall present data (Tenant-Specific) based on what Tenants this user belongs to.
Some analysis: . A Role entity now belongs to an OU entity. For each department in my client's organization, they will request in the future features to be developed for them. Features might be difference hence Permissions might be different. That's why I thought of creating OU-specific Roles so that I can freely add/remove permissions as needed. . The User entity now contains a list of Tenants a user belongs to (Host Level). Later on, based on the Tenants/Region data from those Tenants will be presented to the user. So this way I can simulate a Host User accessing data from multiple Tenants. Here I will be using SetTenantId(Null) and then add my own WHERE clause to get data.
Questions . Does the Abp Framework fire an event on the Event Bus when a new User is created? . Does the Abp Framework fire an event on the Event Bus when a new OU is created? . Does the Abp Framework fire an event on the Event Bus when an existing Role is edited?
Tenant Level . Most of the concepts from Host Level are applied here too. . One exception to the above is that when creating a new Tenant Level User automatically the user is assigned the current Tenant and Admin cannot change it.
Hi, Based on a user selection, I need to load a Razor View in Angular 1.x passing to it an Id. The Razor View shall have a model of a collection of some records that I need to loop over in Razor to render the records.
How to go about it? Can I load an angular view with a razor model?
I found it is easier to loop over collection in Razor to added some controls dynamically than to do so in Angular
Thanks Bilal
Sure. I am sharing the source code.
The code that is not working is commented out, just commented in and comment out the other code to be able to see what's going on.
Regards Bilal
Hello, Do you have any documentation on how multitenancy was added to the framework? What are the needed changes so that the app would be a multi-tenant? I would appreciate that info.
Thanks
Hello Ismail, Were you able to check this issue?
Thanks
Hello, I ran the app without running update-database. Then I get this message: CREATE DATABASE statement not allowed within multi-statement transaction.
What's the reason behind this message and why I can't just count on EF to run the migrations automatically when app is running?
Thanks
I will try it soon and report back :-)
I will try it soon and report back :-)