Skip to content
Snippets Groups Projects
Commit 4488b9f9 authored by Dominik František Bučík's avatar Dominik František Bučík Committed by Pavel Vyskočil
Browse files

Merge pull request #15 from pajavyskocil/fixLoa

Set the default LoA to 0
parent bfb858f1
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
[Fixed]
- Set the default LoA to 0 for IdP without or with empty attribute 'entityCategory'
## [v1.4.0] ## [v1.4.0]
[Chahnged] [Changed]
- Changed ComputeLoA Process filter to add LoA=2 for people from university with affiliation='alum' - Changed ComputeLoA Process filter to add LoA=2 for people from university with affiliation='alum'
[Fixed] [Fixed]
......
...@@ -80,7 +80,7 @@ class sspmod_cesnet_Auth_Process_ComputeLoA extends SimpleSAML_Auth_ProcessingFi ...@@ -80,7 +80,7 @@ class sspmod_cesnet_Auth_Process_ComputeLoA extends SimpleSAML_Auth_ProcessingFi
private function getLoA() { private function getLoA() {
if (is_null($this->entityCategory) || empty($this->entityCategory)) { if (is_null($this->entityCategory) || empty($this->entityCategory)) {
return 2; return 0;
} elseif ($this->entityCategory === self::UNIVERSITY) { } elseif ($this->entityCategory === self::UNIVERSITY) {
foreach ($this->eduPersonScopedAffiliation as $affiliation) { foreach ($this->eduPersonScopedAffiliation as $affiliation) {
if (preg_match("/(^employee@.+\.cz$)|(^faculty@.+\.cz$)|(^member@.+\.cz$)|(^student@.+\.cz$)|(^staff@.+\.cz$)|(^alum@.+\.cz$)/", $affiliation, $matches)) { if (preg_match("/(^employee@.+\.cz$)|(^faculty@.+\.cz$)|(^member@.+\.cz$)|(^student@.+\.cz$)|(^staff@.+\.cz$)|(^alum@.+\.cz$)/", $affiliation, $matches)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment