Skip to content

Commit

Permalink
Merge pull request #19 from tkiehne/d11_compat
Browse files Browse the repository at this point in the history
D11 compat
  • Loading branch information
tkiehne authored Sep 13, 2024
2 parents ab81fd8 + 0444bf1 commit 8121059
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions src/EventSubscriber/UwAuthSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\ImmutableConfig;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\PageCache\ResponsePolicy\KillSwitch;
use Drupal\Core\Routing\CurrentRouteMatch;
use Drupal\Core\Routing\LocalRedirectResponse;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\user\Entity\User;
use Drupal\user\RoleInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Routing\LocalRedirectResponse;
use Drupal\user\UserInterface;
use Drupal\uwauth\Debug;
use Drupal\uwauth\Form\UwAuthSettingsForm;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\KernelEvents;

/**
* UW Auth event subscriber.
Expand Down Expand Up @@ -463,10 +464,10 @@ private function redirectUser(): RedirectResponse {
/**
* Synchronize roles with UW Groups or Active Directory.
*
* @param \Drupal\Core\Session\AccountInterface $account
* @param \Drupal\user\UserInterface $account
* A user object.
*/
private function syncRoles(AccountInterface $account): void {
private function syncRoles(UserInterface $account): void {
// Local groups do not need to be resynchronized.
if ($this->settings->get('group.source') == UwAuthSettingsForm::SYNC_LOCAL) {
$this->logger->log($this->severity['local_sync'], 'Used local roles for {name}: no sync.', [
Expand Down
2 changes: 1 addition & 1 deletion src/Form/UwAuthSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Drupal\uwauth\Form;

use Drupal\Core\Config\Config;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Config\Config;

/**
* Configure UwAuth settings for this site.
Expand Down
4 changes: 2 additions & 2 deletions uwauth.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ name: 'UW Auth'
description: 'Provides authentication and role assignment with Shibboleth, and UW Groups or Active Directory'
package: Web services
type: module
version: '3.0.4'
core_version_requirement: ^10.2
version: '3.0.5'
core_version_requirement: ^10.2 || ^11

0 comments on commit 8121059

Please sign in to comment.