Commit 2faa56be authored by Lukas Haemmerle's avatar Lukas Haemmerle

Fixed #3886

parent 0120565d
...@@ -36,6 +36,7 @@ SWITCHwayf Version History ...@@ -36,6 +36,7 @@ SWITCHwayf Version History
web server environment variable to allow multi-tenant web server environment variable to allow multi-tenant
deployments. Code provided by Guillaume Rousse. deployments. Code provided by Guillaume Rousse.
- Updated JQuery to v3.2.1 - Updated JQuery to v3.2.1
- Hide IdPs also from category Last Used IdP
- Made Javascript less prone to conflicts thanks to - Made Javascript less prone to conflicts thanks to
contributed code from Christian Glahn contributed code from Christian Glahn
- User HTTP post has preference over session cookies - User HTTP post has preference over session cookies
......
...@@ -181,14 +181,14 @@ function isAllowedIdP(IdP){ ...@@ -181,14 +181,14 @@ function isAllowedIdP(IdP){
type = wayf_other_fed_idps[IdP].type; type = wayf_other_fed_idps[IdP].type;
} }
// Check if IdP shall be hidden // Check if IdP should be hidden
for ( var i = 0; i < wayf_hide_idps.length; i++){ for ( var i = 0; i < wayf_hide_idps.length; i++){
if (wayf_hide_idps[i] == IdP){ if (wayf_hide_idps[i] == IdP){
return false; return false;
} }
} }
// Check if category is hidden // Check if category should be hidden
// Check if IdP is unhidden in this category // Check if IdP is unhidden in this category
for ( var i = 0; i < wayf_hide_categories.length; i++){ for ( var i = 0; i < wayf_hide_categories.length; i++){
...@@ -1142,6 +1142,13 @@ function runImproveDropDown() { ...@@ -1142,6 +1142,13 @@ function runImproveDropDown() {
} }
var currentIdP = decodeBase64(last_idps[i]); var currentIdP = decodeBase64(last_idps[i]);
// Skip if IdP is hidden explicitly
if (!isAllowedIdP(currentIdP)){
continue;
}
// Add option
var content = getOptionHTML(currentIdP); var content = getOptionHTML(currentIdP);
if (content != ''){ if (content != ''){
...@@ -1167,8 +1174,12 @@ function runImproveDropDown() { ...@@ -1167,8 +1174,12 @@ function runImproveDropDown() {
// Show most used IdPs in the order they are defined // Show most used IdPs in the order they are defined
var IdPElements = ''; var IdPElements = '';
for ( var i=0; i < wayf_most_used_idps.length; i++){ for ( var i=0; i < wayf_most_used_idps.length; i++){
if (wayf_idps[wayf_most_used_idps[i]]){
IdPElements += getOptionHTML(wayf_most_used_idps[i]); var currentIdP = wayf_most_used_idps[i];
// Add option if IdP exists in list of elements
if (wayf_idps[currentIdP]){
IdPElements += getOptionHTML(currentIdP);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment