public List <StorageWrapper> GetAllStorages() { SecurityContext.DemandPermissions(Tenant, SecutiryConstants.EditPortalSettings); var current = StorageSettings.Load(); var consumers = ConsumerFactory.GetAll <DataStoreConsumer>().ToList(); return(consumers.Select(consumer => new StorageWrapper(consumer, current)).ToList()); }
public List <StorageWrapper> GetAllCdnStorages() { SecurityContext.DemandPermissions(Tenant, SecutiryConstants.EditPortalSettings); if (!CoreContext.Configuration.Standalone) { return(null); } var current = CdnStorageSettings.Load(); var consumers = ConsumerFactory.GetAll <DataStoreConsumer>().Where(r => r.Cdn != null).ToList(); return(consumers.Select(consumer => new StorageWrapper(consumer, current)).ToList()); }