Loading openid_connect.info.yml +0 −1 Original line number Diff line number Diff line Loading @@ -5,5 +5,4 @@ core_version_requirement: ^8.8 || ^9 || ^10 package: 'User authentication' configure: entity.openid_connect_client.list dependencies: - drupal:file - externalauth:externalauth openid_connect.module +2 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) { return; } $account_form = $form['account'] ?? $form; $account_form = isset($form['account']) ? (&$form['account']) : (&$form); $account_form['current_pass']['#access'] = FALSE; $account_form['current_pass_required_values']['#value'] = []; Loading @@ -100,7 +100,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) { * Implements hook_form_FORM_ID_alter() for user_profile_form. */ function openid_connect_form_user_profile_form_alter(&$form, &$form_state) { $account_form = $form['account'] ?? $form; $account_form = isset($form['account']) ? (&$form['account']) : (&$form); $account = \Drupal::currentUser(); if (!empty($account_form['pass']['#access']) && !\Drupal::service('openid_connect.openid_connect')->hasSetPasswordAccess($account)) { Loading tests/src/Functional/OpenIdConnectUiTest.phpdeleted 100644 → 0 +0 −44 Original line number Diff line number Diff line <?php namespace Drupal\Tests\openid_connect\Functional; use Drupal\Tests\BrowserTestBase; /** * Functional test for openid connect clients. * * @todo Improve these. * * @group openid_connect */ class OpenIdConnectUiTest extends BrowserTestBase { /** * {@inheritdoc} */ protected static $modules = [ 'openid_connect', 'externalauth', 'file', ]; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * Tests the client list. */ public function testClientList() { $this->drupalGet('/admin/config/people/openid-connect'); $this->assertSession()->statusCodeEquals(403); $account = $this->createUser(['administer openid connect clients']); $this->drupalLogin($account); $this->drupalGet('/admin/config/people/openid-connect'); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->pageTextContains('There are no openid connect client entities yet.'); } } Loading
openid_connect.info.yml +0 −1 Original line number Diff line number Diff line Loading @@ -5,5 +5,4 @@ core_version_requirement: ^8.8 || ^9 || ^10 package: 'User authentication' configure: entity.openid_connect_client.list dependencies: - drupal:file - externalauth:externalauth
openid_connect.module +2 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) { return; } $account_form = $form['account'] ?? $form; $account_form = isset($form['account']) ? (&$form['account']) : (&$form); $account_form['current_pass']['#access'] = FALSE; $account_form['current_pass_required_values']['#value'] = []; Loading @@ -100,7 +100,7 @@ function openid_connect_form_user_form_alter(&$form, &$form_state) { * Implements hook_form_FORM_ID_alter() for user_profile_form. */ function openid_connect_form_user_profile_form_alter(&$form, &$form_state) { $account_form = $form['account'] ?? $form; $account_form = isset($form['account']) ? (&$form['account']) : (&$form); $account = \Drupal::currentUser(); if (!empty($account_form['pass']['#access']) && !\Drupal::service('openid_connect.openid_connect')->hasSetPasswordAccess($account)) { Loading
tests/src/Functional/OpenIdConnectUiTest.phpdeleted 100644 → 0 +0 −44 Original line number Diff line number Diff line <?php namespace Drupal\Tests\openid_connect\Functional; use Drupal\Tests\BrowserTestBase; /** * Functional test for openid connect clients. * * @todo Improve these. * * @group openid_connect */ class OpenIdConnectUiTest extends BrowserTestBase { /** * {@inheritdoc} */ protected static $modules = [ 'openid_connect', 'externalauth', 'file', ]; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * Tests the client list. */ public function testClientList() { $this->drupalGet('/admin/config/people/openid-connect'); $this->assertSession()->statusCodeEquals(403); $account = $this->createUser(['administer openid connect clients']); $this->drupalLogin($account); $this->drupalGet('/admin/config/people/openid-connect'); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->pageTextContains('There are no openid connect client entities yet.'); } }