Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 3c53369

Browse files
committed
Fixed the filter for isCesnetEligibleLastSeen
* Fixed the filter for isCesnetEligibleLastSeen that checks the eduPersonScopedAffiliations
1 parent a4ddac8 commit 3c53369

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5+
[Changed]
6+
- Fixed the filter for isCesnetEligibleLastSeen that checks the eduPersonScopedAffiliations
57

68
## [v1.1.1]
79
[Changed]

lib/Auth/Process/IsCesnetEligible.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,25 @@ private function isCesnetEligible() {
109109
}
110110
} elseif ($this->entityCategory === self::AVCR) {
111111
foreach ($this->eduPersonScopedAffiliation as $affiliation) {
112-
if (preg_match("/^member@.+\.cz$/", $affiliation, $matches)) {
112+
if (preg_match("/(^member@.+\.cz$)|(^staff@.+\.cz$)/", $affiliation, $matches)) {
113113
return true;
114114
}
115115
}
116116
} elseif ($this->entityCategory === self::LIBRARY) {
117117
foreach ($this->eduPersonScopedAffiliation as $affiliation) {
118-
if (preg_match("/^employee@.+\.cz$/", $affiliation, $matches)) {
118+
if (preg_match("/(^employee@.+\.cz$)|(^staff@.+\.cz$)/", $affiliation, $matches)) {
119119
return true;
120120
}
121121
}
122122
} elseif ($this->entityCategory === self::HOSPITAL) {
123123
foreach ($this->eduPersonScopedAffiliation as $affiliation) {
124-
if (preg_match("/^employee@.+\.cz$/", $affiliation, $matches)) {
124+
if (preg_match("/(^employee@.+\.cz$/)|(^staff@.+\.cz$)", $affiliation, $matches)) {
125125
return true;
126126
}
127127
}
128128
} elseif ($this->entityCategory === self::OTHER) {
129129
foreach ($this->eduPersonScopedAffiliation as $affiliation) {
130-
if (preg_match("/(^employee@.+\.cz$)|(^member@.+\.cz$)/", $affiliation, $matches)) {
130+
if (preg_match("/(^employee@.+\.cz$)|(^member@.+\.cz$)|(^employee@bbmri-eric\.eu$)|(^member@bbmri-eric\.eu$)/", $affiliation, $matches)) {
131131
return true;
132132
}
133133
}

0 commit comments

Comments
 (0)