Skip to content

Commit

Permalink
Update RaListingService::findByIdentityId
Browse files Browse the repository at this point in the history
This method used to return but one RaListing entry previously as a RA
could only be RA for a single institution. With the introduction of FGA,
identities can have RA duties for multiple institutions.
  • Loading branch information
MKodde committed Jan 29, 2019
1 parent bc8903d commit 35f47c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public function __construct(

/**
* @param IdentityId $identityId The RA's identity id.
* @return null|RaListing
* @return null|RaListing[]
*/
public function findByIdentityId(IdentityId $identityId)
{
return parent::findOneBy(['identityId' => (string) $identityId]);
return parent::findBy(['identityId' => (string) $identityId]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function findRegistrationAuthorityCredentialsByNameIdAndInstitution(NameI
*/
private function findRegistrationAuthorityCredentialsByIdentity(Identity $identity)
{
$raListing = $this->raListingRepository->findByIdentityId(new IdentityId($identity->id));
$raListing = $this->raListingRepository->findByIdentityIdAndRaInstitution(new IdentityId($identity->id), $identity->institution);
$sraa = $this->sraaRepository->findByNameId($identity->nameId);

if ($raListing) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(RaListingRepository $raListingRepository)

/**
* @param IdentityId $identityId
* @return null|\Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\RaListing
* @return null|RaListing[]
*/
public function findByIdentityId(IdentityId $identityId)
{
Expand Down

0 comments on commit 35f47c9

Please sign in to comment.