@c8y/ngx-components 1017.0.76 → 1017.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6177,12 +6177,17 @@ class TenantUiService {
|
|
|
6177
6177
|
* @returns True, if current tenant is an enterprise tenant.
|
|
6178
6178
|
*/
|
|
6179
6179
|
async isEnterpriseTenant() {
|
|
6180
|
-
const
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
const
|
|
6185
|
-
|
|
6180
|
+
const { data: availableAppsOfUser } = await this.applicationService.listByUser(this.appStateService.currentUser.value, {
|
|
6181
|
+
dropOverwrittenApps: true,
|
|
6182
|
+
noPaging: true
|
|
6183
|
+
});
|
|
6184
|
+
const brandingAvailable = this.hasApp(availableAppsOfUser, 'branding') ||
|
|
6185
|
+
this.hasApp(availableAppsOfUser, 'feature-branding');
|
|
6186
|
+
const requiredAppsAndFeaturesAvailable = brandingAvailable &&
|
|
6187
|
+
this.hasApp(availableAppsOfUser, 'sslmanagement') &&
|
|
6188
|
+
this.hasApp(availableAppsOfUser, 'feature-user-hierarchy') &&
|
|
6189
|
+
this.hasApp(availableAppsOfUser, 'feature-broker');
|
|
6190
|
+
return requiredAppsAndFeaturesAvailable;
|
|
6186
6191
|
}
|
|
6187
6192
|
/**
|
|
6188
6193
|
* Checks whether the current user has read access to tenants, i.e.:
|
|
@@ -6353,8 +6358,11 @@ class TenantUiService {
|
|
|
6353
6358
|
.map(appRef => appRef.application)
|
|
6354
6359
|
.filter(app => app.type === ApplicationType.MICROSERVICE);
|
|
6355
6360
|
}
|
|
6356
|
-
|
|
6357
|
-
|
|
6361
|
+
hasApp(apps, requiredAppName) {
|
|
6362
|
+
if (!apps?.length) {
|
|
6363
|
+
return false;
|
|
6364
|
+
}
|
|
6365
|
+
return apps.some(app => app.name === requiredAppName);
|
|
6358
6366
|
}
|
|
6359
6367
|
isManagement(currentTenant) {
|
|
6360
6368
|
return currentTenant.name === this.MANAGEMENT;
|