mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-05 08:19:22 +00:00
[Web] OIDC/LDAP: check the OAuth state, keep the mailbox on token refresh, require unique IdP users
This commit is contained in:
5 files changed
+56
-10
No files matched your search
@@ -26,6 +26,17 @@ class SyncPlannerTest extends TestCase
|
||||
$this->assertSame([], $plan->conflicts);
|
||||
}
|
||||
|
||||
public function testUnlinkedMailboxWithSeveralIdpUsersIsNeitherLinkedNorOffboarded(): void
|
||||
{
|
||||
$users = [self::user('u1', 'a@example.org'), self::user('u2', 'a@example.org', false), self::user('u3', 'a@example.org')];
|
||||
$plan = $this->plan($users, [new Account('a@example.org', 'A', 1)]);
|
||||
|
||||
$this->assertSame([], $plan->links);
|
||||
$this->assertSame(['Several IdP users have the email a@example.org'], $plan->conflicts);
|
||||
$this->assertSame([], $plan->missing);
|
||||
$this->assertSame([], $plan->deactivate);
|
||||
}
|
||||
|
||||
public function testLinkedUserWithNewEmailIsAConflictAndNotCreated(): void
|
||||
{
|
||||
$plan = $this->plan([self::user('u1', 'new@example.org')], [new Account('a@example.org', 'A', 1, 'u1')]);
|
||||
|
||||
Reference in new issue
Block a user