Base solution for your next web application

Activities of "cmthomps"

Can confirm that I can now login, but cannot download RC10.

I think the solution is to use:

var fileName = path.basename(asset.absolutePath);

This makes it work on both windows and mac.

Craig

Ok. So I figured out what the issue is. I'm not sure if there is a way to make this line of code conditional based on the operating system.

On line 191 of gulpfile.js, there is this line of code:

 var fileName = asset.absolutePath.substring(asset.absolutePath.lastIndexOf('\\') + 1);

My issue is resolved if I change it to this (notice the difference in back slashes vs forward slashes):

var fileName = asset.absolutePath.substring(asset.absolutePath.lastIndexOf('/') + 1);

@ismcagdas - It would be a nice feature!

As @ismcagdas suggested, you can implement your own AuditStore. What we did was create an admin setting that we could use to log only errors or log all events This is what our implementation looks like:


    public class SmcAuditStore : AuditingStore
    {

        public ILogger<AuditingStore> Logger { get; set; }

        private readonly IRepository<AuditLog, long> _auditLogRepository;
        private readonly ISettingManager _settingManager;

        public SmcAuditStore(IRepository<AuditLog, long> auditLogRepository, ISettingManager settingManager) : base(auditLogRepository)
        {
            _auditLogRepository = auditLogRepository;
            _settingManager = settingManager;
        }

        public override async Task SaveAsync(AuditInfo auditInfo)
        {
            AuditLog auditLog = new AuditLog();

            bool logErrorsOnly = await _settingManager.GetSettingValueAsync<bool>(AppSettings.Logging.LogOnErrorsOnly);

            var exceptionMessage = auditInfo.Exception != null ? auditInfo.Exception.ToString() : null;

            if ((logErrorsOnly && exceptionMessage != null) || !logErrorsOnly)
            {

                auditLog = await _auditLogRepository.InsertAsync(AuditLog.CreateFromAuditInfo(auditInfo));
            }


        }

    }

You can replace the default auditstore by replacing it in the Core Module PreInitialize:

Configuration.ReplaceService<IAuditingStore, SmcAuditStore>();

Using the the userManager to check the permissions works (it returns true for the user that just logged in if that user has the permission). I'm not sure why the permission checker does not.

            var loginResult = await GetLoginResultAsync(loginModel.UsernameOrEmailAddress, loginModel.Password, GetTenancyNameOrNull());

            var hasPermissions = await _userManager.IsGrantedAsync(loginResult.User.Id, AppPermissions.Permission1);

Thanks - I'm using the permission checker right after the call to GetLoginAsync method. The result is always false. Wondering if the permissions get cached somehow later in the process. Not sure.

            var loginResult = await GetLoginResultAsync(loginModel.UsernameOrEmailAddress, loginModel.Password, GetTenancyNameOrNull());

            var hasPermissions = await PermissionChecker.IsGrantedAsync(AppPermissions.Permission1);

Any help?

Thanks @ismcagdas - Honestly, I have a workaround that seems to be working for us. The last time I checked, notifications do not work when using the StackExchange Redis Backplane but I have tried the v6.9.

Craig

Thanks @ismcagdas. I have a private github repository that I just shared with you. It contains an AspNetZero demo project that uses Redis for both Chat and Notifications. I've done some minimal testing. But it appears to work on Kubernetes running multiple pods behind a load balancer. Not sure if it's something that can be incorporated into the base product. For us, having the ability to run behind a load balancer is very important.

Showing 1 to 10 of 59 entries