Hi I see. Is there no way to get the current feature without reflection?
I was able to find LDAP in the AbpUsers table but there is no related row in AbpUserLogins after the user logs in. The AbpUserLogins table doesn't appear to address if the user is currently logged in via password vs OpenID, only OpenID. The rows in the AbpUserLogins do not change or remove if you switch to password authentication or when the OpenID session is logged out. I guess what I am saying is this is not a 100% way to find out how the user logged in and in order to redirect the user after logout. Are there session variables to see how the current user is logged in?
No. We use that already. What I am looking to do is to automatically create (code generate) a separate C# client (think console) but have it automatically generated from the swagger.json whenever the aspnetzero MVC app completes a build.
Perfect. Thanks!
Ill close for now. Thanks for considering an enhancement for this.
Could you provide a hardcoded example inside AccountController.Login POST or wherever you think it should go as to how you would change the current tenant from host to the tenant ID. I have made it as far as getting logged in but there is a warning now and it logs out.
"Current user did not login to the application!"
Hi, I have tried writing to session and also claims to change the tenant.Id but am not having any luck. I assume you just set it directly like this, but that didn't work?
AbpClaimTypes.TenantId = "135";
Can you guide me further as to where this should be done and how? I was expecting it might work by doing so in TryAuthenticateAsync as you stated. If that is the right place please let me know how. We are just getting started and still learning the framework so I apologize if this seems simple.
To confirm the rad tool is only intended to work with AspZeroDbContext, not AbpDbContext, correct?
Allow me to back up the story a little. I did follow all of the instructions in that link and things seem to be working fine, but I am only just testing a few entities. The second dbcontext was originally setup as AbpDbContext. I was creating the entities using the RAD tool and manually copying them to second dbcontext from the primary AspZeroDbContext. My entities with TenantID seem to work fine and file the data and retrieve.
Then I saw the enhancement to the rad tool thinking that it now allowed for the AbpDbContext to be used, but it does not. It only seems to allow AspZeroDbContext. As a test I switched my second dbcontext to inherit AspZeroDbContext. My entities with TenantID seem to work just fine even after I delete all the ABP tables. Maybe I was just getting lucky?
In the end, I would like to use the rad tool to build entities in a separate database without all the extra ABP tables. Is that possible? I can probably research overriding the building of ABP tables, but I am worried that I don’t understand the system well enough to know if this will be a problem later. What are your thoughts? Thanks.
I want the filter to remain available for the user to change it if they want, but the initial filter value is set to true only (versus the default all records). Basically just pre-filter out the inactive records.