Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.
Merged
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
9 changes: 9 additions & 0 deletions lib/AdapterLdap.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ public function getFacilitiesByEntityId($spEntityId)

public function getFacilityByEntityId($spEntityId, $entityIdAttr = 'perunFacilityAttr_entityID')
{
if (empty($spEntityId)) {
return null;
}
$attrName = AttributeUtils::getLdapAttrName($entityIdAttr);
if (empty($attrName)) {
$attrName = 'entityID';
Expand Down Expand Up @@ -359,6 +362,9 @@ public function getFacilityByEntityId($spEntityId, $entityIdAttr = 'perunFacilit

public function getFacilityByClientId($clientId, $clientIdAttr = 'perunFacilityAttr_OIDCClientID')
{
if (empty($spEntityId)) {
return null;
}
$attrName = AttributeUtils::getLdapAttrName($clientIdAttr);
if (empty($attrName)) {
$attrName = 'OIDCClientID';
Expand Down Expand Up @@ -605,6 +611,9 @@ public function getResourceCapabilities($entityId, $userGroups, $entityIdAttr =

public function getFacilityCapabilities($entityId, $entityIdAttr = 'perunFacilityAttr_entityID')
{
if (empty($entityId)) {
return [];
}
$attrName = AttributeUtils::getLdapAttrName($entityIdAttr);

$facilityCapabilities = $this->connector->searchForEntity(
Expand Down