added support for saml login (#1408)

This commit is contained in:
Kevin Papst
2020-01-31 19:47:34 +01:00
committed by GitHub
parent 3ff46e06c0
commit 6a533579b7
47 changed files with 2278 additions and 77 deletions

View File

@@ -85,4 +85,30 @@ class UserVoterTest extends AbstractVoterTest
yield [$user, null, 'delete', $result];
}
}
/**
* @dataProvider getTestDataForAuthType
*/
public function testPasswordIsDeniedForNonInternalUser(string $authType, int $result)
{
$user = new User();
$user->setUsername('admin');
$user->addRole('ROLE_SUPER_ADMIN');
$subject = new User();
$subject->setUsername('foo');
$subject->addRole('ROLE_USER');
$subject->setAuth($authType);
$this->testVote($user, $subject, 'password', $result);
}
public function getTestDataForAuthType()
{
return [
[User::AUTH_LDAP, VoterInterface::ACCESS_DENIED],
[User::AUTH_INTERNAL, VoterInterface::ACCESS_GRANTED],
[User::AUTH_SAML, VoterInterface::ACCESS_DENIED],
];
}
}