core/common/tenant-ui.service.ts
The helper UI service for tenant related methods built upon client services.
Properties |
|
Methods |
Accessors |
constructor(userService: UserService, appStateService: AppStateService, applicationService: ApplicationService)
|
||||||||||||
Parameters :
|
canReadTenants |
canReadTenants()
|
Checks whether the current user has read access to tenants, i.e.:
Returns :
boolean
True, if the current user has read access to tenants. |
getPreferredLoginOption | ||||||
getPreferredLoginOption(loginOptions: ITenantLoginOption[])
|
||||||
Returns tenant login option which is preferred. Example
Parameters :
Returns :
ITenantLoginOption
Returns ITenantLoginOption. Example
|
getSubscribedMicroservicesInCurrentTenant |
getSubscribedMicroservicesInCurrentTenant()
|
Gets all application of type MICROSERVICE subscribed to the current tenant. It checks the application references of the currentTenant from the application state. No additional request.
Returns :
IApplication[]
|
isBasic | ||||||
isBasic(loginOption: ITenantLoginOption)
|
||||||
Callback which checks if login option type is 'BASIC'. Example
Parameters :
Returns :
boolean
|
Async isEnterpriseTenant |
isEnterpriseTenant()
|
Checks whether current tenant is an enterprise tenant. An enterprise tenant is a tenant which has subscribed:
See https://cumulocity.com/guides/users-guide/enterprise-edition/ for details about such tenants.
Returns :
Promise<boolean>
True, if current tenant is an enterprise tenant. |
Async isManagementTenant |
isManagementTenant()
|
Checks whether current tenant is the management tenant.
Returns :
Promise<boolean>
True if current tenant is the management tenant. |
isMicroserviceSubscribedInCurrentTenant | ||||||||
isMicroserviceSubscribedInCurrentTenant(identifier: string)
|
||||||||
Checks if application of type MICROSERVICE is subscribed to the current tenant. It checks the application references of the currentTenant from the application state. No additional request.
Parameters :
Returns :
boolean
|
isOauth2 | ||||||
isOauth2(loginOption: ITenantLoginOption)
|
||||||
Callback which checks if login option type is 'OAUTH2' and grantType is 'AUTHORIZATION_CODE'. Example
Parameters :
Returns :
boolean
|
isOauthInternal | ||||||
isOauthInternal(loginOption: ITenantLoginOption)
|
||||||
Callback which checks if login option type is 'OAUTH2_INTERNAL'. Example
Parameters :
Returns :
boolean
|
isVisibleOnLoginPage | ||||||
isVisibleOnLoginPage(loginOption: ITenantLoginOption)
|
||||||
Callback which checks if login option is visible on login page. Example
Parameters :
Returns :
boolean
|
Readonly MANAGEMENT |
Type : string
|
Default value : 'management'
|
Readonly ROLE_TENANT_MANAGEMENT_READ |
Type : string
|
Default value : 'ROLE_TENANT_MANAGEMENT_READ'
|
currentTenant |
getcurrentTenant()
|
Returns current tenant
Returns :
ICurrentTenant
|