Skip to content

Commit

Permalink
analizators/U2U1208
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Jan 18, 2022
1 parent acd5b83 commit f1f7a82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions common/ASC.Core.Common/Data/DbTenantService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ IQueryable<TenantUserSecurity> query() => TenantsQuery()
.Where(r => r.Email == login)
.Where(r => r.Status == EmployeeStatus.Active)
.Where(r => !r.Removed)
.Select(r => r.Id)
.ToList();
.Select(r => r.Id);

var passwordHashs = usersQuery.Select(r => GetPasswordHash(r, passwordHash)).ToList();

Expand Down
2 changes: 1 addition & 1 deletion common/ASC.Feed/Data/FeedAggregateDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private List<FeedResultItem> GetFeedsInternal(FeedApiFilter filter)
q = q.Where(r => keys.Any(k => r.aggregates.Keywords.StartsWith(k)));
}

var news = q.Select(r => r.aggregates).ToList();
var news = q.Select(r => r.aggregates);

return news.Select(r => new FeedResultItem(
r.Json,
Expand Down
7 changes: 3 additions & 4 deletions web/ASC.Web.Api/Controllers/SettingsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ public object GetEnabledModules()
{
var EnabledModules = WebItemManagerSecurity.GetItems(WebZoneType.All, ItemAvailableState.Normal)
.Where(item => !item.IsSubItem() && item.Visible)
.ToList()
.Select(item => new
{
id = item.ProductClassName.HtmlEncode(),
Expand Down Expand Up @@ -2224,7 +2223,7 @@ public List<StorageWrapper> GetAllStorages()
TenantExtra.DemandControlPanelPermission();

var current = SettingsManager.Load<StorageSettings>();
var consumers = ConsumerFactory.GetAll<DataStoreConsumer>().ToList();
var consumers = ConsumerFactory.GetAll<DataStoreConsumer>();
return consumers.Select(consumer => new StorageWrapper(consumer, current)).ToList();
}

Expand Down Expand Up @@ -2522,7 +2521,7 @@ public List<StorageWrapper> GetAllCdnStorages()
TenantExtra.DemandControlPanelPermission();

var current = SettingsManager.Load<CdnStorageSettings>();
var consumers = ConsumerFactory.GetAll<DataStoreConsumer>().Where(r => r.Cdn != null).ToList();
var consumers = ConsumerFactory.GetAll<DataStoreConsumer>().Where(r => r.Cdn != null);
return consumers.Select(consumer => new StorageWrapper(consumer, current)).ToList();
}

Expand Down Expand Up @@ -2600,7 +2599,7 @@ public List<StorageWrapper> GetAllBackupStorages()
};
}

var consumers = ConsumerFactory.GetAll<DataStoreConsumer>().ToList();
var consumers = ConsumerFactory.GetAll<DataStoreConsumer>();
return consumers.Select(consumer => new StorageWrapper(consumer, current)).ToList();
}

Expand Down

0 comments on commit f1f7a82

Please sign in to comment.