|
|
@ -54,9 +54,6 @@ export class InfoService {
|
|
|
|
public async get(): Promise<InfoItem> {
|
|
|
|
public async get(): Promise<InfoItem> {
|
|
|
|
const info: Partial<InfoItem> = {};
|
|
|
|
const info: Partial<InfoItem> = {};
|
|
|
|
let isReadOnlyMode: boolean;
|
|
|
|
let isReadOnlyMode: boolean;
|
|
|
|
const platforms = await this.platformService.getPlatforms({
|
|
|
|
|
|
|
|
orderBy: { name: 'asc' }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const globalPermissions: string[] = [];
|
|
|
|
const globalPermissions: string[] = [];
|
|
|
|
|
|
|
|
|
|
|
@ -100,22 +97,30 @@ export class InfoService {
|
|
|
|
globalPermissions.push(permissions.enableSystemMessage);
|
|
|
|
globalPermissions.push(permissions.enableSystemMessage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const isUserSignupEnabled =
|
|
|
|
const [
|
|
|
|
await this.propertyService.isUserSignupEnabled();
|
|
|
|
benchmarks,
|
|
|
|
|
|
|
|
demoAuthToken,
|
|
|
|
|
|
|
|
isUserSignupEnabled,
|
|
|
|
|
|
|
|
platforms,
|
|
|
|
|
|
|
|
statistics,
|
|
|
|
|
|
|
|
subscriptions,
|
|
|
|
|
|
|
|
tags
|
|
|
|
|
|
|
|
] = await Promise.all([
|
|
|
|
|
|
|
|
this.benchmarkService.getBenchmarkAssetProfiles(),
|
|
|
|
|
|
|
|
this.getDemoAuthToken(),
|
|
|
|
|
|
|
|
this.propertyService.isUserSignupEnabled(),
|
|
|
|
|
|
|
|
this.platformService.getPlatforms({
|
|
|
|
|
|
|
|
orderBy: { name: 'asc' }
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
this.getStatistics(),
|
|
|
|
|
|
|
|
this.getSubscriptions(),
|
|
|
|
|
|
|
|
this.tagService.get()
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
if (isUserSignupEnabled) {
|
|
|
|
if (isUserSignupEnabled) {
|
|
|
|
globalPermissions.push(permissions.createUserAccount);
|
|
|
|
globalPermissions.push(permissions.createUserAccount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const [benchmarks, demoAuthToken, statistics, subscriptions, tags] =
|
|
|
|
|
|
|
|
await Promise.all([
|
|
|
|
|
|
|
|
this.benchmarkService.getBenchmarkAssetProfiles(),
|
|
|
|
|
|
|
|
this.getDemoAuthToken(),
|
|
|
|
|
|
|
|
this.getStatistics(),
|
|
|
|
|
|
|
|
this.getSubscriptions(),
|
|
|
|
|
|
|
|
this.tagService.get()
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
...info,
|
|
|
|
...info,
|
|
|
|
benchmarks,
|
|
|
|
benchmarks,
|
|
|
|