Commit 7f394a20 authored by Jakob P's avatar Jakob P
Browse files

Issue #3289460 by japerry, Lal_, balintpekker, mglaman: Automated Drupal 10 compatibility fixes

parent b0b618b2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
    "source": "http://cgit.drupalcode.org/samlauth"
  },
  "require": {
    "drupal/core": "^8 || ^9",
    "drupal/externalauth": "^1.3 || ^2",
    "onelogin/php-saml": "^3.3.1 || ^4"
  },
+1 −2
Original line number Diff line number Diff line
@@ -2,8 +2,7 @@ name: 'SAML Auth User Fields Mapping'
type: module
description: 'Maps custom SAML SSO attributes to user fields.'
package: 'User authentication'
core_version_requirement: ^8 || ^9
core: 8.x
core_version_requirement: ^9.2 || ^10
configure: samlauth_user_fields.list
dependencies:
  - samlauth:samlauth
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ class UserFieldsEventSubscriber implements EventSubscriberInterface {
      foreach ($match_expression as $field_name => $value) {
        $query->condition($field_name, $value);
      }
      $results = $query->execute();
      $results = $query->accessCheck()->execute();
      // @todo we should figure out what we want to do with users that are
      //   already 'linked' in the authmap table. Maybe we want to exclude
      //   them from the query results; maybe we want to include them and
+15 −3
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\TypedData\DataDefinition;
use Drupal\Core\Url;
use Drupal\samlauth\Controller\SamlController;
@@ -24,6 +25,13 @@ class SamlauthMappingListForm extends ConfigFormBase {
   */
  protected $entityFieldManager;

  /**
   * Renderer service.
   *
   * @var \Drupal\Core\Render\RendererInterface
   */
  protected $renderer;

  /**
   * SamlauthMappingListForm constructor.
   *
@@ -31,10 +39,13 @@ class SamlauthMappingListForm extends ConfigFormBase {
   *   The config factory.
   * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
   *   The entity field manager service.
   * @param \Drupal\Core\Render\RendererInterface $renderer
   *   The Drupal Renderer service.
   */
  public function __construct(ConfigFactoryInterface $config_factory, EntityFieldManagerInterface $entity_field_manager) {
  public function __construct(ConfigFactoryInterface $config_factory, EntityFieldManagerInterface $entity_field_manager, RendererInterface $renderer) {
    parent::__construct($config_factory);
    $this->entityFieldManager = $entity_field_manager;
    $this->renderer = $renderer;
  }

  /**
@@ -43,7 +54,8 @@ class SamlauthMappingListForm extends ConfigFormBase {
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('config.factory'),
      $container->get('entity_field.manager')
      $container->get('entity_field.manager').
      $container->get('renderer')
    );
  }

@@ -198,7 +210,7 @@ class SamlauthMappingListForm extends ConfigFormBase {
        $output['table']['#rows'][$id] = [
          $mapping['attribute_name'],
          $user_field,
          render($operations),
          $this->renderer->render($operations),
        ];
        if ($linking_enabled) {
          array_splice($output['table']['#rows'][$id], 2, 0, [$mapping['link_user_order'] ?? '']);
+1 −2
Original line number Diff line number Diff line
@@ -2,8 +2,7 @@ name: 'SAML Auth User Role Assignment'
type: module
description: 'Assigns roles to users on login.'
package: 'User authentication'
core_version_requirement: ^8 || ^9
core: 8.x
core_version_requirement: ^9.2 || ^10
configure: samlauth_user_roles.configure_form
dependencies:
  - samlauth:samlauth
Loading