Hello there,
In our application we want to implement Audit Trial (history of changes in entities with old & new values) in our database tables. In current ABP under "AbpDbContext" class we have a ApplyAbpConcepts() function which is been called from SaveChanges() and SaveChangesAsync(CancellationToken cancellationToken) methods . ApplyAbpConcepts() is the place where we can do something to fetch all OriginalValues and CurrentValues to create/fill our AuditLog entity. Following is a sample code which we will use to get original and current values -
foreach (var prop in entry.OriginalValues.PropertyNames) { var originalValue = entry.OriginalValues[prop].ToString(); var currentValue = entry.CurrentValues[prop].ToString(); } My doubt is, how I can achieve it in my ASP.Net Zero application? I want to store this entity from my abpDbContext class. Will it be possible store my custom entity (i.e. AuditHistory or auditLog which we will create) from my abpDbContext class ?
Or what will be the best approach to integrate this functionality ? Because as of now, there is no such Audit trial functionality is supported in existing framework.
Hello there,
I am new to the Asp.net boiler plate. I want to write an Integration test for a tokenauthController class. Specifically, I want to test Authenticate action as a start up. I googled a lot but did not get any relevant help in that context. I am using MsTest for testing. Right now, I don't know from where should I start.
Can some one please guide me to the right path? Any sample code will be highly appreciated.
Hello there,
I am trying to write Integration test for TokenAuthController. I am trying to resolve dependencies needed for that controller. But I am getting an error saying -
Message: Test method TC.TrialSystem.IT.Authorization.Users.TokenAuthController_Authenticate_Test.TokenAuthController_Authenticate_Api_Test threw exception: Abp.AbpException: Can not register IExternalAuthManager. It should be a non-abstract class. If not, it should be registered before.
Following is a code which I am using -
[TestMethod]
public async Task TokenAuthController_Authenticate_Api_Test()
{
_logInManager = Resolve<LogInManager>();
_tenantCache = Resolve<ITenantCache>();
_abpLoginResultTypeHelper = Resolve<AbpLoginResultTypeHelper>();
_configuration = Resolve<TokenAuthConfiguration>();
_userManager = Resolve<UserManager>();
_cacheManager = Resolve<ICacheManager>();
_jwtOptions = Resolve<IOptions<JwtBearerOptions>>();
**<ins>_externalAuthManager = Resolve<IExternalAuthManager>();</ins>**
_externalAuthConfiguration = Resolve<IExternalAuthConfiguration>();
_userRegistrationManager = Resolve<UserRegistrationManager>();
_impersonationManager = Resolve<IImpersonationManager>();
_userLinkManager = Resolve<IUserLinkManager>();
_appNotifier = Resolve<IAppNotifier>();
_smsSender = Resolve<ISmsSender>();
_emailSender = Resolve<IEmailSender>();
tokenAuthController = new TokenAuthController(_logInManager, _tenantCache, _abpLoginResultTypeHelper,
_configuration, _userManager, _cacheManager, _jwtOptions, _externalAuthConfiguration,
_externalAuthManager, _userRegistrationManager, _impersonationManager, _userLinkManager, _appNotifier,
_smsSender, _emailSender);
}
Can anyone guide me what is going on wrong?
Hello there,
I want to extend existing UserStore class in my application to add one more field say SiteId. I was just looking into the ABP documentation to proceed further but I did not get clue. I found one Forum which was quiet similar to my requirement but the link mentioned in that article is not working. Following is the title and link of that Forum -
HOW TO CUSTOMIZE LOCATION BASED USER ROLE? <a class="postlink" href="http://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=2872&p=6892&hilit=Location#p6892">http://forum.aspnetboilerplate.com/view ... tion#p6892</a>
It has above link saying - Have you seen this topic viewtopic.php?f=5&t=2872&p=6892&hilit=Location#p6892 ?
But when I click on this link, it simply redirects me to the Forum dashboard.
Can someone please guide me to the right path? Any documentation available to extend the UserStore ?