- ABP Framework version: v4.0.2
- UI type: Angular
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Seperated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:
Currently we have a project which contains two sets of service packs. Amongst one is API project (one solution, let's call it Api1), another is a server project (another solution, let's call it Server1). For Server1 we plan not to have any database dependencies, only through HTTP requesting the necessary information from Api1. As a result, we delete the Database-related dependencies in Server1, but it will have follow problems:
- Logging in. In the Server1, If Server1.MongoDb project remove Volo.Abp.IdentityServer.MongoDB dependencies and remove the DependsOn attribute of AbpIdentityServerMongoDbModule, the property of UserName of ICurrentUser will be null. The property of UserName can be retrieved or not after deleting the Database-related dependencies?
- Tenant problem. Server1 needs tenant function to isolate some data. But after deleting Volo.Saas.MongoDB dependencies, it will report Tenant not found! exception when logging in.
- Permission. How to use ABP permission component without depending on database but with Api1 project.
In total, we want to use the tenant module, permission module & CurrentUser functions without depending on any database operations, is this possible? If so, how?
Hi coeusli, I do not recommend this, because related components need to query existing user and permission data from the database. You can rewrite the storage code of related modules to get data from API1 (similar to RPC). You can also write the corresponding interface in the API and provide it to Server1 to use, and obtain tenant or other information through Remote Application Service on Server1.