It would be nice to have redirection based on the Domain you are logging in from.

This would allow a user who has multiple roles in multiple domains to be redirected properly based on login Domain rather than simply by Login Destination ordering.

This patch needs more manual testing, as well as automated tests, but I have not yet unlocked the mysteries of phpunit. Meaning, every time I try, there is a different error, often in a totally different module, so for now, perhaps someone else can take a quick stab at it.

NOTE: This patch includes an optional dependency on the Domain Access module.

Thanks for the great module!!!

CommentFileSizeAuthor
integration-with-domain-access.patch15.01 KBarnaldop

Comments

arnaldop created an issue. See original summary.

gaurav.kapoor’s picture

Thanks for the patch @arnaldop. I could not test the patch as it wouldn't apply anymore and would need a reroll. A few things which can be improved in the patch

  1. +optional:
    +  - domain
    +
    

    can be changed to

    +optional:
    +  - domain:domain
    +
     
  2. I guess this service and method don't exist anymore, so this will have to be replaced with alternatives.
    +    calls:
    +      - [setDomainAliasLoader, ['@?domain_alias.loader']]
    
  3. This will also require writing of an update hook that would change the entity schema.
       /**
    +   * The login destination domains.
    +   *
    +   * @var array
    +   */
    +  public $domains = [];
    +
    

And as you already mentioned we will require a good manual testing and tests as well. Let's keep it open for now and see if we can get more support in completing this feature.