Loading modules/o365_groups/o365_groups.module +13 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ function o365_groups_entity_base_field_info(EntityTypeInterface $entity_type) { */ function o365_groups_form_group_form_alter(&$form, FormStateInterface $form_state, $form_id) { if (isset($form['field_o365_groups_teams_id'])) { /** @var \Drupal\o365\GraphService $graphService */ $graphService = \Drupal::service('o365.graph'); if ($graphService && $graphService->getCurrentUserId()) { /** @var \Drupal\o365_groups\GroupsService $groupsService */ $groupsService = \Drupal::service('o365_groups.groups'); $availableTeams = $groupsService->getGroupsFromTeams(); Loading @@ -60,6 +64,10 @@ function o365_groups_form_group_form_alter(&$form, FormStateInterface $form_stat $form['field_o365_groups_teams_id']['#access'] = FALSE; } } else { $form['field_o365_groups_teams_id']['#access'] = FALSE; } } } /** Loading Loading
modules/o365_groups/o365_groups.module +13 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ function o365_groups_entity_base_field_info(EntityTypeInterface $entity_type) { */ function o365_groups_form_group_form_alter(&$form, FormStateInterface $form_state, $form_id) { if (isset($form['field_o365_groups_teams_id'])) { /** @var \Drupal\o365\GraphService $graphService */ $graphService = \Drupal::service('o365.graph'); if ($graphService && $graphService->getCurrentUserId()) { /** @var \Drupal\o365_groups\GroupsService $groupsService */ $groupsService = \Drupal::service('o365_groups.groups'); $availableTeams = $groupsService->getGroupsFromTeams(); Loading @@ -60,6 +64,10 @@ function o365_groups_form_group_form_alter(&$form, FormStateInterface $form_stat $form['field_o365_groups_teams_id']['#access'] = FALSE; } } else { $form['field_o365_groups_teams_id']['#access'] = FALSE; } } } /** Loading