// Check whether the system dashboard is already available if not populate
UserRegistry registry = DashboardPopulatorContext.getRegistry(tenantId);
// Set permission for annonymous read. We do it here because it should happen always in order
// to support mounting a remote registry.
AuthorizationManager accessControlAdmin =
registry.getUserRealm().getAuthorizationManager();
if (!accessControlAdmin.isRoleAuthorized(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
GadgetPopulator.SYSTEM_GADGETS_PATH, ActionConstants.GET)) {
accessControlAdmin.authorizeRole(CarbonConstants.REGISTRY_ANONNYMOUS_ROLE_NAME, RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
GadgetPopulator.SYSTEM_GADGETS_PATH, ActionConstants.GET);
}
String serverName = CarbonUtils.getServerConfiguration().getFirstProperty("Name");