Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion languages/messages.en.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@
'error_attribute_validator_regex' => '\'%arg3%\' does not match the expected format of this attribute (%arg2%)',
'error_attribute_validator_not_in_definitions' => '%arg1% is not known in the schema',
'error_attribute_validator_allowed' => '\'%arg3%\' is not an allowed value for this attribute',
'error_attribute_validator_availability' => '\'%arg3%\' is a reserved schacHomeOrganization for another Identity Provider',
'allowed_scopes' => 'Allowed scopes',

'error_unknown_requesterid_in_authnrequest' => 'Error - Unknown service',
Expand Down
1 change: 0 additions & 1 deletion languages/messages.nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@
'error_attribute_validator_regex' => '\'%arg3%\' voldoet niet aan de voorwaarden voor waardes van dit attribuut (%arg2%)',
'error_attribute_validator_not_in_definitions' => '%arg1% is niet bekend in het schema',
'error_attribute_validator_allowed' => '\'%arg3%\' is geen toegestane waarde voor dit attribuut',
'error_attribute_validator_availability' => '\'%arg3%\' is a gereserveerde SchacHomeOrganization voor een andere Identity Provider',
'allowed_scopes' => 'Toegestane scopes',

'error_unknown_requesterid_in_authnrequest' => 'Error - Deze dienst is niet geregistreerd bij %suiteName%.',
Expand Down
1 change: 0 additions & 1 deletion languages/messages.pt.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@
'error_attribute_validator_regex' => '\'%arg3%\' não corresponde a formato esperado deste atributo (%arg2%)',
'error_attribute_validator_not_in_definitions' => '%arg1% não é conhecido no schema',
'error_attribute_validator_allowed' => '\'%arg3%\' não é um valor permitido para este atributo',
'error_attribute_validator_availability' => '\'%arg3%\' é um schacHomeOrganization reservado para outro Fornecedor de Identidade',
'allowed_scopes' => 'Allowed scopes',

'error_unknown_requesterid_in_authnrequest' => 'Erro - Serviço desconhecido',
Expand Down
72 changes: 0 additions & 72 deletions library/EngineBlock/Attributes/Validator/Availability.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,4 @@ public function findAllIdentityProviderEntityIds(array $scope = [])
{
return $this->invoke(__FUNCTION__, func_get_args());
}

/**
* @return string[]
*/
public function findReservedSchacHomeOrganizations()
{
return $this->invoke(__FUNCTION__, func_get_args());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,6 @@ public function findAllIdentityProviderEntityIds(array $scope = [])
return array_map(current(...), $queryBuilder->getQuery()->execute(null, AbstractQuery::HYDRATE_ARRAY));
}

/**
* Find all SchacHomeOrganizations that are reserved by Identity Providers.
*
* @return string[]
*/
public function findReservedSchacHomeOrganizations()
{
$queryBuilder = $this->idpRepository
->createQueryBuilder('role')
->select('role.schacHomeOrganization')
->distinct()
->orderBy('role.schacHomeOrganization');

$this->compositeFilter->toQueryBuilder($queryBuilder, $this->idpRepository->getClassName());

return $queryBuilder
->getQuery()
->execute();
}

/**
* @param array $identityProviderIds
* @return array|IdentityProvider[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,6 @@ public function findAllIdentityProviderEntityIds(array $scope = [])
return $entityIds;
}

/**
* @return string[]
*/
public function findReservedSchacHomeOrganizations()
{
$schacHomeOrganizations = array();

$identityProviders = $this->findIdentityProviders();
foreach ($identityProviders as $identityProvider) {
if (!$identityProvider->getCoins()->schacHomeOrganization()) {
continue;
}

$schacHomeOrganizations[] = $identityProvider->getCoins()->schacHomeOrganization();
}
return $schacHomeOrganizations;
}

/**
* @param array $identityProviderEntityIds
* @return array|IdentityProvider[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,4 @@ public function findIdentityProvidersByEntityId(array $identityProviderEntityIds
* @return string[]
*/
public function findAllIdentityProviderEntityIds(array $scope = []);

/**
* @return string[]
*/
public function findReservedSchacHomeOrganizations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function testMethodsCallsAreProxied()
$doctrineRepository->shouldReceive('findIdentityProviders');
$doctrineRepository->shouldReceive('findIdentityProvidersByEntityId');
$doctrineRepository->shouldReceive('findAllIdentityProviderEntityIds');
$doctrineRepository->shouldReceive('findReservedSchacHomeOrganizations');

$repository = new CachedDoctrineMetadataRepository($doctrineRepository);
$repository->findIdentityProviderByEntityId('test');
Expand All @@ -49,7 +48,6 @@ public function testMethodsCallsAreProxied()
$repository->findIdentityProviders();
$repository->findIdentityProvidersByEntityId(['test']);
$repository->findAllIdentityProviderEntityIds();
$repository->findReservedSchacHomeOrganizations();
}

public function testFetchIdentityProviderThrowExceptions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ public function testFindIdentityProvider()
$this->assertEquals($idp, $idps[$idp->entityId]);
}

public function testFindReservedSchacHomeOrganizations()
{
$repository = $this->getFilledRepository();

$this->assertEquals(array('idp1.example.edu'), $repository->findReservedSchacHomeOrganizations());
}

public function testRegisterEntities()
{
$repository = new InMemoryMetadataRepository(array(), array());
Expand Down Expand Up @@ -121,8 +114,6 @@ public function testFilterApplication()
$this->assertNull($repository->findIdentityProviderByEntityId('https://idp1.example.edu'));
$this->assertNull($repository->findServiceProviderByEntityId('https://sp1.example.edu'));

$this->assertEmpty($repository->findReservedSchacHomeOrganizations());

// Make sure the filter is also applied to entity roles added after the filter has been registered.
$repository->registerIdentityProvider(new IdentityProvider('https://idp4.example.edu'));
$this->assertNull($repository->findIdentityProviderByEntityId('https://idp4.example.edu'));
Expand Down