public async Task <UserSetting> GetSettingsForUserAsync(string userId)
        {
            var isHelpDeskUser = Context.SecurityProvider.IsTdHelpDeskUser ||
                                 Context.SecurityProvider.IsTdAdministrator;
            var settings = await Context.UserSettings.FindAsync(userId);

            //ensure settings exist
            if (settings == null)
            {
                settings = UserSetting.GetDefaultSettingsForUser(userId, isHelpDeskUser);
                using (var tempCtx = new TdDomainContext())
                {
                    await tempCtx.UserSettingsManager.AddOrUpdateSettingsForUser(settings);

                    await tempCtx.SaveChangesAsync();
                }
            }
            //ensure that the user has all required lists for their role, if not blow away list settings and recreate
            if (!settings.ListSettings.HasRequiredDefaultListSettings(isHelpDeskUser))
            {
                settings.ListSettings = new UserTicketListSettingsCollection
                {
                    UserTicketListSetting.GetDefaultListSettings(userId, isHelpDeskUser)
                };
                using (var tempCtx = new TdDomainContext())
                {
                    await tempCtx.UserSettingsManager.AddOrUpdateSettingsForUser(settings);

                    await tempCtx.SaveChangesAsync();
                }
            }
            return(settings);
        }
        public async Task ResetAllListSettingsForUserAsync(string userId)
        {
            var settings = await GetSettingsForUserAsync(userId);

            settings.ListSettings = new UserTicketListSettingsCollection
            {
                UserTicketListSetting.GetDefaultListSettings(userId, Context.SecurityProvider.IsTdHelpDeskUser || Context.SecurityProvider.IsTdAdministrator)
            };
        }