Skip to content
Snippets Groups Projects

ISAICP-7524: Register users as blocked.

Merged Alexandre Dias requested to merge ISAICP-7524 into master
6 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 <?php
2
3 declare(strict_types = 1);
4
5 namespace Drupal\joinup_eulogin;
6
7 use Drupal\Core\DependencyInjection\ContainerBuilder;
8 use Drupal\Core\DependencyInjection\ServiceProviderBase;
9
10 /**
11 * Modifies the 'cas.user_manager' service default implementation.
12 */
13 class JoinupCasServiceProvider extends ServiceProviderBase {
  • 6
    7 use Drupal\Core\DependencyInjection\ContainerBuilder;
    8 use Drupal\Core\DependencyInjection\ServiceProviderBase;
    9
    10 /**
    11 * Modifies the 'cas.user_manager' service default implementation.
    12 */
    13 class JoinupCasServiceProvider extends ServiceProviderBase {
    14
    15 /**
    16 * {@inheritdoc}
    17 */
    18 public function alter(ContainerBuilder $container): void {
    19 if ($container->hasDefinition('cas.user_manager')) {
    20 $definition = $container->getDefinition('cas.user_manager');
    21 $definition->setClass('Drupal\joinup_eulogin\CasUserManager');
  • 23 23 arguments: ['@state']
    24 24 tags:
    25 25 - { name: config.factory.override }
    26 cas.user_manager:
    27 class: Drupal\joinup_eulogin\CasUserManager
    28 arguments: ['@externalauth.externalauth', '@externalauth.authmap', '@config.factory', '@session', '@database', '@event_dispatcher', '@cas.helper', '@cas.proxy_helper', '@password_generator', '@messenger', '@state']
  • 5 namespace Drupal\joinup_eulogin;
    6
    7 use Drupal\Core\DependencyInjection\ContainerBuilder;
    8 use Drupal\Core\DependencyInjection\ServiceProviderBase;
    9
    10 /**
    11 * Modifies the 'cas.user_manager' service default implementation.
    12 */
    13 class JoinupCasServiceProvider extends ServiceProviderBase {
    14
    15 /**
    16 * {@inheritdoc}
    17 */
    18 public function alter(ContainerBuilder $container): void {
    19 if ($container->hasDefinition('cas.user_manager')) {
    20 $definition = $container->getDefinition('cas.user_manager');
  • 23 * Extends 'cas.user_manager' from the cas module.
    24 */
    25 class CasUserManager extends OriginalCasUserManager {
    26
    27 use StringTranslationTrait;
    28
    29 /**
    30 * The messenger service.
    31 */
    32 protected MessengerInterface $messenger;
    33
    34 /**
    35 * The state service.
    36 */
    37 protected StateInterface $state;
    38
  • 366 366 When I fill in "Password" with "123"
    367 367 And I press "Log in"
    368 368 Then I should see the success message "Fill in the fields below to let the Joinup community learn more about you!"
    369
    370 @javascript @email
  • Needs a Joinup follow-up linking to https://www.drupal.org/project/cas/issues/3038279 to remove the CAS user manager override. Link the new ticket in this one.

  • Alexandre Dias added 1 commit

    added 1 commit

    • 5a83be8a - ISAICP-7524: Remove javascript test, use constructor property promotion and...

    Compare with previous version

  • added 1 commit

    • 17a9b478 - ISAICP-7524: Set a proper name for the service alterer.

    Compare with previous version

  • added 1 commit

    • c114acdd - ISAICP-7524: Move the logic upstream.

    Compare with previous version

  • added 1 commit

    • 01afcf57 - ISAICP-7524: The blocked account message is not shown.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 980f0a75 - ISAICP-7524: Enforce account registration policy.

    Compare with previous version

  • Please register or sign in to reply
    Loading