UserId is checked in AuthorizationHelper. You can implement IAuthorizationHelper:
internal class AccountAuthorizationHelper : IAuthorizationHelper, ITransientDependency
{
}
Replace the default AuthorizationHelper in your module:
public override void PreInitialize()
{
Configuration.ReplaceService<IAuthorizationHelper, AccountAuthorizationHelper>();
}
Resolve the class:
using (var vehicleTrackingFieldAccessHtmlHandler = IocManager.Instance.ResolveAsDisposable<VehicleTrackingFieldAccessHtmlHandler>())
{
return vehicleTrackingFieldAccessHtmlHandler.Object.ProcessFields(vtField, VT_ID, OU_ID).Result;
}
Pass in an IConfigurationProvider instance:
var config = new MapperConfiguration(configuration =>
{
configuration.CreateAutoAttributeMaps(typeof(TagDto));
});
var tagsDto = await _tagRepository.GetAll().ProjectTo<TagDto>(config).ToListAsync();